Bug 1356193 - rename securityFlags local variable for code clarity reasons, r=ckerschb
authorGijs Kruitbosch <gijskruitbosch@gmail.com>
Thu, 13 Apr 2017 11:36:18 +0100
changeset 353017 419b0dc9e1a69df64878c608869205efb547439e
parent 353016 2d7ef036a01fb38bc37eed59390af4f79f149ba4
child 353018 c471527828bdf64a360232b96fa6f2d1e38355fb
push id89185
push userkwierso@gmail.com
push dateFri, 14 Apr 2017 00:33:57 +0000
treeherdermozilla-inbound@945c45613592 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersckerschb
bugs1356193
milestone55.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1356193 - rename securityFlags local variable for code clarity reasons, r=ckerschb MozReview-Commit-ID: DmU4ORvXHNY
caps/nsScriptSecurityManager.cpp
--- a/caps/nsScriptSecurityManager.cpp
+++ b/caps/nsScriptSecurityManager.cpp
@@ -343,23 +343,23 @@ nsScriptSecurityManager::GetChannelResul
       nsCOMPtr<nsIPrincipal> principalToInherit = loadInfo->PrincipalToInherit();
       if (!principalToInherit) {
         principalToInherit = loadInfo->TriggeringPrincipal();
       }
       principalToInherit.forget(aPrincipal);
       return NS_OK;
     }
 
-    nsSecurityFlags securityFlags = loadInfo->GetSecurityMode();
+    auto securityMode = loadInfo->GetSecurityMode();
     // The data: inheritance flags should only apply to the initial load,
     // not to loads that it might have redirected to.
     if (loadInfo->RedirectChain().IsEmpty() &&
-        (securityFlags == nsILoadInfo::SEC_REQUIRE_SAME_ORIGIN_DATA_INHERITS ||
-         securityFlags == nsILoadInfo::SEC_ALLOW_CROSS_ORIGIN_DATA_INHERITS ||
-         securityFlags == nsILoadInfo::SEC_REQUIRE_CORS_DATA_INHERITS)) {
+        (securityMode == nsILoadInfo::SEC_REQUIRE_SAME_ORIGIN_DATA_INHERITS ||
+         securityMode == nsILoadInfo::SEC_ALLOW_CROSS_ORIGIN_DATA_INHERITS ||
+         securityMode == nsILoadInfo::SEC_REQUIRE_CORS_DATA_INHERITS)) {
 
       nsCOMPtr<nsIURI> uri;
       nsresult rv = NS_GetFinalChannelURI(aChannel, getter_AddRefs(uri));
       NS_ENSURE_SUCCESS(rv, rv);
       nsCOMPtr<nsIPrincipal> principalToInherit = loadInfo->PrincipalToInherit();
       if (!principalToInherit) {
         principalToInherit = loadInfo->TriggeringPrincipal();
       }