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

Issue 6531037: Use [[DefineOwnProperty]] to put 'constructor' field on the protoype object. (Closed)

Created:
9 years, 10 months ago by antonm
Modified:
9 years, 4 months ago
CC:
v8-dev
Visibility:
Public.

Description

Use [[DefineOwnProperty]] to put 'constructor' field on the protoype object. That better follows ECMA-262 (see 13.2 Creating Function Objects) and allows to ignore nasty JS accessors for 'constructor' property. BUG=v8:1172 TEST=test/mjsunit/regress/regress-1172.js Committed: http://code.google.com/p/v8/source/detail?r=6849

Patch Set 1 #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+49 lines, -3 lines) Patch
M src/heap.cc View 1 chunk +2 lines, -3 lines 0 comments Download
M src/runtime.cc View 1 chunk +1 line, -0 lines 2 comments Download
M test/mjsunit/mjsunit.js View 1 chunk +7 lines, -0 lines 0 comments Download
A test/mjsunit/regress/regress-1172.js View 1 chunk +39 lines, -0 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
antonm
Mads, may you have a look?
9 years, 10 months ago (2011-02-17 19:49:07 UTC) #1
Mads Ager (chromium)
LGTM! http://codereview.chromium.org/6531037/diff/1/src/runtime.cc File src/runtime.cc (right): http://codereview.chromium.org/6531037/diff/1/src/runtime.cc#newcode6930 src/runtime.cc:6930: RETURN_IF_EMPTY_HANDLE(result); Shouldn't we be able to create a ...
9 years, 10 months ago (2011-02-17 20:55:41 UTC) #2
antonm
9 years, 10 months ago (2011-02-18 10:40:28 UTC) #3
http://codereview.chromium.org/6531037/diff/1/src/runtime.cc
File src/runtime.cc (right):

http://codereview.chromium.org/6531037/diff/1/src/runtime.cc#newcode6930
src/runtime.cc:6930: RETURN_IF_EMPTY_HANDLE(result);
On 2011/02/17 20:55:41, Mads Ager wrote:
> Shouldn't we be able to create a test case for this. The change looks good,
but
> can we test it?

I quickly inspected the code and apparently now it's impossible to throw an
exception, so I cannot imagine a regression test for it right now.

Good news is I first added this check and got an expected exception and only
then changes semantics of constructor property installation.

Still I cannot think of a regression test for this line right now.

Powered by Google App Engine
This is Rietveld 408576698