/* * Copyright (c) 2021, Linus Groh * Copyright (c) 2021, Luke Wilde * * SPDX-License-Identifier: BSD-2-Clause */ #pragma once #include #include #include #include namespace JS { struct PromiseJob { Function()> job; Realm* realm { nullptr }; }; // NOTE: These return a PromiseJob to prevent awkward casting at call sites. PromiseJob create_promise_reaction_job(GlobalObject&, PromiseReaction&, Value argument); PromiseJob create_promise_resolve_thenable_job(GlobalObject&, Promise&, Value thenable, JobCallback then); }