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

Side by Side Diff: LayoutTests/resources/gc.js

Issue 211933008: Remove multiple GC calls and replace GCController.collect calls with GCController.collectAll (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: revert change to worker-event-listener Created 6 years, 9 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « LayoutTests/plugins/refcount-leaks.html ('k') | LayoutTests/resources/magnitude-perf.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // If there is no window.gc() already defined, define one using the best 1 // If there is no window.gc() already defined, define one using the best
2 // method we can find. 2 // method we can find.
3 // The slow fallback should not hit in the actual test environment. 3 // The slow fallback should not hit in the actual test environment.
4 if (!window.gc) 4 if (!window.gc)
5 { 5 {
6 window.gc = function() 6 window.gc = function()
7 { 7 {
8 if (window.GCController) 8 if (window.GCController)
9 return GCController.collect(); 9 return GCController.collectAll();
10 function gcRec(n) { 10 function gcRec(n) {
11 if (n < 1) 11 if (n < 1)
12 return {}; 12 return {};
13 var temp = {i: "ab" + i + (i / 100000)}; 13 var temp = {i: "ab" + i + (i / 100000)};
14 temp += "foo"; 14 temp += "foo";
15 gcRec(n-1); 15 gcRec(n-1);
16 } 16 }
17 for (var i = 0; i < 10000; i++) 17 for (var i = 0; i < 10000; i++)
18 gcRec(10); 18 gcRec(10);
19 } 19 }
20 } 20 }
OLDNEW
« no previous file with comments | « LayoutTests/plugins/refcount-leaks.html ('k') | LayoutTests/resources/magnitude-perf.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698