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

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

Issue 2033583007: Store ScriptWrappableVisitor in V8PerIsolateData (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: No need to deinitialize Created 4 years, 6 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 | third_party/WebKit/Source/bindings/core/v8/V8PerIsolateData.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 f2c049db85f3b606f91f425b876d1cb1ad19f2a5..e497d249a45da84872f7d5c354dd45e24a10c595 100644
--- a/third_party/WebKit/Source/bindings/core/v8/V8Initializer.cpp
+++ b/third_party/WebKit/Source/bindings/core/v8/V8Initializer.cpp
@@ -290,8 +290,9 @@ static void initializeV8Common(v8::Isolate* isolate)
isolate->AddGCPrologueCallback(V8GCController::gcPrologue);
isolate->AddGCEpilogueCallback(V8GCController::gcEpilogue);
if (RuntimeEnabledFeatures::traceWrappablesEnabled()) {
- ScriptWrappableVisitor* visitor = new ScriptWrappableVisitor(isolate);
- isolate->SetEmbedderHeapTracer(visitor);
+ std::unique_ptr<ScriptWrappableVisitor> visitor(new ScriptWrappableVisitor(isolate));
+ isolate->SetEmbedderHeapTracer(visitor.get());
+ V8PerIsolateData::from(isolate)->setScriptWrappableVisitor(std::move(visitor));
}
v8::Debug::SetLiveEditEnabled(isolate, false);
« no previous file with comments | « no previous file | third_party/WebKit/Source/bindings/core/v8/V8PerIsolateData.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698