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

Unified Diff: third_party/WebKit/Source/core/workers/WorkerThread.cpp

Issue 1612093003: workers: Move where idle-tasks are turned on for v8::Isolate. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 | « 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/core/workers/WorkerThread.cpp
diff --git a/third_party/WebKit/Source/core/workers/WorkerThread.cpp b/third_party/WebKit/Source/core/workers/WorkerThread.cpp
index 687dbf3dc53099a51f6a8e422c901a8bc84c2980..89decc0d01f4d8fe1ff0ee6c2336dc5bd4de4440 100644
--- a/third_party/WebKit/Source/core/workers/WorkerThread.cpp
+++ b/third_party/WebKit/Source/core/workers/WorkerThread.cpp
@@ -287,9 +287,6 @@ void WorkerThread::initialize(PassOwnPtr<WorkerThreadStartupData> startupData)
backingThread().addTaskObserver(m_microtaskRunner.get());
m_isolate = initializeIsolate();
- if (RuntimeEnabledFeatures::v8IdleTasksEnabled()) {
- V8PerIsolateData::enableIdleTasks(m_isolate, adoptPtr(new V8IdleTaskRunner(m_webScheduler)));
- }
// Optimize for memory usage instead of latency for the worker isolate.
m_isolate->IsolateInBackgroundNotification();
m_workerGlobalScope = createWorkerGlobalScope(startupData);
@@ -487,7 +484,8 @@ v8::Isolate* WorkerThread::initializeIsolate()
OwnPtr<V8IsolateInterruptor> interruptor = adoptPtr(new V8IsolateInterruptor(isolate));
ThreadState::current()->addInterruptor(interruptor.release());
ThreadState::current()->registerTraceDOMWrappers(isolate, V8GCController::traceDOMWrappers);
-
+ if (RuntimeEnabledFeatures::v8IdleTasksEnabled())
+ V8PerIsolateData::enableIdleTasks(isolate, adoptPtr(new V8IdleTaskRunner(m_webScheduler)));
return isolate;
}
« 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