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

Unified Diff: test/mjsunit/regress/regress-crbug-578039-Proxy_construct_prototype_change.js

Issue 1586203003: [proxy] Reload the initial map after prototype lookup on constructable (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: year++ Created 4 years, 11 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 | « 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/regress/regress-crbug-578039-Proxy_construct_prototype_change.js
diff --git a/test/mjsunit/compiler/regress-572409.js b/test/mjsunit/regress/regress-crbug-578039-Proxy_construct_prototype_change.js
similarity index 51%
copy from test/mjsunit/compiler/regress-572409.js
copy to test/mjsunit/regress/regress-crbug-578039-Proxy_construct_prototype_change.js
index 126b622625ad4455b4bd2e309ee10e32eb02989e..30b3f219e9a1a733fefdac8b92a1e01b6be58f7e 100644
--- a/test/mjsunit/compiler/regress-572409.js
+++ b/test/mjsunit/regress/regress-crbug-578039-Proxy_construct_prototype_change.js
@@ -2,9 +2,13 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-var o = function() {};
-function f() {
- var lit = { __proto__: o };
- o instanceof RegExp;
-}
-f();
+
+function target() {};
+
+var proxy = new Proxy(target, {
+ get() {
+ // Reset the initial map of the target.
+ target.prototype = 123;
+ }});
+
+new proxy();
« 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