// Copyright 2016 the V8 project authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef V8_PROMISE_UTILS_H_ #define V8_PROMISE_UTILS_H_ #include "src/objects.h" namespace v8 { namespace internal { // Helper methods for Promise builtins. class PromiseUtils : public AllStatic { public: // These get and set the slots on the PromiseResolvingContext, which // is used by the resolve/reject promise callbacks. static JSObject* GetPromise(Handle context); static Object* GetDebugEvent(Handle context); static bool HasAlreadyVisited(Handle context); static void SetAlreadyVisited(Handle context); static void CreateResolvingFunctions(Isolate* isolate, Handle promise, Handle debug_event, Handle* resolve, Handle* reject); }; } // namespace internal } // namespace v8 #endif // V8_PROMISE_UTILS_H_