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 ba550a28e76deadff04231bc8ef97f5af452c36b..0b5e49c2c9ee1fb8589415e264a99a6f55a8fd16 100644 |
--- a/third_party/WebKit/Source/bindings/core/v8/V8GCController.cpp |
+++ b/third_party/WebKit/Source/bindings/core/v8/V8GCController.cpp |
@@ -202,8 +202,10 @@ class MajorGCWrapperVisitor : public v8::PersistentHandleVisitor { |
if (m_constructRetainedObjectInfos) |
m_groupsWhichNeedRetainerInfo.append(root); |
} else if (classId == WrapperTypeInfo::ObjectClassId) { |
- type->visitDOMWrapper(m_isolate, toScriptWrappable(wrapper), |
- v8::Persistent<v8::Object>::Cast(*value)); |
+ if (!RuntimeEnabledFeatures::traceWrappablesEnabled()) { |
+ type->visitDOMWrapper(m_isolate, toScriptWrappable(wrapper), |
+ v8::Persistent<v8::Object>::Cast(*value)); |
+ } |
} else { |
NOTREACHED(); |
} |
@@ -277,8 +279,8 @@ void objectGroupingForMajorGC(v8::Isolate* isolate, |
void gcPrologueForMajorGC(v8::Isolate* isolate, |
bool constructRetainedObjectInfos) { |
- // TODO(hlopko): Collect retained object infos for heap profiler |
- if (!RuntimeEnabledFeatures::traceWrappablesEnabled()) { |
+ if (!RuntimeEnabledFeatures::traceWrappablesEnabled() || |
+ constructRetainedObjectInfos) { |
objectGroupingForMajorGC(isolate, constructRetainedObjectInfos); |
} |
} |