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

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

Issue 1876383003: Introduce infrastructure for tracing ScriptWrappables. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Revert to traceActiveScriptWrappables - C++ is happier Created 4 years, 8 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 6535932fb074bff77eeaa177d48bfb8dc3a389f6..244269f515cc62d5d042052d3f0de8b6848316dc 100644
--- a/third_party/WebKit/Source/bindings/core/v8/V8Initializer.cpp
+++ b/third_party/WebKit/Source/bindings/core/v8/V8Initializer.cpp
@@ -31,6 +31,7 @@
#include "bindings/core/v8/ScriptCallStack.h"
#include "bindings/core/v8/ScriptController.h"
#include "bindings/core/v8/ScriptValue.h"
+#include "bindings/core/v8/ScriptWrappableHeapTracer.h"
#include "bindings/core/v8/V8Binding.h"
#include "bindings/core/v8/V8DOMException.h"
#include "bindings/core/v8/V8ErrorEvent.h"
@@ -320,6 +321,9 @@ static void initializeV8Common(v8::Isolate* isolate)
{
isolate->AddGCPrologueCallback(V8GCController::gcPrologue);
isolate->AddGCEpilogueCallback(V8GCController::gcEpilogue);
+ if (RuntimeEnabledFeatures::traceWrappablesEnabled()) {
+ isolate->SetEmbedderHeapTracer(new ScriptWrappableHeapTracer());
+ }
v8::Debug::SetLiveEditEnabled(isolate, false);

Powered by Google App Engine
This is Rietveld 408576698