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

Issue 606062: Fix construction of simple objects with setters on prototype... (Closed)

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

Description

Fix construction of simple objects with setters on prototype Simple objects which are constructed without calling the actual constructor function did not take setters defined on prototype chain of the new object into account. Constructing objects this way is now not done if there are setters involved on the prototype chain of the new object. This only fixes the case where the setter is found when the first object from a constructor is created. If the prototype chain is changed new objects will on take any change to setters into account. TEST=test/mjsunit/setter-on-constructor-prototype.js Committed: http://code.google.com/p/v8/source/detail?r=3879

Patch Set 1 #

Total comments: 2

Patch Set 2 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+159 lines, -10 lines) Patch
M src/heap.cc View 1 1 chunk +4 lines, -3 lines 0 comments Download
M src/objects.h View 1 chunk +2 lines, -0 lines 0 comments Download
M src/objects.cc View 1 chunk +55 lines, -0 lines 0 comments Download
M src/runtime.cc View 2 chunks +8 lines, -7 lines 0 comments Download
A test/mjsunit/setter-on-constructor-prototype.js View 1 chunk +90 lines, -0 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
Søren Thygesen Gjesse
10 years, 10 months ago (2010-02-16 17:37:58 UTC) #1
Mads Ager (chromium)
LGTM If it turns out to be important we could disable the optimization only if ...
10 years, 10 months ago (2010-02-16 18:46:40 UTC) #2
Søren Thygesen Gjesse
10 years, 10 months ago (2010-02-17 06:19:17 UTC) #3
http://codereview.chromium.org/606062/diff/1/3
File src/heap.cc (right):

http://codereview.chromium.org/606062/diff/1/3#newcode2392
src/heap.cc:2392: if (FLAG_inline_new &&
On 2010/02/16 18:46:40, Mads Ager wrote:
> move this '&&' to the next line as well.

Done.

Powered by Google App Engine
This is Rietveld 408576698