summaryrefslogtreecommitdiffstats
path: root/browser/components
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 02:36:23 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 02:36:23 +0000
commitdbecb11fd3ce4a4d784eda01597873ec147ea4b3 (patch)
tree5cb8482138d013b0c2228761908d6a59b7999ff0 /browser/components
parentAdding debian version 115.9.0esr-2. (diff)
downloadfirefox-esr-dbecb11fd3ce4a4d784eda01597873ec147ea4b3.tar.xz
firefox-esr-dbecb11fd3ce4a4d784eda01597873ec147ea4b3.zip
Merging upstream version 115.9.1esr.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'browser/components')
-rw-r--r--browser/components/sessionstore/SessionStore.sys.mjs27
1 files changed, 18 insertions, 9 deletions
diff --git a/browser/components/sessionstore/SessionStore.sys.mjs b/browser/components/sessionstore/SessionStore.sys.mjs
index 602986e529..2c50de65f8 100644
--- a/browser/components/sessionstore/SessionStore.sys.mjs
+++ b/browser/components/sessionstore/SessionStore.sys.mjs
@@ -1422,6 +1422,13 @@ var SessionStoreInternal = {
* and thus enables communication with OOP tabs.
*/
receiveMessage(aMessage) {
+ if (Services.appinfo.sessionHistoryInParent) {
+ throw new Error(
+ `received unexpected message '${aMessage.name}' with ` +
+ `sessionHistoryInParent enabled`
+ );
+ }
+
// If we got here, that means we're dealing with a frame message
// manager message, so the target will be a <xul:browser>.
var browser = aMessage.target;
@@ -1600,14 +1607,14 @@ var SessionStoreInternal = {
// internal data about the window.
aWindow.__SSi = this._generateWindowID();
- let mm = aWindow.getGroupMessageManager("browsers");
- MESSAGES.forEach(msg => {
- let listenWhenClosed = CLOSED_MESSAGES.has(msg);
- mm.addMessageListener(msg, this, listenWhenClosed);
- });
-
- // Load the frame script after registering listeners.
if (!Services.appinfo.sessionHistoryInParent) {
+ let mm = aWindow.getGroupMessageManager("browsers");
+ MESSAGES.forEach(msg => {
+ let listenWhenClosed = CLOSED_MESSAGES.has(msg);
+ mm.addMessageListener(msg, this, listenWhenClosed);
+ });
+
+ // Load the frame script after registering listeners.
mm.loadFrameScript(
"chrome://browser/content/content-sessionStore.js",
true,
@@ -2083,8 +2090,10 @@ var SessionStoreInternal = {
// Cache the window state until it is completely gone.
DyingWindowCache.set(aWindow, winData);
- let mm = aWindow.getGroupMessageManager("browsers");
- MESSAGES.forEach(msg => mm.removeMessageListener(msg, this));
+ if (!Services.appinfo.sessionHistoryInParent) {
+ let mm = aWindow.getGroupMessageManager("browsers");
+ MESSAGES.forEach(msg => mm.removeMessageListener(msg, this));
+ }
this._saveableClosedWindowData.delete(winData);
delete aWindow.__SSi;