Bug 1637883 - Bail on eager eval for same-compartment windows. r=nchevobbe

Differential Revision: https://phabricator.services.mozilla.com/D81382
This commit is contained in:
Logan Smyth 2020-06-29 05:17:59 +00:00
Родитель cb08871bb0
Коммит bc1239373b
1 изменённых файлов: 7 добавлений и 0 удалений

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

@ -217,6 +217,13 @@ function getEvalResult(
noSideEffectDebugger
) {
if (noSideEffectDebugger) {
// Bug 1637883 demonstrated an issue where dbgWindow was somehow in the
// same compartment as the Debugger, meaning it could not be debugged
// and thus cannot handle eager evaluation. In that case we skip execution.
if (!noSideEffectDebugger.hasDebuggee(dbgWindow.unsafeDereference())) {
return null;
}
// When a sideeffect-free debugger has been created, we need to eval
// in the context of that debugger in order for the side-effect tracking
// to apply.