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

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

Issue 23254004: Implement ScriptPromise and ScriptFunction (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Control shouldn't reach the end of a non-void function Created 7 years, 4 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/v8/ScopedPersistent.h
diff --git a/Source/bindings/v8/ScopedPersistent.h b/Source/bindings/v8/ScopedPersistent.h
index faef97d9451ac5489b571cbc877a19310b130814..5264a91a9b8fa90deda90525803cfd3e97b4914b 100644
--- a/Source/bindings/v8/ScopedPersistent.h
+++ b/Source/bindings/v8/ScopedPersistent.h
@@ -64,6 +64,7 @@ public:
}
bool isEmpty() const { return m_handle.IsEmpty(); }
+ bool isWeak() const { return m_handle.IsWeak(); }
void set(v8::Isolate* isolate, v8::Handle<T> handle)
{
@@ -84,6 +85,12 @@ public:
return m_handle == other.m_handle;
}
+ template <class S>
+ bool operator==(const v8::Handle<S> other) const
+ {
+ return m_handle == other;
+ }
+
private:
// FIXME: This function does an unsafe handle access. Remove it.
friend class V8AbstractEventListener;

Powered by Google App Engine
This is Rietveld 408576698