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

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

Issue 23479016: Introduce Promise mapping to the IDL generator (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 3 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/v8/ScriptPromise.h ('k') | Source/bindings/v8/ScriptPromiseResolver.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/v8/ScriptPromiseResolver.h
diff --git a/Source/bindings/v8/ScriptPromiseResolver.h b/Source/bindings/v8/ScriptPromiseResolver.h
index 18d30523fad4eef50394bc20bae123dba4888b14..e9d45ff6c31d90bc33b1d98bbb10e009afd694b2 100644
--- a/Source/bindings/v8/ScriptPromiseResolver.h
+++ b/Source/bindings/v8/ScriptPromiseResolver.h
@@ -33,6 +33,7 @@
#include "bindings/v8/ScopedPersistent.h"
#include "bindings/v8/ScriptObject.h"
+#include "bindings/v8/ScriptPromise.h"
#include "bindings/v8/ScriptState.h"
#include "bindings/v8/ScriptValue.h"
#include "wtf/RefPtr.h"
@@ -83,10 +84,10 @@ public:
// - The resolver's resolved flag is not set.
bool isPending() const;
- ScriptObject promise()
+ ScriptPromise promise()
{
ASSERT(v8::Context::InContext());
- return ScriptObject(ScriptState::current(), m_promise.newLocal(m_isolate));
+ return m_promise;
}
// Fulfill with a C++ object which can be converted to a v8 object by toV8.
@@ -110,7 +111,7 @@ private:
void reject(v8::Handle<v8::Value>);
v8::Isolate* m_isolate;
- ScopedPersistent<v8::Object> m_promise;
+ ScriptPromise m_promise;
haraken 2013/09/03 17:03:07 I still don't fully understand why this doesn't ca
yhirano 2013/09/04 02:14:15 Users of ScriptPromiseResolver should call detachP
ScopedPersistent<v8::Object> m_resolver;
bool isPendingInternal() const;
};
« no previous file with comments | « Source/bindings/v8/ScriptPromise.h ('k') | Source/bindings/v8/ScriptPromiseResolver.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698