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

Issue 7149015: Correctly set ReadOnly flag on indexed properties when using the API Set method (fixes issue 1470) (Closed)

Created:
9 years, 6 months ago by Rico
Modified:
9 years, 6 months ago
Reviewers:
Erik Corry
CC:
v8-dev
Visibility:
Public.

Description

Correctly set ReadOnly flag on indexed properties when using the API Set method (fixes issue 1470) Committed: http://code.google.com/p/v8/source/detail?r=8286

Patch Set 1 #

Patch Set 2 : '' #

Patch Set 3 : '' #

Total comments: 4

Patch Set 4 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+56 lines, -0 lines) Patch
M src/runtime.cc View 1 2 3 3 chunks +34 lines, -0 lines 0 comments Download
M test/cctest/test-api.cc View 1 2 3 1 chunk +22 lines, -0 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
Rico
9 years, 6 months ago (2011-06-14 10:31:31 UTC) #1
Erik Corry
LGTM http://codereview.chromium.org/7149015/diff/7002/src/runtime.cc File src/runtime.cc (right): http://codereview.chromium.org/7149015/diff/7002/src/runtime.cc#newcode4023 src/runtime.cc:4023: if (Handle<String>::cast(key)->AsArrayIndex(&index)) { There's a ton of copied ...
9 years, 6 months ago (2011-06-14 13:21:51 UTC) #2
Rico
9 years, 6 months ago (2011-06-14 13:44:23 UTC) #3
Comments addressed, please have another look

http://codereview.chromium.org/7149015/diff/7002/src/runtime.cc
File src/runtime.cc (right):

http://codereview.chromium.org/7149015/diff/7002/src/runtime.cc#newcode4023
src/runtime.cc:4023: if (Handle<String>::cast(key)->AsArrayIndex(&index)) {
On 2011/06/14 13:21:51, Erik Corry wrote:
> There's a ton of copied code here.
> You could create a helper or just recurse:  return SetObjectProperty(isolate,
> object, Smi::fromInt(index), value, attr, strict_mode);

Done.

http://codereview.chromium.org/7149015/diff/7002/test/cctest/test-api.cc
File test/cctest/test-api.cc (right):

http://codereview.chromium.org/7149015/diff/7002/test/cctest/test-api.cc#newc...
test/cctest/test-api.cc:14497: obj->Set(v8_num(2), v8_str("foobar"));
On 2011/06/14 13:21:51, Erik Corry wrote:
> Can we haz a test with a string that represents an out-of-Smi-range integer?

Done.

Powered by Google App Engine
This is Rietveld 408576698