js/src/jit-test/tests/jaeger/bug663910.js

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

     1 var otherGlobalSameCompartment = newGlobal("same-compartment");
     2 eval = otherGlobalSameCompartment.eval;
     3 doesNotNeedParens(1, "if (xx) { }");
     4 needParens(2, "if (1, xx) { }");
     5 function doesNotNeedParens(section, pat) {
     6     try {
     7         f = new Function
     8     } catch (e) {}
     9     roundTripTest(section, f)
    10 }
    11 function needParens(section, pat, exp) {
    12     var f, ft;
    13     roundTripTest(section, f, exp)
    14 }
    15 function roundTripTest(section, f, exp) {
    16     uf = "" + f
    17     var euf;
    18     try {
    19       euf = eval("(" + uf + ")");
    20     } catch (e) { }
    21     + euf
    22 }

mercurial