зеркало из https://github.com/mozilla/gecko-dev.git
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:
Родитель
a82134b465
Коммит
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,
|
||||
|
|
Загрузка…
Ссылка в новой задаче