Backed out 2 changesets (bug 1635094) for build bustages on nsMacShellService.cpp. CLOSED TREE

Backed out changeset 0a2b0c6ea19a (bug 1635094)
Backed out changeset ead4f26f76ee (bug 1635094)
This commit is contained in:
Cosmin Sabou
2020-05-04 20:04:06 +03:00
parent c8ea5056f1
commit 00d059a4c0
28 changed files with 161 additions and 118 deletions

View File

@@ -11996,6 +11996,7 @@ nsresult nsDocShell::OnLinkClickSync(
// referrer, since the current URI in this docshell may be a
// new document that we're in the process of loading.
RefPtr<Document> referrerDoc = aContent->OwnerDoc();
NS_ENSURE_TRUE(referrerDoc, NS_ERROR_UNEXPECTED);
// Now check that the referrerDoc's inner window is the current inner
// window for mScriptGlobal. If it's not, then we don't want to
@@ -12028,9 +12029,12 @@ nsresult nsDocShell::OnLinkClickSync(
GetIsExecutingOnLoadHandler(&inOnLoadHandler);
uint32_t loadType = inOnLoadHandler ? LOAD_NORMAL_REPLACE : LOAD_LINK;
nsCOMPtr<nsIReferrerInfo> referrerInfo =
isElementAnchorOrArea ? new ReferrerInfo(*aContent->AsElement())
: new ReferrerInfo(*referrerDoc);
nsCOMPtr<nsIReferrerInfo> referrerInfo = new ReferrerInfo();
if (isElementAnchorOrArea) {
referrerInfo->InitWithNode(aContent);
} else {
referrerInfo->InitWithDocument(referrerDoc);
}
RefPtr<nsDocShellLoadState> loadState = new nsDocShellLoadState(aURI);
loadState->SetReferrerInfo(referrerInfo);