Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(117)

Unified Diff: LayoutTests/fast/css/giant-stylesheet-crash.html

Issue 38293002: Explicit GC of strings to avoid test timeout. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase on top of CRLF -> LF change. Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | LayoutTests/fast/css/visited-link-hang.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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>
« no previous file with comments | « no previous file | LayoutTests/fast/css/visited-link-hang.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698