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

Issue 303223004: Use InternalArray during ObservedArraySplice to avoid page script interfering with self-hosted code (Closed)

Created:
6 years, 6 months ago by rafaelw
Modified:
4 years, 9 months ago
Reviewers:
Toon Verwaest, adamk
CC:
v8-dev, adamk
Visibility:
Public.

Description

Use InternalArray during ObservedArraySplice to avoid page script interfering with self-hosted code. This also has the happy side-effect of speeding up observed array splices by about 20-30%, as it avoids copying the entire deleted_contents array. R=verwaest LOG=Y BUG=NONE

Patch Set 1 #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+4 lines, -6 lines) Patch
M src/array.js View 2 chunks +4 lines, -6 lines 2 comments Download

Messages

Total messages: 6 (0 generated)
rafaelw
6 years, 6 months ago (2014-05-29 20:23:12 UTC) #1
adamk
Seems like this could have a test?
6 years, 6 months ago (2014-05-29 23:52:18 UTC) #2
Toon Verwaest
https://codereview.chromium.org/303223004/diff/1/src/array.js File src/array.js (right): https://codereview.chromium.org/303223004/diff/1/src/array.js#newcode772 src/array.js:772: var deleted_elements = []; Now that you are fixing ...
6 years, 6 months ago (2014-06-02 09:31:15 UTC) #3
rafaelw
https://codereview.chromium.org/303223004/diff/1/src/array.js File src/array.js (right): https://codereview.chromium.org/303223004/diff/1/src/array.js#newcode772 src/array.js:772: var deleted_elements = []; So I tried doing this, ...
6 years, 6 months ago (2014-06-02 20:32:55 UTC) #4
rafaelw
ping Toon. I know that Adam asked for a test. I kind of feel like ...
6 years, 6 months ago (2014-06-04 17:56:55 UTC) #5
Toon Verwaest
6 years, 6 months ago (2014-06-05 14:03:31 UTC) #6
I think the fix for both the main path and the Object.observe path should be
done at the same time.

Is there any other reason than splice correctness why you did this fix? I agree
it should be fixed, but we should keep both paths in sync. If you don't have a
fix for the main path (which I can easily understand), I'd prefer to not fix the
Object.observe path for now either. (I personally don't plan on fixing it any
time soon though.)

Powered by Google App Engine
This is Rietveld 408576698