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

Issue 116083006: Make Function.length and Function.name configurable properties. (Closed)

Created:
6 years, 11 months ago by sof
Modified:
6 years, 10 months ago
CC:
v8-dev
Base URL:
git://github.com/v8/v8.git@bleeding_edge
Visibility:
Public.

Description

Make Function.length and Function.name configurable properties. ES6 makes the Function object properties "length" and "name" configurable; switch the implementation over to follow that. Doing so exposed a problem in the handling of non-writable, but configurable properties backed by foreign callback accessors internally. As an optimization, if such an accessor property is re-defined with a new value, its setter was passed the new value directly, keeping the property as an accessor property. However, this is not correct should the property be non-writable, as its setter will then simply ignore the updated value. Adjust the enabling logic for this optimization accordingly, along with adding a test. LOG=N R=rossberg@chromium.org, rossberg BUG=v8:3045 Committed: https://code.google.com/p/v8/source/detail?r=19200

Patch Set 1 #

Total comments: 3

Patch Set 2 : Improve test changes somewhat #

Total comments: 2

Patch Set 3 : Make comment + predicate more precise/correct. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+148 lines, -26 lines) Patch
M src/bootstrapper.cc View 2 chunks +13 lines, -10 lines 0 comments Download
M src/runtime.cc View 1 chunk +6 lines, -3 lines 0 comments Download
M test/cctest/test-accessors.cc View 1 chunk +69 lines, -0 lines 0 comments Download
M test/mjsunit/harmony/object-observe.js View 1 2 4 chunks +40 lines, -9 lines 0 comments Download
M test/mjsunit/regress/regress-1530.js View 1 chunk +15 lines, -2 lines 0 comments Download
M test/mjsunit/regress/regress-270142.js View 1 chunk +1 line, -1 line 0 comments Download
M test/mjsunit/regress/regress-function-length-strict.js View 1 chunk +4 lines, -1 line 0 comments Download

Messages

Total messages: 12 (0 generated)
sof
At your leisure, please take a look. (Addressing issue that came up when changing writability ...
6 years, 11 months ago (2013-12-28 16:12:31 UTC) #1
rossberg
LGTM with comments https://codereview.chromium.org/116083006/diff/1/test/mjsunit/harmony/object-observe.js File test/mjsunit/harmony/object-observe.js (right): https://codereview.chromium.org/116083006/diff/1/test/mjsunit/harmony/object-observe.js#newcode994 test/mjsunit/harmony/object-observe.js:994: if (Object.getPrototypeOf(obj) && (prop in Object.getPrototypeOf(obj))) ...
6 years, 11 months ago (2014-01-09 12:26:39 UTC) #2
sof
https://codereview.chromium.org/116083006/diff/1/test/mjsunit/harmony/object-observe.js File test/mjsunit/harmony/object-observe.js (right): https://codereview.chromium.org/116083006/diff/1/test/mjsunit/harmony/object-observe.js#newcode994 test/mjsunit/harmony/object-observe.js:994: if (Object.getPrototypeOf(obj) && (prop in Object.getPrototypeOf(obj))) On 2014/01/09 12:26:39, ...
6 years, 11 months ago (2014-01-09 14:04:51 UTC) #3
rossberg
On 2014/01/09 14:04:51, sof wrote: > https://codereview.chromium.org/116083006/diff/1/test/mjsunit/harmony/object-observe.js > File test/mjsunit/harmony/object-observe.js (right): > > https://codereview.chromium.org/116083006/diff/1/test/mjsunit/harmony/object-observe.js#newcode994 > ...
6 years, 11 months ago (2014-01-09 14:59:24 UTC) #4
rossberg
https://codereview.chromium.org/116083006/diff/90001/test/mjsunit/harmony/object-observe.js File test/mjsunit/harmony/object-observe.js (right): https://codereview.chromium.org/116083006/diff/90001/test/mjsunit/harmony/object-observe.js#newcode989 test/mjsunit/harmony/object-observe.js:989: // prototype chain, only update it if it has ...
6 years, 11 months ago (2014-01-09 14:59:35 UTC) #5
sof
On 2014/01/09 14:59:35, rossberg wrote: > https://codereview.chromium.org/116083006/diff/90001/test/mjsunit/harmony/object-observe.js > File test/mjsunit/harmony/object-observe.js (right): > > https://codereview.chromium.org/116083006/diff/90001/test/mjsunit/harmony/object-observe.js#newcode989 > ...
6 years, 11 months ago (2014-01-09 15:28:15 UTC) #6
rossberg
LGTM, will land soon
6 years, 11 months ago (2014-01-09 15:32:06 UTC) #7
sof
On 2014/01/09 15:32:06, rossberg wrote: > LGTM, will land soon Delayed by other ES6 related ...
6 years, 10 months ago (2014-02-07 11:56:56 UTC) #8
rossberg
Committed patchset #3 manually as r19200 (presubmit successful).
6 years, 10 months ago (2014-02-07 14:55:57 UTC) #9
rossberg
On 2014/02/07 11:56:56, sof wrote: > On 2014/01/09 15:32:06, rossberg wrote: > > LGTM, will ...
6 years, 10 months ago (2014-02-07 14:57:31 UTC) #10
rossberg
On 2014/02/07 14:57:31, rossberg wrote: > On 2014/02/07 11:56:56, sof wrote: > > On 2014/01/09 ...
6 years, 10 months ago (2014-02-07 14:58:46 UTC) #11
sof
6 years, 10 months ago (2014-02-07 15:03:15 UTC) #12
Message was sent while issue was closed.
On 2014/02/07 14:58:46, rossberg wrote:
> On 2014/02/07 14:57:31, rossberg wrote:
> > On 2014/02/07 11:56:56, sof wrote:
> > > On 2014/01/09 15:32:06, rossberg wrote:
> > > > LGTM, will land soon
> > > 
> > > Delayed by other ES6 related changes?
> > 
> > No, just by the fact that the tree was closed for weeks due to the upcoming
> > Chrome branch, then me being sick for a week, and then having forgotten
about
> > it. :) Sorry, landed now.
> 
> PS: Please don't hesitate to ping if we don't land within a couple of days.

Excellent, thanks for doing that right away :)

Powered by Google App Engine
This is Rietveld 408576698