diff --git a/browser/base/content/utilityOverlay.js b/browser/base/content/utilityOverlay.js index 936dc4caed92..4a5268b1db11 100644 --- a/browser/base/content/utilityOverlay.js +++ b/browser/base/content/utilityOverlay.js @@ -20,7 +20,7 @@ this.__defineGetter__("BROWSER_NEW_TAB_URL", () => { !aboutNewTabService.overridden) { return "about:privatebrowsing"; } - return aboutNewTabService.newTabURL; + return "about:newtab"; }); var TAB_DROP_TYPE = "application/x-moz-tabbrowser-tab"; diff --git a/browser/components/about/AboutRedirector.cpp b/browser/components/about/AboutRedirector.cpp index f5884531c6fe..d83d9a46c063 100644 --- a/browser/components/about/AboutRedirector.cpp +++ b/browser/components/about/AboutRedirector.cpp @@ -86,7 +86,8 @@ static RedirEntry kRedirMap[] = { nsIAboutModule::URI_MUST_LOAD_IN_CHILD | nsIAboutModule::ALLOW_SCRIPT | nsIAboutModule::ENABLE_INDEXED_DB }, - { "newtab", "chrome://browser/content/newtab/newTab.xhtml", + // the newtab's actual URL will be determined when the channel is created + { "newtab", "about:blank", nsIAboutModule::ALLOW_SCRIPT }, #ifndef RELEASE_BUILD { "remote-newtab", "chrome://browser/content/remote-newtab/newTab.xhtml", @@ -162,18 +163,12 @@ AboutRedirector::NewChannel(nsIURI* aURI, if (!strcmp(path.get(), kRedirMap[i].id)) { nsAutoCString url; - // check if about:newtab got overridden if (path.EqualsLiteral("newtab")) { + // let the aboutNewTabService decide where to redirect nsCOMPtr aboutNewTabService = do_GetService("@mozilla.org/browser/aboutnewtab-service;1", &rv); + rv = aboutNewTabService->GetNewTabURL(url); NS_ENSURE_SUCCESS(rv, rv); - bool overridden = false; - rv = aboutNewTabService->GetOverridden(&overridden); - NS_ENSURE_SUCCESS(rv, rv); - if (overridden) { - rv = aboutNewTabService->GetNewTabURL(url); - NS_ENSURE_SUCCESS(rv, rv); - } } // fall back to the specified url in the map if (url.IsEmpty()) {