Bug 1621328 - Move CreateExposableURI into nsIOService. r=Gijs,mayhemer
Differential Revision: https://phabricator.services.mozilla.com/D66269
This commit is contained in:
@@ -8497,13 +8497,10 @@ bool nsDocShell::IsSameDocumentNavigation(nsDocShellLoadState* aLoadState,
|
||||
}
|
||||
}
|
||||
|
||||
if (!aState.mSameExceptHashes && sURIFixup && currentURI &&
|
||||
NS_SUCCEEDED(rvURINew)) {
|
||||
if (!aState.mSameExceptHashes && currentURI && NS_SUCCEEDED(rvURINew)) {
|
||||
// Maybe aLoadState->URI() came from the exposable form of currentURI?
|
||||
nsCOMPtr<nsIURI> currentExposableURI;
|
||||
DebugOnly<nsresult> rv = sURIFixup->CreateExposableURI(
|
||||
currentURI, getter_AddRefs(currentExposableURI));
|
||||
MOZ_ASSERT(NS_SUCCEEDED(rv), "CreateExposableURI should not fail, ever!");
|
||||
nsCOMPtr<nsIURI> currentExposableURI =
|
||||
nsIOService::CreateExposableURI(currentURI);
|
||||
nsresult rvURIOld = currentExposableURI->GetRef(aState.mCurrentHash);
|
||||
if (NS_SUCCEEDED(rvURIOld)) {
|
||||
rvURIOld = currentExposableURI->GetHasRef(&aState.mCurrentURIHasRef);
|
||||
@@ -10755,9 +10752,8 @@ nsDocShell::AddState(JS::Handle<JS::Value> aData, const nsAString& aTitle,
|
||||
// step 7.
|
||||
bool equalURIs = true;
|
||||
nsCOMPtr<nsIURI> currentURI;
|
||||
if (sURIFixup && mCurrentURI) {
|
||||
rv = sURIFixup->CreateExposableURI(mCurrentURI, getter_AddRefs(currentURI));
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
if (mCurrentURI) {
|
||||
currentURI = nsIOService::CreateExposableURI(mCurrentURI);
|
||||
} else {
|
||||
currentURI = mCurrentURI;
|
||||
}
|
||||
@@ -12434,10 +12430,7 @@ nsresult nsDocShell::OnOverLink(nsIContent* aContent, nsIURI* aURI,
|
||||
return rv;
|
||||
}
|
||||
|
||||
nsCOMPtr<nsIURI> exposableURI;
|
||||
rv = sURIFixup->CreateExposableURI(aURI, getter_AddRefs(exposableURI));
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
nsCOMPtr<nsIURI> exposableURI = nsIOService::CreateExposableURI(aURI);
|
||||
nsAutoCString spec;
|
||||
rv = exposableURI->GetDisplaySpec(spec);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
Reference in New Issue
Block a user