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

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

Created:
8 years, 1 month ago by adamk
Modified:
8 years, 1 month 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

Messages

Total messages: 8 (0 generated)
adamk
8 years, 1 month 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 ...
8 years, 1 month 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.
8 years, 1 month 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: ...
8 years, 1 month 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 ...
8 years, 1 month 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 ...
8 years, 1 month ago (2012-11-14 16:12:54 UTC) #6
adamk
Added test case.
8 years, 1 month ago (2012-11-14 16:29:25 UTC) #7
rossberg
8 years, 1 month ago (2012-11-14 16:48:19 UTC) #8
LGTM, landing...

Powered by Google App Engine
This is Rietveld 408576698