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 1879f9d9d48e4418f904e75c22ab1c0e43df929d..68f47f322817a4a20bf0b42176e7b9f68f86d5da 100644 |
--- a/third_party/WebKit/Source/bindings/core/v8/V8Initializer.cpp |
+++ b/third_party/WebKit/Source/bindings/core/v8/V8Initializer.cpp |
@@ -366,7 +366,15 @@ void V8Initializer::initializeMainThread() |
ASSERT(ThreadState::mainThreadState()); |
ThreadState::mainThreadState()->addInterruptor(adoptPtr(new V8IsolateInterruptor(isolate))); |
- ThreadState::mainThreadState()->registerTraceDOMWrappers(isolate, V8GCController::traceDOMWrappers); |
+ if (RuntimeEnabledFeatures::traceWrappablesEnabled()) { |
+ ThreadState::mainThreadState()->registerTraceDOMWrappers(isolate, |
+ V8GCController::traceDOMWrappers, |
+ ScriptWrappableVisitor::invalidateDeadObjectsInMarkingDeque); |
+ } else { |
+ ThreadState::mainThreadState()->registerTraceDOMWrappers(isolate, |
+ V8GCController::traceDOMWrappers, |
+ nullptr); |
+ } |
V8PerIsolateData::from(isolate)->setThreadDebugger(adoptPtr(new MainThreadDebugger(isolate))); |
} |