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

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

Issue 316453002: Use v8::Promise::Then in ScriptPromise::then. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rebase 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 | « LayoutTests/fast/js/Promise-native-then.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/v8/ScriptPromise.cpp
diff --git a/Source/bindings/v8/ScriptPromise.cpp b/Source/bindings/v8/ScriptPromise.cpp
index 11865ee4854c9fd76b572354a85ebfa60b06eca2..d6d8b317e0b17e3c8edd422653ad529b0f743488 100644
--- a/Source/bindings/v8/ScriptPromise.cpp
+++ b/Source/bindings/v8/ScriptPromise.cpp
@@ -79,11 +79,10 @@ ScriptPromise ScriptPromise::then(PassOwnPtr<ScriptFunction> onFulfilled, PassOw
// In fact it is not the exact bahavior of Promise.prototype.then
// but that is not a problem in this case.
v8::Local<v8::Promise> resultPromise = promise.As<v8::Promise>();
- // FIXME: Use Then once it is introduced.
if (!v8OnFulfilled.IsEmpty()) {
- resultPromise = resultPromise->Chain(v8OnFulfilled);
+ resultPromise = resultPromise->Then(v8OnFulfilled);
if (resultPromise.IsEmpty()) {
- // v8::Promise::Chain may return an empty value, for example when
+ // v8::Promise::Then may return an empty value, for example when
// the stack is exhausted.
return ScriptPromise();
}
« no previous file with comments | « LayoutTests/fast/js/Promise-native-then.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698