Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(299)

Unified Diff: test/mjsunit/regress/regress-1365.js

Issue 7096004: Fix receiver for calls to strict-mode and builtin functions that are (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « test/mjsunit/regress/regress-124.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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();
« no previous file with comments | « test/mjsunit/regress/regress-124.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698