| 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 ad0f11b1d9bf46d062554580886b5ca12c7cc158..0d099ccade7b45cb3ee7e2b38107e2ec856cc787 100644
|
| --- a/third_party/WebKit/Source/bindings/core/v8/V8GCController.cpp
|
| +++ b/third_party/WebKit/Source/bindings/core/v8/V8GCController.cpp
|
| @@ -135,7 +135,9 @@ class HeapSnaphotWrapperVisitor : public ScriptWrappableVisitor,
|
| : ScriptWrappableVisitor(isolate),
|
| m_currentParent(nullptr),
|
| m_onlyTraceSingleLevel(false),
|
| - m_firstScriptWrappableTraced(false) {}
|
| + m_firstScriptWrappableTraced(false) {
|
| + DCHECK(isMainThread());
|
| + }
|
|
|
| // Collect interesting V8 roots for the heap snapshot. Currently these are
|
| // DOM nodes.
|
| @@ -195,6 +197,14 @@ class HeapSnaphotWrapperVisitor : public ScriptWrappableVisitor,
|
| v8::HeapProfiler::RetainerEdges edges() { return std::move(m_edges); }
|
| v8::HeapProfiler::RetainerGroups groups() { return std::move(m_groups); }
|
|
|
| + void markWrappersInAllWorlds(
|
| + const ScriptWrappable* traceable) const override {
|
| + // Only mark the main thread wrapper as we cannot properly intercept
|
| + // DOMWrapperMap::markWrapper. This means that edges from the isolated
|
| + // worlds are missing in the snapshot.
|
| + traceable->markWrapper(this);
|
| + }
|
| +
|
| void markWrapper(const v8::PersistentBase<v8::Value>* value) const override {
|
| if (m_currentParent && m_currentParent != value)
|
| m_edges.push_back(std::make_pair(m_currentParent, value));
|
|
|