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

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
« no previous file with comments | « Source/bindings/bindings.gypi ('k') | Source/bindings/v8/ScriptPromise.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/v8/ScriptPromise.h
diff --git a/Source/bindings/v8/ScriptPromise.h b/Source/bindings/v8/ScriptPromise.h
index c4f3e5dd07f88e8295eb7265bb111c55e873b965..4acdaad7e170b86427e44d6a04020203df1690fd 100644
--- a/Source/bindings/v8/ScriptPromise.h
+++ b/Source/bindings/v8/ScriptPromise.h
@@ -38,6 +38,8 @@
namespace WebCore {
+class ExecutionContext;
+
// ScriptPromise is the class for representing Promise values in C++ world.
// ScriptPromise holds a Promise.
// So holding a ScriptPromise as a member variable in DOM object causes
@@ -45,6 +47,7 @@ namespace WebCore {
//
class ScriptPromise {
public:
+ // Constructs an empty promise.
ScriptPromise()
: m_promise()
{
@@ -92,6 +95,11 @@ public:
m_promise.clear();
}
+ // Creates a pending promise.
abarth-chromium 2013/10/15 17:40:51 These comments aren't needed anymore. We can see
+ static ScriptPromise createPending();
+ // Creates a pending promise.
+ static ScriptPromise createPending(ExecutionContext*);
+
private:
ScriptValue m_promise;
};
« no previous file with comments | « Source/bindings/bindings.gypi ('k') | Source/bindings/v8/ScriptPromise.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698