| <p>This page tests whether an exception thrown from a function that has lazily |
| constructed an activation properly tears off the function's activation. |
| <p>If the test passes, you'll see a PASS message below. |
| document.getElementById("console").appendChild(document.createTextNode(s + "\n")); |
| function shouldBe(aDescription, a, b) |
| log("PASS: " + aDescription + " should be " + b + " and is."); |
| log("FAIL: " + aDescription + " should be " + b + " but instead is " + a + "."); |
| // Lazily create an activation for a function that otherwise wouldn't need one, then throw. |
| // Call another function to overwrite the stack. |
| (function (a, b, c, d, e, f, g, h, i, j, k, l) { })(); |
| // Test whether args's activation was properly torn off. If it wasn't, the |
| // previous call should have clobbered its data. |
| shouldBe("args[0]", args[0], 1); |