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

Issue 11377171: Object.observe: Use [[DefineOwnProperty]] to create properties of changeRecord (Closed)

Created:
8 years, 1 month ago by rafaelw
Modified:
8 years, 1 month ago
CC:
v8-dev
Base URL:
git://github.com/v8/v8.git@bleeding_edge
Visibility:
Public.

Description

Object.observe: Use [[DefineOwnProperty]] to create properties of changeRecord. Note: The test here requires https://codereview.chromium.org/11364237/ to land in order to pass because Object.freeze calls Object.getOwnPropertyNames(). BUG=v8:2411 Committed: https://code.google.com/p/v8/source/detail?r=12983

Patch Set 1 #

Total comments: 2

Patch Set 2 : removing InternalObject* #

Total comments: 2

Patch Set 3 : cr changes #

Patch Set 4 : formatting #

Unified diffs Side-by-side diffs Delta from patch set Stats (+24 lines, -9 lines) Patch
M src/object-observe.js View 1 2 3 5 chunks +7 lines, -8 lines 0 comments Download
M test/mjsunit/harmony/object-observe.js View 1 2 1 chunk +17 lines, -1 line 0 comments Download

Messages

Total messages: 5 (0 generated)
rafaelw
8 years, 1 month ago (2012-11-14 22:26:40 UTC) #1
adamk
https://codereview.chromium.org/11377171/diff/1/src/object-observe.js File src/object-observe.js (right): https://codereview.chromium.org/11377171/diff/1/src/object-observe.js#newcode32 src/object-observe.js:32: var InternalObjectDefineProperty = $Object.defineProperty; Not sure these are worth ...
8 years, 1 month ago (2012-11-14 22:32:24 UTC) #2
rafaelw
https://codereview.chromium.org/11377171/diff/1/src/object-observe.js File src/object-observe.js (right): https://codereview.chromium.org/11377171/diff/1/src/object-observe.js#newcode32 src/object-observe.js:32: var InternalObjectDefineProperty = $Object.defineProperty; Removed. On 2012/11/14 22:32:24, adamk ...
8 years, 1 month ago (2012-11-14 22:40:56 UTC) #3
rossberg
LGTM, with nit. https://codereview.chromium.org/11377171/diff/5001/src/object-observe.js File src/object-observe.js (right): https://codereview.chromium.org/11377171/diff/5001/src/object-observe.js#newcode165 src/object-observe.js:165: ObjectDefineProperty(newRecord, prop, { You should be ...
8 years, 1 month ago (2012-11-15 14:16:34 UTC) #4
rafaelw
8 years, 1 month ago (2012-11-15 17:15:43 UTC) #5
https://codereview.chromium.org/11377171/diff/5001/src/object-observe.js
File src/object-observe.js (right):

https://codereview.chromium.org/11377171/diff/5001/src/object-observe.js#newc...
src/object-observe.js:165: ObjectDefineProperty(newRecord, prop, {
done.

On 2012/11/15 14:16:34, rossberg wrote:
> You should be able to use
> 
> %DefineOrRedefineDataProperty(newRecord, prop, changeRecord[prop], READ_ONLY +
> DONT_DELETE)
> 
> which has less overhead.

Powered by Google App Engine
This is Rietveld 408576698