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

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

Issue 1519073002: [proxies] Add missing condition to GetProperty consistency check. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebase 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-get.js
diff --git a/test/mjsunit/harmony/proxies-get.js b/test/mjsunit/harmony/proxies-get.js
index 8e8591298719fc64f713d43e85686c62535c7918..04ebd3125795aa7b80f9d92cd986bcbfb21c383f 100644
--- a/test/mjsunit/harmony/proxies-get.js
+++ b/test/mjsunit/harmony/proxies-get.js
@@ -52,7 +52,7 @@
(function testFailingInvariant() {
var target = {};
- var handler = { get: function(){ return "value" }}
+ var handler = { get: function(r, p){ if (p != "key4") return "value" }}
var proxy = new Proxy(target, handler);
assertEquals("value", proxy.property);
assertEquals("value", proxy.key);
@@ -92,6 +92,14 @@
assertThrows(function(){ proxy.key }, TypeError);
assertEquals("value", proxy.key2);
assertThrows(function(){ proxy.key3 }, TypeError);
+
+ // Define a non-configurable setter without a corresponding getter on the
+ // target for which the handler will return undefined.
+ Object.defineProperty(target, "key4", {
+ configurable: false,
+ set: function() { }
+ });
+ assertSame(undefined, proxy.key4);
})();
(function testGetInternalIterators() {
« 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