Bug 1519078 - use the observer helper object of the <browser> which is now a CE. r=jorgk DONTBUILD
authorMagnus Melin <mkmelin+mozilla@iki.fi>
Thu, 10 Jan 2019 14:56:22 +0200
changeset 34149 cb009c395002e0a6bfbfa429448f6036c3ea6f2e
parent 34148 b7fe10c2833b71275de4a8583b193f1a30f3e199
child 34150 19ea5e83ca7286c2ffc684a61b7b7961a742b9e5
push id389
push userclokep@gmail.com
push dateMon, 18 Mar 2019 19:01:53 +0000
reviewersjorgk
bugs1519078
Bug 1519078 - use the observer helper object of the <browser> which is now a CE. r=jorgk DONTBUILD As custom elements can't cope with the QI, a helper object is used. This was added in https://hg.mozilla.org/mozilla-central/rev/bd38d0bde8a3
mail/base/content/specialTabs.js
--- a/mail/base/content/specialTabs.js
+++ b/mail/base/content/specialTabs.js
@@ -615,17 +615,17 @@ var specialTabs = {
     let browser = document.getElementById("dummycontentbrowser");
 
     // Manually hook up session and global history for the first browser
     // so that we don't have to load global history before bringing up a
     // window.
     // Wire up session and global history before any possible
     // progress notifications for back/forward button updating
     browser.docShell.initSessionHistory();
-    Services.obs.addObserver(browser, "browser:purge-session-history");
+    Services.obs.addObserver(browser.observer, "browser:purge-session-history");
 
     // remove the disablehistory attribute so the browser cleans up, as
     // though it had done this work itself
     browser.removeAttribute("disablehistory");
 
     // enable global history
     try {
       browser.docShell.useGlobalHistory = true;