mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-24 05:11:16 +00:00
Bug 1274415 - Fix -Wshadow warnings in caps/ directory. r=dveditz
caps/BasePrincipal.cpp:562:28 [-Wshadow] declaration shadows a local variable caps/nsScriptSecurityManager.cpp:675:18 [-Wshadow] declaration shadows a local variable caps/nsScriptSecurityManager.cpp:854:14 [-Wshadow] declaration shadows a local variable
This commit is contained in:
parent
2dec5055ef
commit
e343bcae34
@ -551,7 +551,6 @@ BasePrincipal::CreateCodebasePrincipal(nsIURI* aURI, const PrincipalOriginAttrib
|
||||
bool inheritsPrincipal;
|
||||
nsresult rv = NS_URIChainHasFlags(aURI, nsIProtocolHandler::URI_INHERITS_SECURITY_CONTEXT,
|
||||
&inheritsPrincipal);
|
||||
nsCOMPtr<nsIPrincipal> principal;
|
||||
if (NS_FAILED(rv) || inheritsPrincipal) {
|
||||
return nsNullPrincipal::Create(aAttrs);
|
||||
}
|
||||
|
@ -60,6 +60,3 @@ if CONFIG['ENABLE_TESTS']:
|
||||
include('/ipc/chromium/chromium-config.mozbuild')
|
||||
|
||||
FINAL_LIBRARY = 'xul'
|
||||
|
||||
if CONFIG['GNU_CXX']:
|
||||
CXXFLAGS += ['-Wno-error=shadow']
|
||||
|
@ -672,7 +672,7 @@ EqualOrSubdomain(nsIURI* aProbeArg, nsIURI* aBase)
|
||||
}
|
||||
|
||||
nsAutoCString host, newHost;
|
||||
nsresult rv = probe->GetHost(host);
|
||||
rv = probe->GetHost(host);
|
||||
NS_ENSURE_SUCCESS(rv, false);
|
||||
|
||||
rv = tldService->GetNextSubDomain(host, newHost);
|
||||
@ -850,8 +850,6 @@ nsScriptSecurityManager::CheckLoadURIWithPrincipal(nsIPrincipal* aPrincipal,
|
||||
// as long as they don't represent null principals...
|
||||
// Or they don't require an special permission to do so
|
||||
// See bug#773886
|
||||
|
||||
bool hasFlags;
|
||||
rv = NS_URIChainHasFlags(targetBaseURI,
|
||||
nsIProtocolHandler::URI_CROSS_ORIGIN_NEEDS_WEBAPPS_PERM,
|
||||
&hasFlags);
|
||||
|
Loading…
Reference in New Issue
Block a user