Bug 1163181 - Lots of crashes for Firefox 38 localized builds because of about:newtab mozilla-esr38
authorHenrik Skupin <mail@hskupin.info>
Mon, 11 May 2015 12:28:03 +0200
branchmozilla-esr38
changeset 4768 d148ea4e3b554b613721e002e45eb0b5e956d708
parent 4762 7a2e4d6e589f78fc866027d6eeb056d917288191
child 4773 19fe2379bd0bc9966752b880f93150c302147aa5
push id4277
push userhskupin@mozilla.com
push dateMon, 11 May 2015 10:31:42 +0000
bugs1163181
Bug 1163181 - Lots of crashes for Firefox 38 localized builds because of about:newtab
firefox/lib/tabs.js
--- a/firefox/lib/tabs.js
+++ b/firefox/lib/tabs.js
@@ -15,16 +15,17 @@ Cu.import("resource://gre/modules/Servic
 var { assert } = require("../../lib/assertions");
 var domUtils = require("../../lib/dom-utils");
 var prefs = require("../../lib/prefs");
 var sessionStore = require("../lib/sessionstore");
 var utils = require("../../lib/utils");
 
 const PREF_NEWTAB_INTRO = "browser.newtabpage.introShown";
 const PREF_NEWTAB_PRELOAD = "browser.newtab.preload";
+const PREF_NEWTAB_URL = "browser.newtab.url";
 const PREF_TABS_ANIMATE = "browser.tabs.animate";
 
 const TABS_VIEW = '/id("main-window")/id("tab-view-deck")/[0]';
 const TABS_BROWSER = TABS_VIEW + utils.australis.getElement("tabs") +
                      '/id("browser")/id("appcontent")/id("content")';
 const TABS_TOOLBAR = TABS_VIEW + '/id("navigator-toolbox")/id("TabsToolbar")';
 const TABS_TABS = TABS_TOOLBAR + '/id("tabbrowser-tabs")';
 const TABS_ARROW_SCROLLBOX = TABS_TABS + '/anon({"anonid":"arrowscrollbox"})';
@@ -491,22 +492,26 @@ tabBrowser.prototype = {
    * Close all tabs of the window except the last one and open a blank page.
    */
   closeAllTabs : function tabBrowser_closeAllTabs() {
     // TODO: Bug 1120906
     // waitForPageLoad fails after opening "about:newtab" when
     // "browser.newtab.preload" preference is set to true
     prefs.setPref(PREF_NEWTAB_PRELOAD, false);
 
+    // Bug 1163181 - about:newtab crashes localized builds of Firefox 38
+    prefs.setPref(PREF_NEWTAB_URL, "about:blank");
+
     try {
       this.openTab();
       this.controller.waitForPageLoad();
     }
     finally {
       prefs.clearUserPref(PREF_NEWTAB_PRELOAD);
+      prefs.clearUserPref(PREF_NEWTAB_URL);
     }
 
     this.selectTab({index: 0});
 
     while (this.controller.tabs.length > 1) {
       this.closeTab();
     }
   },