Bug 1184275 - Remove warnings that URI is not a file URI. r=jduell

This error is handled properly and appears to happen due to legitimate usage.
The warnings are updated to just return the proper error code.
This commit is contained in:
Eric Rahm 2015-07-23 11:03:25 -07:00
parent e52fed601f
commit 2e955093fe
3 changed files with 10 additions and 3 deletions

View File

@ -14074,7 +14074,10 @@ nsDocShell::ShouldPrepareForIntercept(nsIURI* aURI, bool aIsNavigate,
bool isThirdPartyURI = true;
result = thirdPartyUtil->IsThirdPartyURI(mCurrentURI, aURI,
&isThirdPartyURI);
NS_ENSURE_SUCCESS(result, result);
if (NS_FAILED(result)) {
return result;
}
if (isThirdPartyURI &&
(Preferences::GetInt("network.cookie.cookieBehavior",
nsICookieService::BEHAVIOR_ACCEPT) ==

View File

@ -371,7 +371,9 @@ ThirdPartyUtil::GetBaseDomain(nsIURI* aHostURI,
if (aBaseDomain.IsEmpty()) {
bool isFileURI = false;
aHostURI->SchemeIs("file", &isFileURI);
NS_ENSURE_TRUE(isFileURI, NS_ERROR_INVALID_ARG);
if (!isFileURI) {
return NS_ERROR_INVALID_ARG;
}
}
return NS_OK;

View File

@ -2091,7 +2091,9 @@ HttpBaseChannel::ShouldIntercept()
nsresult rv = controller->ShouldPrepareForIntercept(mURI,
IsNavigation(),
&shouldIntercept);
NS_ENSURE_SUCCESS(rv, false);
if (NS_FAILED(rv)) {
return false;
}
}
return shouldIntercept;
}