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

Issue 11338048: Handle Object.observe notifications for setting Array.length (Closed)

Created:
8 years, 1 month ago by adamk
Modified:
8 years, 1 month ago
Reviewers:
rossberg, rafaelw
CC:
v8-dev
Base URL:
git@github.com:rafaelw/v8@master
Visibility:
Public.

Description

Handle Object.observe notifications for setting Array.length Also handles notification of deleted properties when an array is truncated by setting length. Committed: https://code.google.com/p/v8/source/detail?r=12905

Patch Set 1 #

Patch Set 2 : Better support for deleting callback properties #

Patch Set 3 : Fix sparse arrays #

Patch Set 4 : Merged with trunk #

Total comments: 6

Patch Set 5 : Respond to review, merged to trunk #

Total comments: 3

Patch Set 6 : Make use of unsigned wraparound in for loop #

Patch Set 7 : Add a test case for really truncating to zero #

Patch Set 8 : Clarify test todo #

Unified diffs Side-by-side diffs Delta from patch set Stats (+106 lines, -24 lines) Patch
M src/accessors.cc View 1 2 3 4 5 6 3 chunks +47 lines, -2 lines 0 comments Download
M src/objects.h View 1 2 3 4 2 chunks +6 lines, -5 lines 0 comments Download
M src/objects.cc View 1 2 3 4 7 chunks +18 lines, -17 lines 0 comments Download
M test/mjsunit/harmony/object-observe.js View 1 2 3 4 5 6 7 1 chunk +35 lines, -0 lines 0 comments Download

Messages

Total messages: 10 (0 generated)
adamk
Just sending out so folks can take a look, this will likely be rolled up ...
8 years, 1 month ago (2012-10-31 09:43:59 UTC) #1
adamk
Ready for review.
8 years, 1 month ago (2012-11-08 14:09:36 UTC) #2
rossberg
LGTM with nits. https://chromiumcodereview.appspot.com/11338048/diff/7001/src/accessors.cc File src/accessors.cc (right): https://chromiumcodereview.appspot.com/11338048/diff/7001/src/accessors.cc#newcode109 src/accessors.cc:109: while (end_index && end_index-- > new_length) ...
8 years, 1 month ago (2012-11-08 14:26:22 UTC) #3
adamk
https://chromiumcodereview.appspot.com/11338048/diff/7001/src/accessors.cc File src/accessors.cc (right): https://chromiumcodereview.appspot.com/11338048/diff/7001/src/accessors.cc#newcode109 src/accessors.cc:109: while (end_index && end_index-- > new_length) { Done, but ...
8 years, 1 month ago (2012-11-08 14:48:01 UTC) #4
rossberg
https://chromiumcodereview.appspot.com/11338048/diff/10002/src/accessors.cc File src/accessors.cc (right): https://chromiumcodereview.appspot.com/11338048/diff/10002/src/accessors.cc#newcode108 src/accessors.cc:108: for (uint32_t len = old_length; len > new_length; --len) ...
8 years, 1 month ago (2012-11-08 14:56:28 UTC) #5
adamk
https://chromiumcodereview.appspot.com/11338048/diff/10002/src/accessors.cc File src/accessors.cc (right): https://chromiumcodereview.appspot.com/11338048/diff/10002/src/accessors.cc#newcode108 src/accessors.cc:108: for (uint32_t len = old_length; len > new_length; --len) ...
8 years, 1 month ago (2012-11-08 15:11:22 UTC) #6
rossberg
https://chromiumcodereview.appspot.com/11338048/diff/10002/src/accessors.cc File src/accessors.cc (right): https://chromiumcodereview.appspot.com/11338048/diff/10002/src/accessors.cc#newcode108 src/accessors.cc:108: for (uint32_t len = old_length; len > new_length; --len) ...
8 years, 1 month ago (2012-11-08 15:16:12 UTC) #7
adamk
On 2012/11/08 15:11:22, adamk wrote: > https://chromiumcodereview.appspot.com/11338048/diff/10002/src/accessors.cc > File src/accessors.cc (right): > > https://chromiumcodereview.appspot.com/11338048/diff/10002/src/accessors.cc#newcode108 > ...
8 years, 1 month ago (2012-11-08 15:18:24 UTC) #8
adamk
Added a real truncation test case and added TODOs for arrays with dictionary elements.
8 years, 1 month ago (2012-11-08 15:37:05 UTC) #9
rossberg
8 years, 1 month ago (2012-11-08 15:59:34 UTC) #10
LGTM again, gonna land it.

Powered by Google App Engine
This is Rietveld 408576698