From: rossberg@chromium.org Date: Thu, 6 Oct 2011 08:42:10 +0000 (+0000) Subject: Use correct trap for lookup in prototype proxy. X-Git-Tag: upstream/4.7.83~18277 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ebf6cb7150c5c896f9d1b6fbb465195e354eee3b;p=platform%2Fupstream%2Fv8.git Use correct trap for lookup in prototype proxy. R=kmillikin@chromium.org BUG= TEST= Review URL: http://codereview.chromium.org/8133023 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9535 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- diff --git a/src/objects.cc b/src/objects.cc index 30fea91d7..d3cb8b5ee 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 value(value_raw); Handle args[] = { name }; Handle result = proxy->CallTrap( - "getOwnPropertyDescriptor", Handle(), ARRAY_SIZE(args), args); + "getPropertyDescriptor", Handle(), ARRAY_SIZE(args), args); if (isolate->has_pending_exception()) return Failure::Exception(); if (!result->IsUndefined()) { diff --git a/test/mjsunit/harmony/proxies.js b/test/mjsunit/harmony/proxies.js index 845dc2053..d7de97cb0 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}