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

Issue 7067019: Handle changes to the Object prototype in fast handling of arrays (Closed)

Created:
9 years, 7 months ago by Søren Thygesen Gjesse
Modified:
9 years, 7 months ago
CC:
v8-dev
Visibility:
Public.

Description

Handle changes to the Object prototype in fast handling of arrays R=ager@chromium.org BUG=v8:1403 TEST=test/mjsunit/regress/regress-1403.js Committed: http://code.google.com/p/v8/source/detail?r=8032

Patch Set 1 #

Total comments: 13

Patch Set 2 : Addressed review comments #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+37 lines, -2 lines) Patch
M src/builtins.cc View 1 chunk +1 line, -2 lines 1 comment Download
A test/mjsunit/regress/regress-1403.js View 1 1 chunk +36 lines, -0 lines 0 comments Download

Messages

Total messages: 5 (0 generated)
Søren Thygesen Gjesse
9 years, 7 months ago (2011-05-24 08:56:15 UTC) #1
Mads Ager (chromium)
LGTM, Anton, could you double check that the behavior will be correct with this change?
9 years, 7 months ago (2011-05-24 08:59:49 UTC) #2
antonm
LGTM too. http://codereview.chromium.org/7067019/diff/1/src/builtins.cc File src/builtins.cc (right): http://codereview.chromium.org/7067019/diff/1/src/builtins.cc#newcode369 src/builtins.cc:369: // This method depends on non writability ...
9 years, 7 months ago (2011-05-24 10:38:20 UTC) #3
Søren Thygesen Gjesse
http://codereview.chromium.org/7067019/diff/1/src/builtins.cc File src/builtins.cc (right): http://codereview.chromium.org/7067019/diff/1/src/builtins.cc#newcode369 src/builtins.cc:369: // This method depends on non writability of Object ...
9 years, 7 months ago (2011-05-24 12:25:52 UTC) #4
antonm
9 years, 7 months ago (2011-05-24 12:33:59 UTC) #5
Still LGTM

http://codereview.chromium.org/7067019/diff/1/src/builtins.cc
File src/builtins.cc (right):

http://codereview.chromium.org/7067019/diff/1/src/builtins.cc#newcode379
src/builtins.cc:379: if (array_proto !=
global_context->initial_object_prototype()) return false;
Sorry, I mean JSObject::cast and != global_context->initial_object_prototype()
check.  But if don't allow anything except for null and JSObject as a prototype
value, then it's not mandatory.

On 2011/05/24 12:25:52, Søren Gjesse wrote:
> On 2011/05/24 10:38:20, antonm wrote:
> > while you're here, may you swap these two lines?  I am concerned with the
> > following case: Array.prototype.__proto__ = 2;
> 
> Not sure which two lines you mean. Also
> 
>   Array.prototype.__proto__ = 2
> 
> does not have any effect.

http://codereview.chromium.org/7067019/diff/3002/src/builtins.cc#newcode369
src/builtins.cc:369: // This method depends on non writability of Object and
Array prototype
just fyi, this comment is still here

Powered by Google App Engine
This is Rietveld 408576698