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

Issue 180773003: Simplify the way to initialize context (Closed)

Created:
6 years, 9 months ago by haraken
Modified:
6 years, 9 months ago
CC:
blink-reviews, Nils Barth (inactive), kojih, arv+blink, jsbell+bindings_chromium.org, sof, abarth-chromium, marja+watch_chromium.org, adamk+blink_chromium.org, Nate Chapin, Inactive
Visibility:
Public.

Description

Simplify the way to initialize context (Background: This is a preparation CL for making DOMWrapperWorld::current() callable from anywhere.) Currently, when we initialize a context, we need to call the following things in a proper order. - V8PerContextDataHolder::install() - V8PerContextData::create() - V8PerContextData::init() - gin::ContextHolder() - gin::ContextHolder::SetContext() However, this is more complicated than necessary. This CL refactors code so that we just need to call V8PerContextData::create() when initializing a context. Specifically, this CL does the following refactoring: - Move gin::ContextHolder from V8WindowShell/WorkerScriptController to V8PerContextData. - Remove V8_STORE_PRIMORDIAL macro. - Move the contents of V8PerContextData::init() to V8PerContextData's constructor. BUG=341032 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=168260

Patch Set 1 #

Total comments: 3

Patch Set 2 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+127 lines, -172 lines) Patch
M Source/bindings/v8/DOMWrapperWorld.h View 1 1 chunk +1 line, -1 line 0 comments Download
M Source/bindings/v8/ScriptPromiseResolverTest.cpp View 1 chunk +2 lines, -4 lines 0 comments Download
M Source/bindings/v8/ScriptPromiseTest.cpp View 1 chunk +2 lines, -4 lines 0 comments Download
M Source/bindings/v8/V8PerContextData.h View 1 3 chunks +13 lines, -73 lines 0 comments Download
M Source/bindings/v8/V8PerContextData.cpp View 1 3 chunks +76 lines, -29 lines 0 comments Download
M Source/bindings/v8/V8WindowShell.h View 4 chunks +2 lines, -6 lines 0 comments Download
M Source/bindings/v8/V8WindowShell.cpp View 1 16 chunks +26 lines, -38 lines 0 comments Download
M Source/bindings/v8/WorkerScriptController.h View 2 chunks +1 line, -3 lines 0 comments Download
M Source/bindings/v8/WorkerScriptController.cpp View 1 3 chunks +4 lines, -14 lines 0 comments Download

Messages

Total messages: 6 (0 generated)
haraken
PTAL Probably this CL is doing multiple things. I'm happy to split the CL into ...
6 years, 9 months ago (2014-02-28 11:14:05 UTC) #1
dcarney
lgtm
6 years, 9 months ago (2014-02-28 11:32:05 UTC) #2
haraken
Nit: I noticed that V8PerContextDataHolder is still necessary. At first I thought that the lifetime ...
6 years, 9 months ago (2014-03-03 00:49:56 UTC) #3
haraken
The CQ bit was checked by haraken@chromium.org
6 years, 9 months ago (2014-03-03 00:50:01 UTC) #4
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/haraken@chromium.org/180773003/20001
6 years, 9 months ago (2014-03-03 00:50:17 UTC) #5
commit-bot: I haz the power
6 years, 9 months ago (2014-03-03 03:45:45 UTC) #6
Message was sent while issue was closed.
Change committed as 168260

Powered by Google App Engine
This is Rietveld 408576698