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

Unified Diff: src/js/async-await.js

Issue 2521723003: [promises] Remove IsPromise (Closed)
Patch Set: rebase again 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/debug/mirrors.js ('k') | src/js/promise.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/js/async-await.js
diff --git a/src/js/async-await.js b/src/js/async-await.js
index ea14db68eaddff2e7482e1168055af878f502614..221fdb881ab33738307a48b54c8c7151e32681b8 100644
--- a/src/js/async-await.js
+++ b/src/js/async-await.js
@@ -13,7 +13,6 @@
var AsyncFunctionNext;
var AsyncFunctionThrow;
-var IsPromise;
var CreateInternalPromiseCapability;
var PerformPromiseThen;
var PromiseCreate;
@@ -24,7 +23,6 @@ var ResolvePromise;
utils.Import(function(from) {
AsyncFunctionNext = from.AsyncFunctionNext;
AsyncFunctionThrow = from.AsyncFunctionThrow;
- IsPromise = from.IsPromise;
CreateInternalPromiseCapability = from.CreateInternalPromiseCapability;
PerformPromiseThen = from.PerformPromiseThen;
PromiseCreate = from.PromiseCreate;
@@ -46,7 +44,7 @@ var promiseHasHandlerSymbol =
// -------------------------------------------------------------------
function PromiseCastResolved(value) {
- if (IsPromise(value)) {
+ if (%is_promise(value)) {
return value;
} else {
var promise = PromiseCreate();
@@ -96,7 +94,7 @@ function AsyncFunctionAwait(generator, awaited, outerPromise) {
SET_PRIVATE(throwawayCapability.promise, promiseHasHandlerSymbol, true);
if (DEBUG_IS_ACTIVE) {
- if (IsPromise(awaited)) {
+ if (%is_promise(awaited)) {
// Mark the reject handler callback to be a forwarding edge, rather
// than a meaningful catch handler
SET_PRIVATE(onRejected, promiseForwardingHandlerSymbol, true);
@@ -120,7 +118,7 @@ function AsyncFunctionAwaitUncaught(generator, awaited, outerPromise) {
// Called by the parser from the desugaring of 'await' when catch
// prediction indicates that there is a locally surrounding catch block
function AsyncFunctionAwaitCaught(generator, awaited, outerPromise) {
- if (DEBUG_IS_ACTIVE && IsPromise(awaited)) {
+ if (DEBUG_IS_ACTIVE && %is_promise(awaited)) {
SET_PRIVATE(awaited, promiseHandledHintSymbol, true);
}
AsyncFunctionAwait(generator, awaited, outerPromise);
« no previous file with comments | « src/debug/mirrors.js ('k') | src/js/promise.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698