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

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

Can't Edit
Can't Publish+Mail
Start Review
Created:
2 years, 5 months ago by adamk
Modified:
2 years, 5 months ago
Reviewers:
rossberg
CC:
v8-dev, 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) Patch
M src/accessors.cc View 2 chunks +1 line, -46 lines 0 comments Download
M src/objects.h View 1 1 chunk +1 line, -0 lines 0 comments Download
src/objects.cc View 1 chunk +45 lines, -1 line 0 comments Download
M test/mjsunit/harmony/object-observe.js View 1 2 1 chunk +14 lines, -0 lines 0 comments Download
Trybot results:
Commit: CQ not working?

Messages

Total messages: 8 (0 generated)
adamk
2 years, 5 months ago (2012-11-13 21:15:26 UTC) #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 ...
2 years, 5 months ago (2012-11-14 10:19:26 UTC) #2
rossberg
On 2012/11/14 10:19:26, rossberg wrote: > LGTM, with nit. Actually, please add a test case.
2 years, 5 months ago (2012-11-14 12:13:13 UTC) #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: ...
2 years, 5 months ago (2012-11-14 15:56:25 UTC) #4
adamk
On 2012/11/14 12:13:13, rossberg wrote: > On 2012/11/14 10:19:26, rossberg wrote: > > LGTM, with ...
2 years, 5 months ago (2012-11-14 16:10:18 UTC) #5
rossberg
On 2012/11/14 16:10:18, adamk wrote: > On 2012/11/14 12:13:13, rossberg wrote: > > On 2012/11/14 ...
2 years, 5 months ago (2012-11-14 16:12:54 UTC) #6
adamk
Added test case.
2 years, 5 months ago (2012-11-14 16:29:25 UTC) #7
rossberg
2 years, 5 months ago (2012-11-14 16:48:19 UTC) #8
LGTM, landing...
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld e0e3771