Bug 812828 - If there's no active window when opening targets in tabs, assume we don't want private browsing. r=mak

This commit is contained in:
Josh Matthews 2012-11-19 16:40:32 +00:00
parent 44cc635a2c
commit c78cb042e7

View File

@ -548,15 +548,17 @@ this.PlacesUIUtils = {
aWindow : this._getTopBrowserWin();
var urls = [];
let skipMarking = browserWindow && PrivateBrowsingUtils.isWindowPrivate(browserWindow);
for (let item of aItemsToOpen) {
if (!PrivateBrowsingUtils.isWindowPrivate(browserWindow)) {
if (item.isBookmark)
this.markPageAsFollowedBookmark(item.uri);
else
this.markPageAsTyped(item.uri);
urls.push(item.uri);
if (skipMarking) {
continue;
}
urls.push(item.uri);
if (item.isBookmark)
this.markPageAsFollowedBookmark(item.uri);
else
this.markPageAsTyped(item.uri);
}
// whereToOpenLink doesn't return "window" when there's no browser window