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

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

Issue 2673693003: [wrapper-tracing] Don't call into V8 during heap snapshot creation (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 | no next file » | 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 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));
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698