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

Unified Diff: Source/bindings/core/v8/ScopedPersistent.h

Issue 806693004: Use new phantom handles for ScriptWrappable. Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Start using V8 phantom handles in Blink Created 5 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
Index: Source/bindings/core/v8/ScopedPersistent.h
diff --git a/Source/bindings/core/v8/ScopedPersistent.h b/Source/bindings/core/v8/ScopedPersistent.h
index 2bae0a6449b1ac4ad69115630935a0b5ab20febb..ccbc36b592099b2cf9c6883ffce8921e9debf0e1 100644
--- a/Source/bindings/core/v8/ScopedPersistent.h
+++ b/Source/bindings/core/v8/ScopedPersistent.h
@@ -63,6 +63,12 @@ public:
m_handle.SetWeak(parameters, callback);
}
+ template<typename P>
+ void setPhantom(P* parameters, void (*callback)(const v8::PhantomCallbackData<P>&))
+ {
+ m_handle.SetPhantom(parameters, callback);
+ }
+
bool isEmpty() const { return m_handle.IsEmpty(); }
bool isWeak() const { return m_handle.IsWeak(); }

Powered by Google App Engine
This is Rietveld 408576698