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

Issue 8536042: Extension state made per-siolate in genesis (Closed)

Created:
9 years, 1 month ago by Dmitry Lomov (no reviews)
Modified:
9 years, 1 month ago
Reviewers:
Vitaly Repeshko, danno
CC:
v8-dev
Visibility:
Public.

Description

Extension state made per-siolate in genesis BUG=http://code.google.com/p/v8/issues/detail?id=1821 Committed: http://code.google.com/p/v8/source/detail?r=10001

Patch Set 1 #

Total comments: 12

Patch Set 2 : CR comments addressed #

Patch Set 3 : Self-review #

Total comments: 8

Patch Set 4 : Get rid of static allocator #

Patch Set 5 : More CR feedback #

Unified diffs Side-by-side diffs Delta from patch set Stats (+142 lines, -35 lines) Patch
M src/api.h View 1 2 2 chunks +0 lines, -7 lines 0 comments Download
M src/api.cc View 1 2 1 chunk +1 line, -1 line 0 comments Download
M src/bootstrapper.cc View 1 2 3 4 6 chunks +70 lines, -22 lines 0 comments Download
M src/isolate.h View 1 2 3 4 2 chunks +7 lines, -0 lines 0 comments Download
M src/isolate.cc View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M src/serialize.cc View 1 1 chunk +2 lines, -5 lines 0 comments Download
M test/cctest/test-lockers.cc View 1 2 3 4 1 chunk +61 lines, -0 lines 0 comments Download

Messages

Total messages: 8 (0 generated)
Dmitry Lomov (no reviews)
Fix for http://code.google.com/p/v8/issues/detail?id=1821
9 years, 1 month ago (2011-11-12 00:14:43 UTC) #1
danno
LGTM with nit, although I'd like Vitaly to take a quick look before you land ...
9 years, 1 month ago (2011-11-15 09:46:47 UTC) #2
Vitaly Repeshko
http://codereview.chromium.org/8536042/diff/1/src/api.cc File src/api.cc (right): http://codereview.chromium.org/8536042/diff/1/src/api.cc#newcode505 src/api.cc:505: nit: Remove one blank line. http://codereview.chromium.org/8536042/diff/1/src/api.cc#newcode509 src/api.cc:509: reinterpret_cast<uint32_t>(extension)); I'm ...
9 years, 1 month ago (2011-11-15 18:14:17 UTC) #3
Dmitry Lomov (no reviews)
Some replies to the comments. I'll address the ones I didn't reply to. On 2011/11/15 ...
9 years, 1 month ago (2011-11-15 18:34:43 UTC) #4
Dmitry Lomov (no reviews)
On 2011/11/15 18:34:43, Dmitry Lomov (chromium) wrote: > > http://codereview.chromium.org/8536042/diff/1/src/api.cc#newcode534 > > src/api.cc:534: reinterpret_cast<int>(entry->value)); > ...
9 years, 1 month ago (2011-11-15 18:42:50 UTC) #5
Dmitry Lomov (no reviews)
Thanks Vitaly for a careful review! Much more contained patch now, ExtensionStates are not exposed ...
9 years, 1 month ago (2011-11-15 21:59:20 UTC) #6
Dmitry Lomov (no reviews)
One more thing fixed. ExtensionStates might be allocated from different threads simultaniously,and a racy static ...
9 years, 1 month ago (2011-11-15 22:11:51 UTC) #7
Vitaly Repeshko
9 years, 1 month ago (2011-11-15 22:13:02 UTC) #8
LGTM with a few nits and one real comment.

Thanks!


-- Vitaly

http://codereview.chromium.org/8536042/diff/10001/src/bootstrapper.cc
File src/bootstrapper.cc (right):

http://codereview.chromium.org/8536042/diff/10001/src/bootstrapper.cc#newcode214
src/bootstrapper.cc:214: enum ExtensionTraversalState {
nit: Insert a blank line.

http://codereview.chromium.org/8536042/diff/10001/src/bootstrapper.cc#newcode226
src/bootstrapper.cc:226: };
nit: DISALLOW_COPY_AND_ASSIGN.

http://codereview.chromium.org/8536042/diff/10001/src/bootstrapper.cc#newcode...
src/bootstrapper.cc:1955: return v8::internal::ComputeIntegerHash(
Oh, actually there's already ComputePointerHash in utils.h :)

http://codereview.chromium.org/8536042/diff/10001/src/bootstrapper.cc#newcode...
src/bootstrapper.cc:1969: : map_(MatchRegisteredExtensions,
ExtensionStatesAllocator(), 8)
... and does the default allocator (if you omit args 2 and 3 here) work?

http://codereview.chromium.org/8536042/diff/10001/src/bootstrapper.cc#newcode...
src/bootstrapper.cc:1983: Genesis::ExtensionTraversalState state) {
nit: Formatting.

http://codereview.chromium.org/8536042/diff/10001/src/bootstrapper.cc#newcode...
src/bootstrapper.cc:2041: bool
Genesis::InstallExtension(v8::RegisteredExtension* current, ExtensionStates*
extension_states) {
nit: Formatting.

http://codereview.chromium.org/8536042/diff/10001/src/isolate.h
File src/isolate.h (right):

http://codereview.chromium.org/8536042/diff/10001/src/isolate.h#newcode898
src/isolate.h:898: void extension_installed() {
Something UpperCase here, e.g. NotifyExtensionInstalled().

http://codereview.chromium.org/8536042/diff/10001/src/isolate.h#newcode1165
src/isolate.h:1165: bool has_installed_extensions_;
Is this initialized somewhere?

Powered by Google App Engine
This is Rietveld 408576698