Bug 1705547 - Null check the SessionHistory object before attempting to collect, r=smaug

Differential Revision: https://phabricator.services.mozilla.com/D112290
This commit is contained in:
Kashav Madan
2021-04-16 12:02:17 +00:00
parent 9473526fdb
commit e7ef1c3516

View File

@@ -1243,7 +1243,8 @@ var SessionStoreInternal = {
if (
Services.appinfo.sessionHistoryInParent &&
aBrowsingContext === aBrowsingContext.top
aBrowsingContext === aBrowsingContext.top &&
aBrowsingContext.sessionHistory
) {
if (!this._browserSHistoryListener.has(aBrowser.permanentKey)) {
this.addSHistoryListener(aBrowser, aBrowsingContext);