js/src/jit-test/tests/basic/runOnceClosures.js

Wed, 31 Dec 2014 13:27:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 13:27:57 +0100
branch
TOR_BUG_3246
changeset 6
8bccb770b82d
permissions
-rw-r--r--

Ignore runtime configuration files generated during quality assurance.

     2 compare = (function() {
     3   function inner() { return inner.caller; };
     4   globalInner = inner;
     5   globalClosure = inner();
     6   return function(f) { return f === inner; }
     7 })();
     9 assertEq(compare(globalInner), true);
    10 globalClosure();
    11 assertEq(compare(globalInner), false);

mercurial