Index: LayoutTests/fast/css/giant-stylesheet-crash.html |
diff --git a/LayoutTests/fast/css/giant-stylesheet-crash.html b/LayoutTests/fast/css/giant-stylesheet-crash.html |
index b450a88fc6cea0618457f914306733fe258df985..08c75cb9a9f030ad0b539ade5188af2c7afe8e42 100644 |
--- a/LayoutTests/fast/css/giant-stylesheet-crash.html |
+++ b/LayoutTests/fast/css/giant-stylesheet-crash.html |
@@ -1,5 +1,9 @@ |
<head> |
<script> |
+// GC unreferenced strings to avoid that this test times out. |
+if (window.GCController) |
+ GCController.collect(); |
+ |
if (window.testRunner) |
testRunner.dumpAsText(); |
</script> |
@@ -17,7 +21,13 @@ for (var i = 0; i < 1+(1<<16); i++){ |
styleElement.appendChild(txt); |
} |
-document.getElementsByTagName('head')[0].appendChild(styleElement); |
+str = null; |
+ |
+// GC the large str strings to avoid timeouts for subsequent tests. |
+if (window.GCController) |
+ GCController.collect(); |
+ |
+document.getElementsByTagName('head')[0].appendChild(styleElement); |
</script> |
</head> |
<body> |