Bug 1654124, switch to get the remote type from the browsing context rather than the message manager in a few places, r=mconley

Differential Revision: https://phabricator.services.mozilla.com/D84269
This commit is contained in:
Neil Deakin 2020-07-21 17:16:50 +00:00
Родитель 2ddf042177
Коммит 8e3d371176
3 изменённых файлов: 5 добавлений и 8 удалений

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

@ -2613,7 +2613,8 @@
preferredRemoteType
);
if (sameProcessAsFrameLoader) {
remoteType = sameProcessAsFrameLoader.messageManager.remoteType;
remoteType =
sameProcessAsFrameLoader.browsingContext.currentRemoteType;
}
// If we open a new tab with the newtab URL in the default

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

@ -79,8 +79,7 @@ async function simulateRestart(
}
) {
info("Simulating restart of the browser");
let processManager = browser.messageManager.processMessageManager;
if (processManager.remoteType !== E10SUtils.PRIVILEGEDABOUT_REMOTE_TYPE) {
if (browser.remoteType !== E10SUtils.PRIVILEGEDABOUT_REMOTE_TYPE) {
throw new Error(
"prepareLoadFromCache should only be called on a browser " +
"loaded in the privileged about content process."
@ -109,6 +108,7 @@ async function simulateRestart(
AboutHomeStartupCache.init();
if (AboutHomeStartupCache.initted) {
let processManager = browser.messageManager.processMessageManager;
AboutHomeStartupCache.sendCacheInputStreams(processManager);
info("Waiting for AboutHomeStartupCache cache entry");

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

@ -495,11 +495,7 @@
}
get remoteType() {
if (!this.isRemoteBrowser || !this.messageManager) {
return null;
}
return this.messageManager.remoteType;
return this.browsingContext?.currentRemoteType;
}
get isCrashed() {