Bug 1472973 part 9 - Use JS::GetNonCCWObjectGlobal in worker wrap-callback. r=bz

This commit is contained in:
Jan de Mooij 2018-07-06 18:16:24 +02:00
Родитель e918a3c855
Коммит 2de712fd5c
1 изменённых файлов: 2 добавлений и 1 удалений

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

@ -903,7 +903,8 @@ Wrap(JSContext *cx, JS::HandleObject existing, JS::HandleObject obj)
MOZ_CRASH("There should be no edges from the debuggee to the debugger.");
}
JSObject* originGlobal = js::GetGlobalForObjectCrossCompartment(obj);
// Note: the JS engine unwraps CCWs before calling this callback.
JSObject* originGlobal = JS::GetNonCCWObjectGlobal(obj);
const js::Wrapper* wrapper = nullptr;
if (IsWorkerDebuggerGlobal(originGlobal) ||