Bug 1578067 - Part 4: Update openLinkIn() and use more - switch loadURI. r=frg

This commit is contained in:
Ian Neal 2019-10-13 13:21:01 +02:00
Родитель 8b46c7ca3a
Коммит cf21490544
1 изменённых файлов: 6 добавлений и 15 удалений

Просмотреть файл

@ -2093,22 +2093,13 @@ function BrowserCloseWindow()
// function loadURI(uri, referrer, postData, allowThirdPartyFixup, referrerPolicy,
// userContextId, originPrincipal, forceAboutBlankViewerInCurrent,
// triggeringPrincipal)
function loadURI(uri, referrer, postData, allowThirdPartyFixup)
{
function loadURI(uri, referrer, postData, allowThirdPartyFixup) {
try {
var flags = nsIWebNavigation.LOAD_FLAGS_NONE;
if (allowThirdPartyFixup) {
flags = nsIWebNavigation.LOAD_FLAGS_ALLOW_THIRD_PARTY_FIXUP |
nsIWebNavigation.LOAD_FLAGS_FIXUP_SCHEME_TYPOS;
}
if (!flags && typeof postData == "number") {
// Deal with legacy code that passes load flags in the third argument.
flags = postData;
postData = null;
}
gBrowser.loadURIWithFlags(uri, flags, referrer, null, postData);
} catch (e) {
}
openLinkIn(uri, "current",
{ referrerURI: referrer,
postData: postData,
allowThirdPartyFixup: allowThirdPartyFixup });
} catch (e) {}
}
function loadOneOrMoreURIs(aURIString, aTriggeringPrincipal) {