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/core/v8/ScriptPromise.h

Issue 361863003: Add a helper for implementing Promise-valued properties. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: More feedback. Keeping separate header file for now. Created 6 years, 6 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 | Source/bindings/core/v8/ScriptPromiseProperties.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/core/v8/ScriptPromise.h
diff --git a/Source/bindings/core/v8/ScriptPromise.h b/Source/bindings/core/v8/ScriptPromise.h
index c58e6f9afb5916bff38104eb9795f3ea66d95af8..46df6daa933f883859cab797c4a0157c5e68abbd 100644
--- a/Source/bindings/core/v8/ScriptPromise.h
+++ b/Source/bindings/core/v8/ScriptPromise.h
@@ -93,6 +93,16 @@ public:
m_promise.clear();
}
+ bool operator==(const ScriptPromise& value) const
+ {
+ return m_promise == value.m_promise;
+ }
+
+ bool operator!=(const ScriptPromise& value) const
+ {
+ return !operator==(value);
+ }
+
// Constructs and returns a ScriptPromise from |value|.
// if |value| is not a Promise object, returns a Promise object
// resolved with |value|.
« no previous file with comments | « no previous file | Source/bindings/core/v8/ScriptPromiseProperties.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698