From 6dd091de9d838cc97a97567c13185964cb93f11c Mon Sep 17 00:00:00 2001 From: Andreas Farre Date: Tue, 22 Sep 2020 09:46:46 +0000 Subject: [PATCH] Bug 1666415 - Skip checking for history load in E10SUtils for child process. r=smaug With session history in the parent, all history loads needs to be handled by the parent, which means that E10SUtils with session history in the parent doesn't need to consider that to determine if a uri can be loaded. Differential Revision: https://phabricator.services.mozilla.com/D90961 --- toolkit/modules/E10SUtils.jsm | 34 ++++++++++++++++++---------------- 1 file changed, 18 insertions(+), 16 deletions(-) diff --git a/toolkit/modules/E10SUtils.jsm b/toolkit/modules/E10SUtils.jsm index be33af8784d8..9438d79124de 100644 --- a/toolkit/modules/E10SUtils.jsm +++ b/toolkit/modules/E10SUtils.jsm @@ -1032,23 +1032,25 @@ var E10SUtils = { } // Allow history load if loaded in this process before. - let requestedIndex = sessionHistory.legacySHistory.requestedIndex; - if (requestedIndex >= 0) { - this.log().debug("Checking history case\n"); - if ( - sessionHistory.legacySHistory.getEntryAtIndex(requestedIndex) - .loadedInThisProcess - ) { - this.log().info("History entry loaded in this process"); - return true; - } + if (!sessionHistoryInParent) { + let requestedIndex = sessionHistory.legacySHistory.requestedIndex; + if (requestedIndex >= 0) { + this.log().debug("Checking history case\n"); + if ( + sessionHistory.legacySHistory.getEntryAtIndex(requestedIndex) + .loadedInThisProcess + ) { + this.log().info("History entry loaded in this process"); + return true; + } - // If not originally loaded in this process allow it if the URI would - // normally be allowed to load in this process by default. - this.log().debug( - `Checking remote type, got: ${remoteType} want: ${wantRemoteType}\n` - ); - return remoteType == wantRemoteType; + // If not originally loaded in this process allow it if the URI would + // normally be allowed to load in this process by default. + this.log().debug( + `Checking remote type, got: ${remoteType} want: ${wantRemoteType}\n` + ); + return remoteType == wantRemoteType; + } } // If the URI can be loaded in the current process then continue