Bug 1646810 - HistoryInParent workaround for SessionStateAggregator. r=esawin

This is a temporary workaround so that we can test Fission on GeckoView without
implementiong SessionStateAggregator, which needs to be moved to the parent
since Fission implies HistoryInParent.

Differential Revision: https://phabricator.services.mozilla.com/D93865
This commit is contained in:
Agi Sferro 2020-10-20 16:14:36 +00:00
Родитель cc915ca469
Коммит 28911b048d
1 изменённых файлов: 24 добавлений и 1 удалений

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

@ -644,7 +644,30 @@ class SessionStateAggregator extends GeckoViewChildModule {
}
}
// TODO: Bug 1648158 Move SessionAggregator to the parent process
class DummySessionStateAggregator extends GeckoViewChildModule {
constructor(aModuleName, aMessageManager) {
super(aModuleName, aMessageManager);
this.messageManager.addMessageListener("GeckoView:FlushSessionState", this);
}
receiveMessage(aMsg) {
debug`receiveMessage: ${aMsg.name}`;
switch (aMsg.name) {
case "GeckoView:FlushSessionState":
// Do nothing
break;
}
}
}
const { debug, warn } = SessionStateAggregator.initLogging(
"SessionStateAggregator"
);
const module = SessionStateAggregator.create(this);
const module = Services.appinfo.sessionHistoryInParent
? // If history is handled in the parent we don't need a session aggregator
// TODO: Bug 1648158 remove this and do everything in the parent
DummySessionStateAggregator.create(this)
: SessionStateAggregator.create(this);