Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // If there is no window.gc() already defined, define one using the best | |
| 2 // method we can find. | |
| 3 // The slow fallback should not hit in the actual test environment. | |
| 4 if (!window.gc) | |
| 5 { | |
| 6 window.gc = function() | |
| 7 { | |
| 8 if (window.GCController) | |
| 9 return GCController.collect(); | |
| 10 function gcRec(n) { | |
| 11 if (n < 1) | |
| 12 return {}; | |
| 13 var temp = {i: "ab" + i + (i / 100000)}; | |
| 14 temp += "foo"; | |
| 15 gcRec(n-1); | |
| 16 } | |
| 17 for (var i = 0; i < 10000; i++) | |
| 18 gcRec(10); | |
| 19 } | |
| 20 } | |
| OLD | NEW |