Bug 1573590. Make sure we're in the right compartment before serializing our stack in worker error reporting. r=bhackett

Nothing guarantees that the current compartment of aCx matches the compartment
where the exception was thrown.

Differential Revision: https://phabricator.services.mozilla.com/D41791

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Boris Zbarsky 2019-08-13 21:00:31 +00:00
Родитель a76314c2b9
Коммит 52d02ac527
1 изменённых файлов: 1 добавлений и 0 удалений

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

@ -4134,6 +4134,7 @@ void WorkerPrivate::ReportError(JSContext* aCx,
&stackGlobal);
if (stack) {
JSAutoRealm ar(aCx, stackGlobal);
report->SerializeWorkerStack(aCx, this, stack);
}