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

Unified Diff: src/runtime/runtime-promise.cc

Issue 2589113002: [api] add API for Promise status and result. (Closed)
Patch Set: addressed comments Created 4 years 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 | « src/objects.cc ('k') | test/cctest/test-api.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/runtime/runtime-promise.cc
diff --git a/src/runtime/runtime-promise.cc b/src/runtime/runtime-promise.cc
index 656227d0c8b0238cb9c240e03f4dbcdfc4f3b689..d8e3dcaad3ee1fb21eab756a55a66d3e938739dd 100644
--- a/src/runtime/runtime-promise.cc
+++ b/src/runtime/runtime-promise.cc
@@ -109,7 +109,7 @@ void PromiseFulfill(Isolate* isolate, Handle<JSPromise> promise,
Handle<Smi> status, Handle<Object> value) {
// Check if there are any callbacks.
if (!promise->deferred()->IsUndefined(isolate)) {
- Handle<Object> tasks((status->value() == kPromiseFulfilled)
+ Handle<Object> tasks((status->value() == v8::Promise::kFulfilled)
? promise->fulfill_reactions()
: promise->reject_reactions(),
isolate);
@@ -131,7 +131,7 @@ RUNTIME_FUNCTION(Runtime_PromiseReject) {
PromiseRejectEvent(isolate, promise, promise, reason, debug_event);
- Handle<Smi> status(Smi::FromInt(kPromiseRejected), isolate);
+ Handle<Smi> status(Smi::FromInt(v8::Promise::kRejected), isolate);
PromiseFulfill(isolate, promise, status, reason);
return isolate->heap()->undefined_value();
}
« no previous file with comments | « src/objects.cc ('k') | test/cctest/test-api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698