Bug 883577 Last page visited should not include private browsing windows r=IanN
authorNeil Rashbrook <neil@parkwaycc.co.uk>
Thu, 20 Jun 2013 21:31:35 +0100
changeset 15766 c676fc4b9ae0be9bf1c12a6046b8711f1026ae88
parent 15765 ff64a366af33e07376d8699bd04f9411d4ceae34
child 15767 da20e53a7321a6ada0e3bff0d777397e98add70f
push id942
push userbugzilla@standard8.plus.com
push dateMon, 05 Aug 2013 19:15:38 +0000
treeherdercomm-beta@0e1a1c4a9f0c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersIanN
bugs883577
Bug 883577 Last page visited should not include private browsing windows r=IanN
suite/common/src/nsSuiteGlue.js
--- a/suite/common/src/nsSuiteGlue.js
+++ b/suite/common/src/nsSuiteGlue.js
@@ -192,17 +192,19 @@ SuiteGlue.prototype = {
   },
 
   // nsIWebProgressListener partial implementation
   onLocationChange: function(aWebProgress, aRequest, aLocation, aFlags)
   {
     if (aWebProgress.DOMWindow.top == aWebProgress.DOMWindow &&
         aWebProgress instanceof Components.interfaces.nsIDocShell &&
         aWebProgress.loadType & Components.interfaces.nsIDocShell.LOAD_CMD_NORMAL &&
-        aWebProgress.useGlobalHistory) {
+        aWebProgress.useGlobalHistory &&
+        aWebProgress instanceof Components.interfaces.nsILoadContext &&
+        !aWebProgress.usePrivateBrowsing) {
       switch (aLocation.scheme) {
         case "about":
         case "imap":
         case "news":
         case "mailbox":
         case "moz-anno":
         case "view-source":
         case "chrome":