From 252c1df8cf325aa63969b4483957f05ad070e26e Mon Sep 17 00:00:00 2001 From: Ehsan Akhgari Date: Mon, 17 Sep 2012 16:08:13 -0400 Subject: [PATCH] Back out changeset 6571e0aef937 (bug 788275) because of test failures --- browser/modules/WindowsPreviewPerTab.jsm | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/browser/modules/WindowsPreviewPerTab.jsm b/browser/modules/WindowsPreviewPerTab.jsm index ad81cb890c8b..4d6bfe31f8aa 100644 --- a/browser/modules/WindowsPreviewPerTab.jsm +++ b/browser/modules/WindowsPreviewPerTab.jsm @@ -72,14 +72,8 @@ XPCOMUtils.defineLazyServiceGetter(this, "faviconSvc", "nsIFaviconService"); // nsIURI -> imgIContainer -function _imageFromURI(uri, privateMode, callback) { +function _imageFromURI(uri, callback) { let channel = ioSvc.newChannelFromURI(uri); - try { - channel.QueryInterface(Ci.nsIPrivateBrowsingChannel); - channel.setPrivate(privateMode); - } catch (e) { - // Ignore channels which do not support nsIPrivateBrowsingChannel - } NetUtil.asyncFetch(channel, function(inputStream, resultCode) { if (!Components.isSuccessCode(resultCode)) return; @@ -98,11 +92,11 @@ function _imageFromURI(uri, privateMode, callback) { } // string? -> imgIContainer -function getFaviconAsImage(iconurl, privateMode, callback) { +function getFaviconAsImage(iconurl, callback) { if (iconurl) - _imageFromURI(NetUtil.newURI(iconurl), privateMode, callback); + _imageFromURI(NetUtil.newURI(iconurl), callback); else - _imageFromURI(faviconSvc.defaultFavicon, privateMode, callback); + _imageFromURI(faviconSvc.defaultFavicon, callback); } // Snaps the given rectangle to be pixel-aligned at the given scale @@ -442,7 +436,7 @@ TabWindow.prototype = { preview.visible = AeroPeek.enabled; preview.active = this.tabbrowser.selectedTab == tab; // Grab the default favicon - getFaviconAsImage(null, this.win.gPrivateBrowsingUI.privateWindow, function (img) { + getFaviconAsImage(null, function (img) { // It is possible that we've already gotten the real favicon, so make sure // we have not set one before setting this default one. if (!preview.icon) @@ -541,7 +535,7 @@ TabWindow.prototype = { //// Browser progress listener onLinkIconAvailable: function (aBrowser, aIconURL) { let self = this; - getFaviconAsImage(aIconURL, this.win.gPrivateBrowsingUI.privateWindow, function (img) { + getFaviconAsImage(aIconURL, function (img) { let index = self.tabbrowser.browsers.indexOf(aBrowser); // Only add it if we've found the index. The tab could have closed! if (index != -1)