1 <p>This page tests whether an exception thrown from an eval inside a closure
2 prematurely tears off the closure's activation.
4 <p>If the test passes, you'll see a PASS message below.
6 <pre id=
"console"></pre>
11 document
.getElementById("console").appendChild(document
.createTextNode(s
+ "\n"));
14 function shouldBe(aDescription
, a
, b
)
17 log("PASS: " + aDescription
+ " should be " + b
+ " and is.");
19 log("FAIL: " + aDescription
+ " should be " + b
+ " but instead is " + a
+ ".");
23 if (window
.testRunner
)
24 testRunner
.dumpAsText();
26 // Create a function with an activation.
30 // Throw an exception inside an eval that requires a full scope chain.
32 eval("(function () { throw 'exception'; })()");
36 // Set "x" by resolving through the activation.
41 // Test the local register for "x", which should have been set to 2 above.