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

Issue 7314003: Implement Object.defineProperty for proxies. (Closed)

Created:
9 years, 5 months ago by rossberg
Modified:
9 years, 5 months ago
CC:
v8-dev
Visibility:
Public.

Description

Implement Object.defineProperty for proxies. R=kmillikin@chromium.org BUG= TEST= Committed: http://code.google.com/p/v8/source/detail?r=8564

Patch Set 1 #

Total comments: 6
Unified diffs Side-by-side diffs Delta from patch set Stats (+144 lines, -6 lines) Patch
M src/messages.js View 1 chunk +1 line, -0 lines 2 comments Download
M src/runtime.cc View 1 chunk +3 lines, -4 lines 0 comments Download
M src/v8natives.js View 3 chunks +68 lines, -2 lines 2 comments Download
M test/mjsunit/harmony/proxies.js View 1 chunk +72 lines, -0 lines 2 comments Download

Messages

Total messages: 3 (0 generated)
rossberg
9 years, 5 months ago (2011-07-06 15:01:09 UTC) #1
Kevin Millikin (Chromium)
LGTM. http://codereview.chromium.org/7314003/diff/1/src/messages.js File src/messages.js (right): http://codereview.chromium.org/7314003/diff/1/src/messages.js#newcode198 src/messages.js:198: handler_failed: ["Proxy handler ", "%0", " returned false ...
9 years, 5 months ago (2011-07-07 08:12:02 UTC) #2
rossberg
9 years, 5 months ago (2011-07-07 09:19:32 UTC) #3
http://codereview.chromium.org/7314003/diff/1/src/messages.js
File src/messages.js (right):

http://codereview.chromium.org/7314003/diff/1/src/messages.js#newcode198
src/messages.js:198: handler_failed:               ["Proxy handler ", "%0", "
returned false for '", "%1", "' trap"],
On 2011/07/07 08:12:02, Kevin Millikin wrote:
> I wonder if there's a better message?  Couldn't the handler have returned 0 or
> undefined or...?
> 
> I have no concrete suggestion right now.

Hm, me neither. The return type morally is a Boolean, so I guess users will know
how to read this.

http://codereview.chromium.org/7314003/diff/1/src/v8natives.js
File src/v8natives.js (right):

http://codereview.chromium.org/7314003/diff/1/src/v8natives.js#newcode361
src/v8natives.js:361: if (desc.hasValue_) obj.value = desc.getValue();
On 2011/07/07 08:12:02, Kevin Millikin wrote:
> It's not obvious why you use the property hasValue_ in the test and the
accessor
> getValue() in the assignment.

True. I copied from pre-existing functions. I fixed those, too.

http://codereview.chromium.org/7314003/diff/1/test/mjsunit/harmony/proxies.js
File test/mjsunit/harmony/proxies.js (right):

http://codereview.chromium.org/7314003/diff/1/test/mjsunit/harmony/proxies.js...
test/mjsunit/harmony/proxies.js:181: delete attributes.midetoo
On 2011/07/07 08:12:02, Kevin Millikin wrote:
> midetoo => minetoo

Done.

Powered by Google App Engine
This is Rietveld 408576698