mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-08-30 11:18:39 +09:00
Issue #1691 - Part 6d: Optimize handling of internally-created Promise objects. https://bugzilla.mozilla.org/show_bug.cgi?id=1358879 The patch uses a different test: PROMISE_FLAG_DEFAULT_REJECT_FUNCTION which doesn't exist in our codebase. It was added in this bug, which appears to be partly complete: https://bugzilla.mozilla.org/show_bug.cgi?id=1313049
(cherry picked from commit 97fc74b693813eaaa9ab833d9c51fc5868ff039f)
This commit is contained in:
parent
9a19e9d165
commit
c3daecc218
4 changed files with 19 additions and 27 deletions
|
|
@ -4902,11 +4902,14 @@ JS_PUBLIC_API(JSObject*)
|
|||
JS::NewPromiseObject(JSContext* cx, HandleObject executor, HandleObject proto /* = nullptr */)
|
||||
{
|
||||
MOZ_ASSERT(!cx->runtime()->isAtomsCompartment(cx->compartment()));
|
||||
MOZ_ASSERT(IsCallable(executor));
|
||||
AssertHeapIsIdle(cx);
|
||||
CHECK_REQUEST(cx);
|
||||
assertSameCompartment(cx, executor, proto);
|
||||
|
||||
if (!executor)
|
||||
return PromiseObject::createSkippingExecutor(cx);
|
||||
|
||||
MOZ_ASSERT(IsCallable(executor));
|
||||
return PromiseObject::create(cx, executor, proto);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue