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

Issue 2123012: Allow to define accessors on objects. (Closed)

Created:
10 years, 7 months ago by antonm
Modified:
9 years, 4 months ago
CC:
v8-dev
Visibility:
Public.

Description

Allow to define accessors on objects. Currently one can only define accessors on object templates. This patch allows to create accessors on the fly. These accessors could control access to elements as well. This element support is somewhat rudimentary and may require future work (for example, we probably don't want to convert index into a string.) Committed: http://code.google.com/p/v8/source/detail?r=4714

Patch Set 1 #

Total comments: 14

Patch Set 2 : Addressing Mads' comments #

Total comments: 4

Patch Set 3 : Next rounbd #

Total comments: 2

Patch Set 4 : Last round of comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+554 lines, -149 lines) Patch
M include/v8.h View 5 chunks +43 lines, -34 lines 0 comments Download
M src/api.cc View 3 chunks +37 lines, -6 lines 0 comments Download
M src/handles.h View 1 chunk +2 lines, -0 lines 0 comments Download
M src/handles.cc View 1 chunk +5 lines, -0 lines 0 comments Download
M src/objects.h View 4 chunks +18 lines, -1 line 0 comments Download
M src/objects.cc View 1 2 3 16 chunks +284 lines, -107 lines 0 comments Download
M test/cctest/test-api.cc View 3 chunks +165 lines, -1 line 0 comments Download

Messages

Total messages: 7 (0 generated)
antonm
Mads, Rico, may you have a look?
10 years, 7 months ago (2010-05-20 12:17:56 UTC) #1
Mads Ager (chromium)
http://codereview.chromium.org/2123012/diff/1/6 File src/objects.cc (right): http://codereview.chromium.org/2123012/diff/1/6#newcode2774 src/objects.cc:2774: || Top::MayNamedAccess(this, name, v8::ACCESS_SET)); Do the types match here? ...
10 years, 7 months ago (2010-05-21 07:49:57 UTC) #2
antonm
Thanks a lot for comments, Mads. http://codereview.chromium.org/2123012/diff/1/6 File src/objects.cc (right): http://codereview.chromium.org/2123012/diff/1/6#newcode2774 src/objects.cc:2774: || Top::MayNamedAccess(this, name, ...
10 years, 7 months ago (2010-05-21 10:20:52 UTC) #3
Mads Ager (chromium)
http://codereview.chromium.org/2123012/diff/5001/6005 File src/objects.cc (right): http://codereview.chromium.org/2123012/diff/5001/6005#newcode2935 src/objects.cc:2935: if (result.IsProperty() && (result.IsReadOnly() || result.IsDontDelete())) { I think ...
10 years, 7 months ago (2010-05-21 11:35:19 UTC) #4
antonm
http://codereview.chromium.org/2123012/diff/5001/6005 File src/objects.cc (right): http://codereview.chromium.org/2123012/diff/5001/6005#newcode2935 src/objects.cc:2935: if (result.IsProperty() && (result.IsReadOnly() || result.IsDontDelete())) { On 2010/05/21 ...
10 years, 7 months ago (2010-05-21 11:50:18 UTC) #5
Mads Ager (chromium)
LGTM http://codereview.chromium.org/2123012/diff/11001/12005 File src/objects.cc (right): http://codereview.chromium.org/2123012/diff/11001/12005#newcode2935 src/objects.cc:2935: // ECMA-262 forbids to turn a property into ...
10 years, 7 months ago (2010-05-25 08:18:24 UTC) #6
antonm
10 years, 7 months ago (2010-05-25 12:06:38 UTC) #7
Thanks a lot for review, Mads.  Committing.

http://codereview.chromium.org/2123012/diff/11001/12005
File src/objects.cc (right):

http://codereview.chromium.org/2123012/diff/11001/12005#newcode2935
src/objects.cc:2935: // ECMA-262 forbids to turn a property into an accessor if
it's not
On 2010/05/25 08:18:24, Mads Ager wrote:
> Replace ECMA-262 by ES5 to make the ES5/ES3 distinction clear here (both are
> revisions of ECMA-262).

Of course.

Powered by Google App Engine
This is Rietveld 408576698