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

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

Issue 1876383003: Introduce infrastructure for tracing ScriptWrappables. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Incorporate Haraken's wonderful comments Created 4 years, 8 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
Index: third_party/WebKit/Source/bindings/core/v8/ScriptWrappable.cpp
diff --git a/third_party/WebKit/Source/bindings/core/v8/ScriptWrappable.cpp b/third_party/WebKit/Source/bindings/core/v8/ScriptWrappable.cpp
index 3534a4ebfb5d2b1cd83854203e91f08945483b90..f93e985399aaf1c5f4538b0c320fe860df1fd053 100644
--- a/third_party/WebKit/Source/bindings/core/v8/ScriptWrappable.cpp
+++ b/third_party/WebKit/Source/bindings/core/v8/ScriptWrappable.cpp
@@ -35,4 +35,9 @@ v8::Local<v8::Object> ScriptWrappable::associateWithWrapper(v8::Isolate* isolate
return V8DOMWrapper::associateObjectWithWrapper(isolate, this, wrapperTypeInfo, wrapper);
}
+void ScriptWrappable::markWrapperAlive(const v8::Persistent<v8::Object>& handle, v8::Isolate* isolate)
haraken 2016/04/13 12:26:22 I think this static method should be moved to Scri
Marcel Hlopko 2016/04/14 16:39:08 Agreed. Done.
+{
+ handle.RegisterExternalReference(isolate);
haraken 2016/04/13 12:26:22 This will keep alive the wrapper of the main world
Marcel Hlopko 2016/04/14 16:39:08 For the first version, let's mark wrappers from al
haraken 2016/04/15 01:28:16 This sounds like a good plan. For the first versio
+}
+
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698