Bug 1709268 - [devtools] Remove backward compatibility code for supportsFollowWindowGlobalLifeCycleFlag r=ochameau

Differential Revision: https://phabricator.services.mozilla.com/D114221
This commit is contained in:
Julian Descottes 2021-05-10 08:03:10 +00:00
Родитель 478d7a35f3
Коммит b38b29e73f
2 изменённых файлов: 1 добавлений и 12 удалений

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

@ -565,9 +565,6 @@ const browsingContextTargetPrototype = {
// support this, so we might keep this trait until all top level targets
// can provide this flag consistently from the server.
supportsTopLevelTargetFlag: true,
// @backward-compat { version 88 } Added in version 88, will not be
// available on targets from older servers.
supportsFollowWindowGlobalLifeCycleFlag: true,
},
};

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

@ -701,15 +701,7 @@ class TargetCommand extends EventEmitter {
dump(" target reload exception: " + e + " >>> " + e.message + " <<<\n");
// If the target follows the window global lifecycle, the reload request
// will fail, and we should swallow the error. Re-throw it otherwise.
// Reload request will fail because the target actor is going to be destroyed
// during the reload and so the ongoing reload request will most likely fail in some way.
// @backward-compat { version 88 } The trait check can be removed after
// version 88 hits the release channel.
const shouldSwallowReloadError =
targetFront.getTrait("supportsFollowWindowGlobalLifeCycleFlag") &&
targetFront.targetForm.followWindowGlobalLifeCycle;
if (!shouldSwallowReloadError) {
if (!targetFront.targetForm.followWindowGlobalLifeCycle) {
throw e;
}
}