зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1740300 - Do not send handoff from Private Browsing Mode. r=mstange
Differential Revision: https://phabricator.services.mozilla.com/D130772
This commit is contained in:
Родитель
f3335d09ea
Коммит
2364e37759
|
@ -5589,9 +5589,15 @@ var XULBrowserWindow = {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let url = uri.spec;
|
||||||
|
if (PrivateBrowsingUtils.isWindowPrivate(win)) {
|
||||||
|
// Passing an empty string to MacUserActivityUpdater will invalidate the
|
||||||
|
// current user activity.
|
||||||
|
url = "";
|
||||||
|
}
|
||||||
let baseWin = win.docShell.treeOwner.QueryInterface(Ci.nsIBaseWindow);
|
let baseWin = win.docShell.treeOwner.QueryInterface(Ci.nsIBaseWindow);
|
||||||
MacUserActivityUpdater.updateLocation(
|
MacUserActivityUpdater.updateLocation(
|
||||||
uri.spec,
|
url,
|
||||||
win.gBrowser.contentTitle,
|
win.gBrowser.contentTitle,
|
||||||
baseWin
|
baseWin
|
||||||
);
|
);
|
||||||
|
|
|
@ -23,7 +23,8 @@ nsMacUserActivityUpdater::UpdateLocation(const nsAString& aPageUrl, const nsAStr
|
||||||
}
|
}
|
||||||
|
|
||||||
NSURL* pageUrl = nsCocoaUtils::ToNSURL(aPageUrl);
|
NSURL* pageUrl = nsCocoaUtils::ToNSURL(aPageUrl);
|
||||||
if (![pageUrl.scheme isEqualToString:@"https"] && ![pageUrl.scheme isEqualToString:@"http"]) {
|
if (!pageUrl ||
|
||||||
|
(![pageUrl.scheme isEqualToString:@"https"] && ![pageUrl.scheme isEqualToString:@"http"])) {
|
||||||
[cocoaWin.userActivity invalidate];
|
[cocoaWin.userActivity invalidate];
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
|
Загрузка…
Ссылка в новой задаче