Chromium Code Reviews
Help | Chromium Project | Sign in
(1003)

Issue 11275292: Object.observe: Move notification of JSArray length changes to JSArray::SetElementsLength (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
1 year, 5 months ago by adamk
Modified:
1 year, 5 months ago
Reviewers:
rossberg
CC:
v8-dev_googlegroups.com, rafaelw
Visibility:
Public.

Description

Object.observe: Move notification of JSArray length changes to JSArray::SetElementsLength

The previous implementation in Accessors::ArraySetLength failed when array length was set through StoreIC_ArrayLength. But that stub and the accessor both delegate to JSArray::SetElementsLength, so moving the code there allows notifications to be sent in both cases.

Committed: https://code.google.com/p/v8/source/detail?r=12962

Patch Set 1 #

Total comments: 2

Patch Set 2 : Added GC warning comment #

Patch Set 3 : Add test #

Unified diffs Side-by-side diffs Delta from patch set Stats (+61 lines, -47 lines) Lint Patch
M src/accessors.cc View 2 chunks +1 line, -46 lines 0 comments 0 errors Download
M src/objects.h View 1 1 chunk +1 line, -0 lines 0 comments ? errors Download
src/objects.cc View 1 chunk +45 lines, -1 line 0 comments 0 errors Download
M test/mjsunit/harmony/object-observe.js View 1 2 1 chunk +14 lines, -0 lines 0 comments ? errors Download
Trybot results:
Commit:

Messages

Total messages: 8
adamk
1 year, 5 months ago #1
rossberg
LGTM, with nit. https://codereview.chromium.org/11275292/diff/1/src/objects.cc File src/objects.cc (right): https://codereview.chromium.org/11275292/diff/1/src/objects.cc#newcode9378 src/objects.cc:9378: MaybeObject* JSArray::SetElementsLength(Object* len) { Add a ...
1 year, 5 months ago #2
rossberg
On 2012/11/14 10:19:26, rossberg wrote: > LGTM, with nit. Actually, please add a test case.
1 year, 5 months ago #3
adamk
https://codereview.chromium.org/11275292/diff/1/src/objects.cc File src/objects.cc (right): https://codereview.chromium.org/11275292/diff/1/src/objects.cc#newcode9378 src/objects.cc:9378: MaybeObject* JSArray::SetElementsLength(Object* len) { On 2012/11/14 10:19:26, rossberg wrote: ...
1 year, 5 months ago #4
adamk
On 2012/11/14 12:13:13, rossberg wrote: > On 2012/11/14 10:19:26, rossberg wrote: > > LGTM, with ...
1 year, 5 months ago #5
rossberg
On 2012/11/14 16:10:18, adamk wrote: > On 2012/11/14 12:13:13, rossberg wrote: > > On 2012/11/14 ...
1 year, 5 months ago #6
adamk
Added test case.
1 year, 5 months ago #7
rossberg
1 year, 5 months ago #8
LGTM, landing...
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld 1280:2d3e6564b7b6