Chromium Code Reviews| 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..ff0d71f4f8e33edfea4f877c2dd5c906611e6d2e 100644 |
| --- a/third_party/WebKit/Source/bindings/core/v8/V8GCController.cpp |
| +++ b/third_party/WebKit/Source/bindings/core/v8/V8GCController.cpp |
| @@ -195,6 +195,13 @@ 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 { |
|
haraken
2017/02/03 03:55:45
What happens if this is called on a worker thread?
Michael Lippautz
2017/02/03 04:49:36
Snapshots can only be created from the main thread
|
| + // Only mark the main thread wrapper as we cannot properly intercept |
| + // DOMWrapperMap::markWrapper. |
|
haraken
2017/02/03 03:55:45
Also explain that this means that we won't be able
Michael Lippautz
2017/02/03 04:49:36
Done.
|
| + 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)); |