Bug 1773037 - [devtools] Disable safe mode and session restore in the browser toolbox. r=nchevobbe

The safe mode dialog will be displayed instead of the browser toolbox when the previous browser
toolbox has been closed too brutaly. This happens every now and then.

Also, when you opened a URL from the browser toolbox, this will then trigger a transient
browser window that appears and immediately disappear when opening the browser toolbox
all next time you start it. It might be related to session restore, but it looks like it is not enough
to get rid of this blinking window.

Differential Revision: https://phabricator.services.mozilla.com/D148515
This commit is contained in:
Alexandre Poirot 2022-06-08 08:25:27 +00:00
parent f44787b8da
commit a49f0276c4

View File

@ -127,6 +127,14 @@ function setPrefDefaults() {
// We force enabling the performance panel in the browser toolbox.
Services.prefs.setBoolPref("devtools.performance.enabled", true);
// Bug 1773226: Try to avoid session restore to reopen a transient browser window
// if we ever opened a URL from the browser toolbox. (but it doesn't seem to be enough)
Services.prefs.setBoolPref("browser.sessionstore.resume_from_crash", false);
// Disable Safe mode as the browser toolbox is often closed brutaly by subprocess
// and the safe mode kicks in when reopening it
Services.prefs.setIntPref("toolkit.startup.max_resumed_crashes", -1);
}
window.addEventListener(