Bug 799495 - New Tab Page is shown in Private Browsing Mode (with preload=true); r=jaws
authorTim Taubert <ttaubert@mozilla.com>
Fri, 01 Feb 2013 10:18:57 -0500
changeset 130599 964839e7a2d1b531337be98f747e24dfcda3a59f
parent 130352 a4f8cb70cc5d1949fdcf2b1347c4bd43494a06bd
child 130600 f681a8eeea3e9a312424b9c85ed432ad51239024
push id2323
push userbbajaj@mozilla.com
push dateMon, 01 Apr 2013 19:47:02 +0000
treeherdermozilla-beta@7712be144d91 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjaws
bugs799495
milestone21.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 799495 - New Tab Page is shown in Private Browsing Mode (with preload=true); r=jaws
browser/base/content/tabbrowser.xml
--- a/browser/base/content/tabbrowser.xml
+++ b/browser/base/content/tabbrowser.xml
@@ -1420,17 +1420,19 @@
             }
 
             // We start our browsers out as inactive, and then maintain
             // activeness in the tab switcher.
             b.docShellIsActive = false;
 
             // If we just created a new tab that loads the default
             // newtab url, swap in a preloaded page if possible.
-            if (aURI == BROWSER_NEW_TAB_URL) {
+            // Do nothing if we're a private window.
+            if (aURI == BROWSER_NEW_TAB_URL &&
+                !PrivateBrowsingUtils.isWindowPrivate(window)) {
               gBrowserNewTabPreloader.newTab(t);
             }
 
             // Check if we're opening a tab related to the current tab and
             // move it to after the current tab.
             // aReferrerURI is null or undefined if the tab is opened from
             // an external application or bookmark, i.e. somewhere other
             // than the current tab.