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

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

Issue 1771353010: Finish completeSweep before shutting down V8 (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
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 3f5bc4b53bbff891337742d899654d4d4a15d98b..bfc0bda59b4ea12f488263635f09a26e91ed8259 100644
--- a/third_party/WebKit/Source/bindings/core/v8/V8Initializer.cpp
+++ b/third_party/WebKit/Source/bindings/core/v8/V8Initializer.cpp
@@ -378,15 +378,14 @@ void V8Initializer::initializeMainThread()
if (v8::HeapProfiler* profiler = isolate->GetHeapProfiler())
profiler->SetWrapperClassInfoProvider(WrapperTypeInfo::NodeClassId, &RetainedDOMInfo::createRetainedDOMInfo);
- ASSERT(ThreadState::current());
- ThreadState::current()->addInterruptor(adoptPtr(new V8IsolateInterruptor(isolate)));
- ThreadState::current()->registerTraceDOMWrappers(isolate, V8GCController::traceDOMWrappers);
+ ASSERT(ThreadState::mainThreadState());
+ ThreadState::mainThreadState()->addInterruptor(adoptPtr(new V8IsolateInterruptor(isolate)));
+ ThreadState::mainThreadState()->registerTraceDOMWrappers(isolate, V8GCController::traceDOMWrappers);
}
void V8Initializer::shutdownMainThread()
{
ASSERT(isMainThread());
- ThreadState::current()->unregisterTraceDOMWrappers();
v8::Isolate* isolate = V8PerIsolateData::mainThreadIsolate();
V8PerIsolateData::willBeDestroyed(isolate);
V8PerIsolateData::destroy(isolate);

Powered by Google App Engine
This is Rietveld 408576698