Reviewers: Kevin Millikin,

Description:
Use correct trap for lookup in prototype proxy.

[email protected]
BUG=
TEST=


Please review this at http://codereview.chromium.org/8133023/

SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge

Affected files:
  M src/objects.cc
  M test/mjsunit/harmony/proxies.js


Index: src/objects.cc
diff --git a/src/objects.cc b/src/objects.cc
index 30fea91d796b99db864bc8e07f3d2534d9218259..d3cb8b5ee20d52de8193ade6e9e256666d357f2d 100644
--- a/src/objects.cc
+++ b/src/objects.cc
@@ -2029,7 +2029,7 @@ MaybeObject* JSObject::SetPropertyWithCallbackSetterInPrototypes(
                                          strict_mode);
         } else if (accessor_result.type() == HANDLER) {
           // There is a proxy in the prototype chain. Invoke its
-          // getOwnPropertyDescriptor trap.
+          // getPropertyDescriptor trap.
           bool found = false;
           // SetPropertyWithHandlerIfDefiningSetter can cause GC,
           // make sure to use the handlified references after calling
@@ -2448,7 +2448,7 @@ MUST_USE_RESULT MaybeObject* JSProxy::SetPropertyWithHandlerIfDefiningSetter(
   Handle<Object> value(value_raw);
   Handle<Object> args[] = { name };
   Handle<Object> result = proxy->CallTrap(
- "getOwnPropertyDescriptor", Handle<Object>(), ARRAY_SIZE(args), args);
+      "getPropertyDescriptor", Handle<Object>(), ARRAY_SIZE(args), args);
   if (isolate->has_pending_exception()) return Failure::Exception();

   if (!result->IsUndefined()) {
Index: test/mjsunit/harmony/proxies.js
diff --git a/test/mjsunit/harmony/proxies.js b/test/mjsunit/harmony/proxies.js index 845dc2053738fe1845d1e21acd07529419db99d9..d7de97cb0b9e04f8d767086569c801bb609958e0 100644
--- a/test/mjsunit/harmony/proxies.js
+++ b/test/mjsunit/harmony/proxies.js
@@ -609,7 +609,7 @@ function TestSetForDerived2(handler, create) {
 }

 TestSetForDerived({
-  getOwnPropertyDescriptor: function(k) {
+  getPropertyDescriptor: function(k) {
     key = k;
     switch (k) {
       case "p_writable": return {writable: true, configurable: true}


--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev

Reply via email to