diff options
Diffstat (limited to 'LayoutTests/fast/js/resources/garbage-collect-after-string-appends.js-disabled')
-rw-r--r-- | LayoutTests/fast/js/resources/garbage-collect-after-string-appends.js-disabled | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/LayoutTests/fast/js/resources/garbage-collect-after-string-appends.js-disabled b/LayoutTests/fast/js/resources/garbage-collect-after-string-appends.js-disabled new file mode 100644 index 0000000..1ec03ce --- /dev/null +++ b/LayoutTests/fast/js/resources/garbage-collect-after-string-appends.js-disabled @@ -0,0 +1,39 @@ +description( +"This test checks whether the GC collects after string appends." +); + +// FIXME: This test appears to be highly tied to the details of how JS strings report memory +// cost to the garbage collector. It should be improved to be less tied to these implementation details. +// <https://bugs.webkit.org/show_bug.cgi?id=20871> + +if (window.layoutTestController) + layoutTestController.dumpAsText(); + +if (window.GCController) + GCController.collect(); + + +// str has 150 chars in it (which is greater than the limit of the GC to ignore which I believe is at 128). +var str = "123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890"; +var count = 500; +for (var i = 0; i < count; ++i) { + str += "b"; +} + +// str has 128 chars in it. +str = "123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890"; +count = 10; +for (var i = 0; i < count; ++i) { + str += str; +} + +var jsObjCount = 0; +if (window.GCController) + jsObjCount = GCController.getJSObjectCount(); + +if (jsObjCount <= 500 && jsObjCount > 0) + testPassed("Garbage Collector triggered") +else + testFailed("Garbage Collector NOT triggered. Number of JSObjects: " + jsObjCount); + +var successfullyParsed = true; |