author | Rafael Ávila de Espíndola <respindola@mozilla.com> |
Fri, 13 Jan 2012 11:11:03 -0500 | |
changeset 84423 | 020e61c8efeda9aa2f88fa68e88b90fabea96d7a |
parent 84422 | b605399234fcaa52134392bcc58248ae8d977b15 |
child 84424 | 465bacf25d61c97a4189044067c545671a6d8584 |
push id | 21848 |
push user | mak77@bonardo.net |
push date | Sat, 14 Jan 2012 09:02:20 +0000 |
treeherder | mozilla-central@27a7f197c6fc [default view] [failures only] |
perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
reviewers | igor |
bugs | 717908 |
milestone | 12.0a1 |
first release with | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
last release without | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
js/src/jit-test/tests/basic/testBug597736.js | file | annotate | diff | comparison | revisions |
deleted file mode 100644 --- a/js/src/jit-test/tests/basic/testBug597736.js +++ /dev/null @@ -1,32 +0,0 @@ -function leak_test() { - // Create a reference loop function->script->traceFragment->object->function - // that GC must be able to break. To embedd object into the fragment the - // code use prototype chain of depth 2 which caches obj.__proto__.__proto__ - // into the fragment. - - // To make sure that we have no references to the function f after this - // function returns due via the conservative scan of the native stack we - // loop here multiple times overwriting the stack and registers with new garabge. - for (var j = 0; j != 8; ++j) { - var f = Function("a", "var s = 0; for (var i = 0; i != 100; ++i) s += a.b; return s;"); - var c = {b: 1, f: f, leakDetection: makeFinalizeObserver()}; - f({ __proto__: { __proto__: c}}); - f = c = a = null; - gc(); - } -} - -function test() -{ - if (typeof finalizeCount != "function") - return; - - var base = finalizeCount(); - leak_test(); - gc(); - gc(); - var n = finalizeCount(); - assertEq(base + 4 < finalizeCount(), true, "Some finalizations must happen"); -} - -test();