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

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

Issue 26004002: Decouple ScriptPromise creation from ScriptPromiseResolver. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rebase Created 7 years, 2 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/ScriptPromise.h
diff --git a/Source/bindings/v8/ScriptPromise.h b/Source/bindings/v8/ScriptPromise.h
index c4f3e5dd07f88e8295eb7265bb111c55e873b965..e3d0da7841ef54273335507a94222b122729e2d5 100644
--- a/Source/bindings/v8/ScriptPromise.h
+++ b/Source/bindings/v8/ScriptPromise.h
@@ -45,6 +45,7 @@ namespace WebCore {
//
class ScriptPromise {
public:
+ // Constructs an empty promise.
ScriptPromise()
: m_promise()
{
@@ -92,6 +93,11 @@ public:
m_promise.clear();
}
+ // Creates a pending promise.
+ static ScriptPromise create();
+ // Creates a pending promise.
+ static ScriptPromise create(ScriptExecutionContext*);
abarth-chromium 2013/10/11 18:18:02 Rather than write comments like these, we prefer i
yhirano 2013/10/14 02:49:53 Done.
+
private:
ScriptValue m_promise;
};

Powered by Google App Engine
This is Rietveld 408576698