Bug 1419007 - ensure errors FireOnLocationChange after documentURI has changed in docshell. r=sawang r=francois

MozReview-Commit-ID: AaZEIOI4sW1
This commit is contained in:
Jonathan Kingston
2017-11-21 11:40:01 +00:00
parent bcad851584
commit 6a9e88511d
5 changed files with 48 additions and 15 deletions

View File

@@ -512,7 +512,7 @@ AddThreatSourceFromChannel(ThreatHit& aHit, nsIChannel *aChannel,
matchingSource->set_type(aType);
nsCOMPtr<nsIURI> uri;
rv = aChannel->GetURI(getter_AddRefs(uri));
rv = NS_GetFinalChannelURI(aChannel, getter_AddRefs(uri));
NS_ENSURE_SUCCESS(rv, rv);
nsCString spec;
@@ -634,12 +634,12 @@ AddTabThreatSources(ThreatHit& aHit, nsIChannel *aChannel)
}
}
// Set top level tab_url threatshource
// Set top level tab_url threat source
rv = AddThreatSourceFromChannel(aHit, topChannel,
ThreatHit_ThreatSourceType_TAB_URL);
Unused << NS_WARN_IF(NS_FAILED(rv));
// Set tab_redirect threatshources if there's any
// Set tab_redirect threat sources if there's any
nsCOMPtr<nsILoadInfo> topLoadInfo = topChannel->GetLoadInfo();
if (!topLoadInfo) {
return NS_OK;