diff options
Diffstat (limited to 'deps/v8/test/mjsunit/regress/regress-1119.js')
-rw-r--r-- | deps/v8/test/mjsunit/regress/regress-1119.js | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/deps/v8/test/mjsunit/regress/regress-1119.js b/deps/v8/test/mjsunit/regress/regress-1119.js index 16b2e4f935..5fd8f369b1 100644 --- a/deps/v8/test/mjsunit/regress/regress-1119.js +++ b/deps/v8/test/mjsunit/regress/regress-1119.js @@ -28,17 +28,19 @@ // Test runtime declaration of properties with var which are intercepted // by JS accessors. -__proto__.__defineSetter__("x", function() { hasBeenInvoked = true; }); -__proto__.__defineSetter__("y", function() { throw 'exception'; }); +// Flags: --es52_globals + +this.__defineSetter__("x", function() { hasBeenInvoked = true; }); +this.__defineSetter__("y", function() { throw 'exception'; }); var hasBeenInvoked = false; eval("try { } catch (e) { var x = false; }"); assertTrue(hasBeenInvoked); -var exception; +// This has to run in global scope, so cannot use assertThrows... try { eval("try { } catch (e) { var y = false; }"); + assertUnreachable(); } catch (e) { - exception = e; + assertEquals('exception', e); } -assertEquals('exception', exception); |