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

Unified Diff: third_party/WebKit/Source/bindings/core/v8/V8Initializer.cpp

Issue 2624033002: Tolerate a null WebScheduler in utility process V8 initialization (Closed)
Patch Set: . Created 3 years, 11 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 | « gin/per_isolate_data.cc ('k') | third_party/WebKit/Source/bindings/core/v8/V8PerIsolateData.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/bindings/core/v8/V8Initializer.cpp
diff --git a/third_party/WebKit/Source/bindings/core/v8/V8Initializer.cpp b/third_party/WebKit/Source/bindings/core/v8/V8Initializer.cpp
index b49db8f4544d9fcc501eebe93b9c73c89e957656..347c27bc822eeade5ec98a269aec2b81f2afe953 100644
--- a/third_party/WebKit/Source/bindings/core/v8/V8Initializer.cpp
+++ b/third_party/WebKit/Source/bindings/core/v8/V8Initializer.cpp
@@ -392,9 +392,11 @@ void V8Initializer::initializeMainThread() {
gin::IsolateHolder::Initialize(gin::IsolateHolder::kNonStrictMode,
v8ExtrasMode, &arrayBufferAllocator);
+ // NOTE: Some threads (namely utility threads) don't have a scheduler.
WebScheduler* scheduler = Platform::current()->currentThread()->scheduler();
- v8::Isolate* isolate =
- V8PerIsolateData::initialize(scheduler->timerTaskRunner());
+ v8::Isolate* isolate = V8PerIsolateData::initialize(
+ scheduler ? scheduler->timerTaskRunner()
+ : Platform::current()->currentThread()->getWebTaskRunner());
initializeV8Common(isolate);
« no previous file with comments | « gin/per_isolate_data.cc ('k') | third_party/WebKit/Source/bindings/core/v8/V8PerIsolateData.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698