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

Issue 9716035: Make setting of accessors even more atomic. (Closed)

Created:
8 years, 9 months ago by Sven Panne
Modified:
8 years, 9 months ago
Reviewers:
Michael Starzinger
CC:
v8-dev
Visibility:
Public.

Description

Make setting of accessors even more atomic. Now the whole getter/setter/attributes triple gets created/set together, avoiding any hacks regarding previous values/attributes, making things a lot simpler. While doing this, an interesting problem surfaced, which has been there for a long time: After adding/changing acessors in slow mode, we could potentially fail going back to fast mode because of a failed memory allocation, signaling the need for a GC. But we have already changed the object in slow mode, so we are not idempotent and the retry would trigger a newly inserted assertion (namely, that the code obeys access restrictions). This has been solved by splitting the transformation to fast mode from the actual setting of the accessors. Committed: https://code.google.com/p/v8/source/detail?r=11112

Patch Set 1 #

Total comments: 8

Patch Set 2 : Incorporated review comments. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+68 lines, -86 lines) Patch
M src/api.cc View 1 1 chunk +4 lines, -1 line 0 comments Download
M src/objects.h View 1 3 chunks +17 lines, -20 lines 0 comments Download
M src/objects.cc View 1 14 chunks +38 lines, -39 lines 0 comments Download
M src/runtime.cc View 1 4 chunks +9 lines, -26 lines 0 comments Download

Messages

Total messages: 4 (0 generated)
Sven Panne
8 years, 9 months ago (2012-03-19 15:06:12 UTC) #1
Michael Starzinger
https://chromiumcodereview.appspot.com/9716035/diff/1/src/api.cc File src/api.cc (right): https://chromiumcodereview.appspot.com/9716035/diff/1/src/api.cc#newcode3069 src/api.cc:3069: i::JSObject::TransformToFastProperties(Utils::OpenHandle(this), 0); It would be nice not to have ...
8 years, 9 months ago (2012-03-21 12:33:08 UTC) #2
Sven Panne
Review comments addressed, please take another look... http://codereview.chromium.org/9716035/diff/1/src/api.cc File src/api.cc (right): http://codereview.chromium.org/9716035/diff/1/src/api.cc#newcode3069 src/api.cc:3069: i::JSObject::TransformToFastProperties(Utils::OpenHandle(this), 0); ...
8 years, 9 months ago (2012-03-21 13:14:18 UTC) #3
Michael Starzinger
8 years, 9 months ago (2012-03-23 09:01:26 UTC) #4
LGTM.

Powered by Google App Engine
This is Rietveld 408576698