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

Unified Diff: third_party/WebKit/Source/web/WebKit.cpp

Issue 1775563004: Move ModuleInitializer::init out of initializeWithoutV8 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/web/WebKit.cpp
diff --git a/third_party/WebKit/Source/web/WebKit.cpp b/third_party/WebKit/Source/web/WebKit.cpp
index 0b34d329fe1731ff74d23c781dd3704634a42e34..1e9e2820431af885fee57d2c9f2e039bf41967de 100644
--- a/third_party/WebKit/Source/web/WebKit.cpp
+++ b/third_party/WebKit/Source/web/WebKit.cpp
@@ -92,10 +92,20 @@ static GCTaskRunner* s_gcTaskRunner = nullptr;
// Doing so may cause hard to reproduce crashes.
static bool s_webKitInitialized = false;
+static ModulesInitializer& modulesInitializer()
+{
+ DEFINE_STATIC_LOCAL(OwnPtr<ModulesInitializer>, initializer, (adoptPtr(new ModulesInitializer)));
+ return *initializer;
+}
+
void initialize(Platform* platform)
{
initializeWithoutV8(platform);
+ modulesInitializer().init();
+
+ setIndexedDBClientCreateFunction(IndexedDBClientImpl::create);
yhirano 2016/03/08 07:05:24 [optional] Can we move this function call to Modul
+
V8Initializer::initializeMainThreadIfNeeded();
OwnPtr<V8IsolateInterruptor> interruptor = adoptPtr(new V8IsolateInterruptor(V8PerIsolateData::mainThreadIsolate()));
@@ -141,12 +151,6 @@ static void adjustAmountOfExternalAllocatedMemory(int size)
v8::Isolate::GetCurrent()->AdjustAmountOfExternalAllocatedMemory(size);
}
-static ModulesInitializer& modulesInitializer()
-{
- DEFINE_STATIC_LOCAL(OwnPtr<ModulesInitializer>, initializer, (adoptPtr(new ModulesInitializer)));
- return *initializer;
-}
-
void initializeWithoutV8(Platform* platform)
{
ASSERT(!s_webKitInitialized);
@@ -166,10 +170,6 @@ void initializeWithoutV8(Platform* platform)
ASSERT(!s_gcTaskRunner);
s_gcTaskRunner = new GCTaskRunner(currentThread);
}
-
- modulesInitializer().init();
-
- setIndexedDBClientCreateFunction(IndexedDBClientImpl::create);
}
void shutdown()
@@ -212,14 +212,14 @@ void shutdown()
V8PerIsolateData::destroy(isolate);
+ modulesInitializer().shutdown();
+
shutdownWithoutV8();
}
void shutdownWithoutV8()
{
ASSERT(isMainThread());
- modulesInitializer().shutdown();
-
// currentThread() is null if we are running on a thread without a message loop.
if (Platform::current()->currentThread()) {
ASSERT(s_gcTaskRunner);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698