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

Unified Diff: test/mjsunit/harmony/proxies.js

Issue 1812793002: ES6: Object.setPrototypeOf(func, null) breaks instanceof (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 9 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/allocation-site-info.js ('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.js
diff --git a/test/mjsunit/harmony/proxies.js b/test/mjsunit/harmony/proxies.js
index 8f24d4d9add72bc838e3ddd6679761d3df7ea9f6..28f07496de5a9a0100f3443fb2fc52bbe64bf836 100644
--- a/test/mjsunit/harmony/proxies.js
+++ b/test/mjsunit/harmony/proxies.js
@@ -1018,7 +1018,19 @@ TestHasOwnThrow({
var o4 = Object.create(o2)
var o5 = Object.create(o3)
- function handler(o) { return {get: function() { return o } } }
+ function handler(o) {
+ return {
+ get: function(r, p) {
+ // We want to test prototype lookup, so ensure the proxy
+ // offers OrdinaryHasInstance behavior.
+ if (p === Symbol.hasInstance) {
+ return undefined;
+ }
+ return o;
+ }
+ }
+ }
+
var f0 = new Proxy(function() {}, handler(o0))
var f1 = new Proxy(function() {}, handler(o1))
var f2 = new Proxy(function() {}, handler(o2))
« no previous file with comments | « test/mjsunit/allocation-site-info.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698