Bug 1634988 - guard state against being undefined in BrowserElementParent. r=mconley

Differential Revision: https://phabricator.services.mozilla.com/D84896
This commit is contained in:
Varun Dey 2020-07-29 15:22:48 +00:00
Родитель bd5a3eb15a
Коммит e7b00c4658
1 изменённых файлов: 5 добавлений и 0 удалений

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

@ -311,6 +311,11 @@ var PermitUnloader = {
_transitionFrameState(windowGlobal, newFrameState) { _transitionFrameState(windowGlobal, newFrameState) {
let frameLoader = windowGlobal.rootFrameLoader; let frameLoader = windowGlobal.rootFrameLoader;
let state = this.inProgressPermitUnload.get(frameLoader); let state = this.inProgressPermitUnload.get(frameLoader);
if (!state) {
return;
}
let oldFrameState = state.frameStates.get(windowGlobal); let oldFrameState = state.frameStates.get(windowGlobal);
if (oldFrameState == STATE_WAITING) { if (oldFrameState == STATE_WAITING) {