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:
Ehsan Akhgari 2018-10-09 21:42:18 +00:00
Родитель a82134b465
Коммит 36e567732f
5 изменённых файлов: 7 добавлений и 3 удалений

Просмотреть файл

@ -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,