Bug 1336802 - Part 1: Fixing the crash of nsILoadInfo::GetOriginAttributes. r=smaug

This commit is contained in:
Tim Huang
2017-02-07 11:49:33 +08:00
parent c8c1bd5578
commit 39a51be93b

View File

@@ -7947,8 +7947,10 @@ nsDocShell::EndPageLoad(nsIWebProgress* aProgress,
} else if (url && NS_SUCCEEDED(aStatus)) {
// If we have a host
nsCOMPtr<nsILoadInfo> loadInfo = aChannel->GetLoadInfo();
mozilla::net::PredictorLearnRedirect(url, aChannel,
loadInfo->GetOriginAttributes());
if (loadInfo) {
mozilla::net::PredictorLearnRedirect(url, aChannel,
loadInfo->GetOriginAttributes());
}
}
return NS_OK;