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

Unified Diff: src/promise-utils.h

Issue 2541283002: [promises] Port ResolvePromise to TF (Closed)
Patch Set: fix nits 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
Index: src/promise-utils.h
diff --git a/src/promise-utils.h b/src/promise-utils.h
index 6ed6fcde5f2188c4668fc7330cb70613d5719c3b..b63b4ab58a2e1bd172ad96e931ee91c72bfade0b 100644
--- a/src/promise-utils.h
+++ b/src/promise-utils.h
@@ -5,6 +5,7 @@
#ifndef V8_PROMISE_UTILS_H_
#define V8_PROMISE_UTILS_H_
+#include "src/contexts.h"
#include "src/objects.h"
namespace v8 {
@@ -13,6 +14,19 @@ namespace internal {
// Helper methods for Promise builtins.
class PromiseUtils : public AllStatic {
public:
+ enum PromiseResolvingFunctionContextSlot {
+ // Whether the resolve/reject callback was already called.
+ kAlreadyVisitedSlot = Context::MIN_CONTEXT_SLOTS,
+
+ // The promise which resolve/reject callbacks fulfill.
+ kPromiseSlot,
+
+ // Whether to trigger a debug event or not. Used in catch
+ // prediction.
+ kDebugEventSlot,
+ kPromiseContextLength,
+ };
+
// These get and set the slots on the PromiseResolvingContext, which
// is used by the resolve/reject promise callbacks.
static JSObject* GetPromise(Handle<Context> context);
« src/js/promise.js ('K') | « src/objects-printer.cc ('k') | src/promise-utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698