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

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

Issue 1257723002: Simplify ownership of a ThreadState's interruptors. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 5 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
Index: Source/core/workers/WorkerThread.cpp
diff --git a/Source/core/workers/WorkerThread.cpp b/Source/core/workers/WorkerThread.cpp
index 845c6a77162bde9868748b97dc1360e8543fbd58..715e207c9239d53846748d25f3a24f48b892bda2 100644
--- a/Source/core/workers/WorkerThread.cpp
+++ b/Source/core/workers/WorkerThread.cpp
@@ -439,8 +439,7 @@ v8::Isolate* WorkerThread::initializeIsolate()
v8::Isolate* isolate = V8PerIsolateData::initialize();
V8Initializer::initializeWorker(isolate);
- m_interruptor = adoptPtr(new V8IsolateInterruptor(isolate));
- ThreadState::current()->addInterruptor(m_interruptor.get());
+ ThreadState::current()->addInterruptor(new V8IsolateInterruptor(isolate));
ThreadState::current()->registerTraceDOMWrappers(isolate, V8GCController::traceDOMWrappers);
return isolate;
@@ -451,7 +450,6 @@ void WorkerThread::willDestroyIsolate()
ASSERT(isCurrentThread());
ASSERT(m_isolate);
V8PerIsolateData::willBeDestroyed(m_isolate);
- ThreadState::current()->removeInterruptor(m_interruptor.get());
}
void WorkerThread::destroyIsolate()

Powered by Google App Engine
This is Rietveld 408576698