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

Unified Diff: test/mjsunit/harmony/proxies-global-reference.js

Issue 1529303003: Throw TypeError when reading global references through a JSProxy (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Also add test Created 5 years 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 | « src/objects.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/harmony/proxies-global-reference.js
diff --git a/test/mjsunit/compiler/regress-445876.js b/test/mjsunit/harmony/proxies-global-reference.js
similarity index 53%
copy from test/mjsunit/compiler/regress-445876.js
copy to test/mjsunit/harmony/proxies-global-reference.js
index 30e10e56c3ac424fb8843b700bec2af5ded334ac..cdc9fde1c5492a30f9781bcf7453ad0700f79d8e 100644
--- a/test/mjsunit/compiler/regress-445876.js
+++ b/test/mjsunit/harmony/proxies-global-reference.js
@@ -2,11 +2,9 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-// Flags: --allow-natives-syntax
+// Flags: --harmony-proxies
-function f(x) {
- while (1) { s++; }
- while (x) { s++; }
-}
+__proto__ = new Proxy({}, new Proxy({}, {
adamk 2015/12/17 13:36:41 Maybe also add a test case where Object.prototype
+ get() { throw "No trap should fire" }}));
-assertThrows(function () { f(1); });
+assertThrows(()=>a, TypeError);
« no previous file with comments | « src/objects.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698