Index: test/mjsunit/regress/regress-1365.js |
diff --git a/test/mjsunit/regress/regress-1365.js b/test/mjsunit/regress/regress-1365.js |
index f19bdd0856051d8857cd0b10bf0393bc08cd1838..59290f9ebc7f1e51d7a420fab1b17a0629d27aad 100644 |
--- a/test/mjsunit/regress/regress-1365.js |
+++ b/test/mjsunit/regress/regress-1365.js |
@@ -53,13 +53,30 @@ assertThrows(callGlobalHasOwnProperty); |
function CheckExceptionCallLocal() { |
var valueOf = Object.prototype.valueOf; |
var hasOwnProperty = Object.prototype.hasOwnProperty; |
- try { valueOf(); assertUnreachable(); } catch(e) { } |
- try { hasOwnProperty(); assertUnreachable(); } catch(e) { } |
+ var exception = false; |
+ try { valueOf(); } catch(e) { exception = true; } |
+ assertTrue(exception); |
+ exception = false; |
+ try { hasOwnProperty(); } catch(e) { exception = true; } |
+ assertTrue(exception); |
} |
CheckExceptionCallLocal(); |
function CheckExceptionCallParameter(f) { |
- try { f(); assertUnreachable(); } catch(e) { } |
+ var exception = false; |
+ try { f(); } catch(e) { exception = true; } |
+ assertTrue(exception); |
} |
CheckExceptionCallParameter(Object.prototype.valueOf); |
CheckExceptionCallParameter(Object.prototype.hasOwnProperty); |
+ |
+function CheckPotentiallyShadowedByEval() { |
+ var exception = false; |
+ try { |
+ eval("hasOwnProperty('x')"); |
+ } catch(e) { |
+ exception = true; |
+ } |
+ assertTrue(exception); |
+} |
+CheckPotentiallyShadowedByEval(); |