mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-10-28 18:17:29 +09:00
1320408 - Part 21: Change PromiseObject::onSettled to static method.
This commit is contained in:
parent
e5b36e01b9
commit
f376135778
2 changed files with 4 additions and 5 deletions
|
|
@ -603,7 +603,7 @@ ResolvePromise(JSContext* cx, Handle<PromiseObject*> promise, HandleValue valueO
|
||||||
|
|
||||||
// Now that everything else is done, do the things the debugger needs.
|
// Now that everything else is done, do the things the debugger needs.
|
||||||
// Step 7 of RejectPromise implemented in onSettled.
|
// Step 7 of RejectPromise implemented in onSettled.
|
||||||
promise->onSettled(cx);
|
PromiseObject::onSettled(cx, promise);
|
||||||
|
|
||||||
// Step 7 of FulfillPromise.
|
// Step 7 of FulfillPromise.
|
||||||
// Step 8 of RejectPromise.
|
// Step 8 of RejectPromise.
|
||||||
|
|
@ -2671,10 +2671,9 @@ PromiseObject::reject(JSContext* cx, Handle<PromiseObject*> promise, HandleValue
|
||||||
return Call(cx, funVal, UndefinedHandleValue, args, &dummy);
|
return Call(cx, funVal, UndefinedHandleValue, args, &dummy);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
/* static */ void
|
||||||
PromiseObject::onSettled(JSContext* cx)
|
PromiseObject::onSettled(JSContext* cx, Handle<PromiseObject*> promise)
|
||||||
{
|
{
|
||||||
Rooted<PromiseObject*> promise(cx, this);
|
|
||||||
RootedObject stack(cx);
|
RootedObject stack(cx);
|
||||||
if (cx->options().asyncStack() || cx->compartment()->isDebuggee()) {
|
if (cx->options().asyncStack() || cx->compartment()->isDebuggee()) {
|
||||||
if (!JS::CaptureCurrentStack(cx, &stack, JS::StackCapture(JS::AllFrames()))) {
|
if (!JS::CaptureCurrentStack(cx, &stack, JS::StackCapture(JS::AllFrames()))) {
|
||||||
|
|
|
||||||
|
|
@ -71,7 +71,7 @@ class PromiseObject : public NativeObject
|
||||||
static MOZ_MUST_USE bool reject(JSContext* cx, Handle<PromiseObject*> promise,
|
static MOZ_MUST_USE bool reject(JSContext* cx, Handle<PromiseObject*> promise,
|
||||||
HandleValue rejectionValue);
|
HandleValue rejectionValue);
|
||||||
|
|
||||||
void onSettled(JSContext* cx);
|
static void onSettled(JSContext* cx, Handle<PromiseObject*> promise);
|
||||||
|
|
||||||
double allocationTime() { return getFixedSlot(PromiseSlot_AllocationTime).toNumber(); }
|
double allocationTime() { return getFixedSlot(PromiseSlot_AllocationTime).toNumber(); }
|
||||||
double resolutionTime() { return getFixedSlot(PromiseSlot_ResolutionTime).toNumber(); }
|
double resolutionTime() { return getFixedSlot(PromiseSlot_ResolutionTime).toNumber(); }
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue