From cb732e5fdda3528f18aee6a761354fe8c1b7c274 Mon Sep 17 00:00:00 2001 From: Gaming4JC Date: Fri, 13 Dec 2019 20:13:07 -0500 Subject: Bug 336705 - Part 1: Support creating and resolving Promises without resolve/reject functions. Useful for internally-created Promises that'll only ever be resolved/rejected internally. Tag #1287 --- js/src/builtin/Promise.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'js/src/builtin/Promise.h') diff --git a/js/src/builtin/Promise.h b/js/src/builtin/Promise.h index 6a6453e46..8f716dfbc 100644 --- a/js/src/builtin/Promise.h +++ b/js/src/builtin/Promise.h @@ -44,6 +44,8 @@ class PromiseObject : public NativeObject static PromiseObject* create(JSContext* cx, HandleObject executor, HandleObject proto = nullptr, bool needsWrapping = false); + static PromiseObject* createSkippingExecutor(JSContext* cx); + static JSObject* unforgeableResolve(JSContext* cx, HandleValue value); static JSObject* unforgeableReject(JSContext* cx, HandleValue value); -- cgit v1.2.3