mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-04 02:57:38 +00:00
Bug 1491403 - Part 1: Add a promise argument to JSEnqueuePromiseJobCallback r=arai
Differential Revision: https://phabricator.services.mozilla.com/D7003 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
a82134b465
commit
36e567732f
@ -189,7 +189,7 @@ typedef JSObject*
|
||||
(* JSGetIncumbentGlobalCallback)(JSContext* cx);
|
||||
|
||||
typedef bool
|
||||
(* JSEnqueuePromiseJobCallback)(JSContext* cx, JS::HandleObject job,
|
||||
(* JSEnqueuePromiseJobCallback)(JSContext* cx, JS::HandleObject promise, JS::HandleObject job,
|
||||
JS::HandleObject allocationSite, JS::HandleObject incumbentGlobal,
|
||||
void* data);
|
||||
|
||||
|
@ -1136,7 +1136,8 @@ JSContext::recoverFromOutOfMemory()
|
||||
}
|
||||
|
||||
static bool
|
||||
InternalEnqueuePromiseJobCallback(JSContext* cx, JS::HandleObject job,
|
||||
InternalEnqueuePromiseJobCallback(JSContext* cx, JS::HandleObject promise,
|
||||
JS::HandleObject job,
|
||||
JS::HandleObject allocationSite,
|
||||
JS::HandleObject incumbentGlobal, void* data)
|
||||
{
|
||||
|
@ -663,7 +663,8 @@ JSRuntime::enqueuePromiseJob(JSContext* cx, HandleFunction job, HandleObject pro
|
||||
allocationSite = JS::GetPromiseAllocationSite(unwrappedPromise);
|
||||
}
|
||||
}
|
||||
return cx->enqueuePromiseJobCallback(cx, job, allocationSite, incumbentGlobal, data);
|
||||
return cx->enqueuePromiseJobCallback(cx, promise, job, allocationSite,
|
||||
incumbentGlobal, data);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -260,6 +260,7 @@ CycleCollectedJSContext::GetIncumbentGlobalCallback(JSContext* aCx)
|
||||
/* static */
|
||||
bool
|
||||
CycleCollectedJSContext::EnqueuePromiseJobCallback(JSContext* aCx,
|
||||
JS::HandleObject aPromise,
|
||||
JS::HandleObject aJob,
|
||||
JS::HandleObject aAllocationSite,
|
||||
JS::HandleObject aIncumbentGlobal,
|
||||
|
@ -113,6 +113,7 @@ private:
|
||||
|
||||
static JSObject* GetIncumbentGlobalCallback(JSContext* aCx);
|
||||
static bool EnqueuePromiseJobCallback(JSContext* aCx,
|
||||
JS::HandleObject aPromise,
|
||||
JS::HandleObject aJob,
|
||||
JS::HandleObject aAllocationSite,
|
||||
JS::HandleObject aIncumbentGlobal,
|
||||
|
Loading…
Reference in New Issue
Block a user