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

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

Issue 2650783002: [wrapper-tracing] Fix V8GCController::getRetainerInfos (Closed)
Patch Set: Created 3 years, 11 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/V8GCController.cpp
diff --git a/third_party/WebKit/Source/bindings/core/v8/V8GCController.cpp b/third_party/WebKit/Source/bindings/core/v8/V8GCController.cpp
index 41f23cfed37cb64ccf6d6c5acda0b6852f99eae4..b16daebe6e96bc124db685c6833445219dd652fe 100644
--- a/third_party/WebKit/Source/bindings/core/v8/V8GCController.cpp
+++ b/third_party/WebKit/Source/bindings/core/v8/V8GCController.cpp
@@ -234,7 +234,7 @@ class HeapSnaphotWrapperVisitor : public ScriptWrappableVisitor,
v8::HeapProfiler::RetainerChildren findV8WrappersDirectlyReachableFrom(
Node* traceable) {
CHECK(m_foundV8Wrappers.empty());
- WTF::AutoReset<bool>(&m_onlyTraceSingleLevel, true);
+ WTF::AutoReset<bool> scope(&m_onlyTraceSingleLevel, true);
m_firstScriptWrappableTraced = false;
m_currentParent =
&v8::Persistent<v8::Value>::Cast(*traceable->rawMainWorldWrapper());
@@ -273,11 +273,12 @@ class HeapSnaphotWrapperVisitor : public ScriptWrappableVisitor,
// for the provided information itself.
v8::HeapProfiler::RetainerInfos V8GCController::getRetainerInfos(
v8::Isolate* isolate) {
- std::unique_ptr<HeapSnaphotWrapperVisitor> tracer(
- new HeapSnaphotWrapperVisitor(isolate));
V8PerIsolateData::TemporaryScriptWrappableVisitorScope scope(
- isolate, std::move(tracer));
+ isolate, std::unique_ptr<HeapSnaphotWrapperVisitor>(
+ new HeapSnaphotWrapperVisitor(isolate)));
+ HeapSnaphotWrapperVisitor* tracer =
+ reinterpret_cast<HeapSnaphotWrapperVisitor*>(scope.currentVisitor());
tracer->collectV8Roots();
tracer->traceV8Roots();
tracer->tracePendingActivities();
« 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