Bug 1523969 part 2 - Move method definition inline comments to new line in 'caps/'. r=bzbarsky
authorRyan Hunt <rhunt@eqrion.net>
Mon, 25 Feb 2019 16:03:35 -0600
changeset 519765 cf1a37a3c469b7c0e17c68d65c1e599f11d4172d
parent 519764 2eff89bd9d57460ecd0e4f74c29396958070734b
child 519766 02e1b59e669da81a15505dacd708e6fc7f567d5b
push id10862
push userffxbld-merge
push dateMon, 11 Mar 2019 13:01:11 +0000
treeherdermozilla-beta@a2e7f5c935da [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbzbarsky
bugs1523969
milestone67.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 1523969 part 2 - Move method definition inline comments to new line in 'caps/'. r=bzbarsky Differential Revision: https://phabricator.services.mozilla.com/D21102
caps/ContentPrincipal.cpp
caps/NullPrincipal.cpp
caps/nsJSPrincipals.cpp
caps/nsScriptSecurityManager.cpp
--- a/caps/ContentPrincipal.cpp
+++ b/caps/ContentPrincipal.cpp
@@ -92,17 +92,18 @@ nsresult ContentPrincipal::Init(ContentP
   mAddon = aOther->mAddon;
   return NS_OK;
 }
 
 nsresult ContentPrincipal::GetScriptLocation(nsACString& aStr) {
   return mCodebase->GetSpec(aStr);
 }
 
-/* static */ nsresult ContentPrincipal::GenerateOriginNoSuffixFromURI(
+/* static */
+nsresult ContentPrincipal::GenerateOriginNoSuffixFromURI(
     nsIURI* aURI, nsACString& aOriginNoSuffix) {
   if (!aURI) {
     return NS_ERROR_FAILURE;
   }
 
   nsCOMPtr<nsIURI> origin = NS_GetInnermostURI(aURI);
   if (!origin) {
     return NS_ERROR_FAILURE;
--- a/caps/NullPrincipal.cpp
+++ b/caps/NullPrincipal.cpp
@@ -26,52 +26,54 @@
 
 using namespace mozilla;
 
 NS_IMPL_CLASSINFO(NullPrincipal, nullptr, nsIClassInfo::MAIN_THREAD_ONLY,
                   NS_NULLPRINCIPAL_CID)
 NS_IMPL_QUERY_INTERFACE_CI(NullPrincipal, nsIPrincipal, nsISerializable)
 NS_IMPL_CI_INTERFACE_GETTER(NullPrincipal, nsIPrincipal, nsISerializable)
 
-/* static */ already_AddRefed<NullPrincipal>
-NullPrincipal::CreateWithInheritedAttributes(nsIPrincipal* aInheritFrom) {
+/* static */
+already_AddRefed<NullPrincipal> NullPrincipal::CreateWithInheritedAttributes(
+    nsIPrincipal* aInheritFrom) {
   MOZ_ASSERT(aInheritFrom);
   return CreateWithInheritedAttributes(
       Cast(aInheritFrom)->OriginAttributesRef(), false);
 }
 
-/* static */ already_AddRefed<NullPrincipal>
-NullPrincipal::CreateWithInheritedAttributes(nsIDocShell* aDocShell,
-                                             bool aIsFirstParty) {
+/* static */
+already_AddRefed<NullPrincipal> NullPrincipal::CreateWithInheritedAttributes(
+    nsIDocShell* aDocShell, bool aIsFirstParty) {
   MOZ_ASSERT(aDocShell);
 
   OriginAttributes attrs = nsDocShell::Cast(aDocShell)->GetOriginAttributes();
   return CreateWithInheritedAttributes(attrs, aIsFirstParty);
 }
 
-/* static */ already_AddRefed<NullPrincipal>
-NullPrincipal::CreateWithInheritedAttributes(
+/* static */
+already_AddRefed<NullPrincipal> NullPrincipal::CreateWithInheritedAttributes(
     const OriginAttributes& aOriginAttributes, bool aIsFirstParty) {
   RefPtr<NullPrincipal> nullPrin = new NullPrincipal();
   nsresult rv = nullPrin->Init(aOriginAttributes, aIsFirstParty);
   MOZ_RELEASE_ASSERT(NS_SUCCEEDED(rv));
   return nullPrin.forget();
 }
 
-/* static */ already_AddRefed<NullPrincipal> NullPrincipal::Create(
+/* static */
+already_AddRefed<NullPrincipal> NullPrincipal::Create(
     const OriginAttributes& aOriginAttributes, nsIURI* aURI) {
   RefPtr<NullPrincipal> nullPrin = new NullPrincipal();
   nsresult rv = nullPrin->Init(aOriginAttributes, aURI);
   MOZ_RELEASE_ASSERT(NS_SUCCEEDED(rv));
 
   return nullPrin.forget();
 }
 
-/* static */ already_AddRefed<NullPrincipal>
-NullPrincipal::CreateWithoutOriginAttributes() {
+/* static */
+already_AddRefed<NullPrincipal> NullPrincipal::CreateWithoutOriginAttributes() {
   return NullPrincipal::Create(OriginAttributes(), nullptr);
 }
 
 nsresult NullPrincipal::Init(const OriginAttributes& aOriginAttributes,
                              nsIURI* aURI) {
   if (aURI) {
     nsAutoCString scheme;
     nsresult rv = aURI->GetScheme(scheme);
--- a/caps/nsJSPrincipals.cpp
+++ b/caps/nsJSPrincipals.cpp
@@ -41,25 +41,26 @@ nsJSPrincipals::Release() {
   NS_LOG_RELEASE(this, count, "nsJSPrincipals");
   if (count == 0) {
     delete this;
   }
 
   return count;
 }
 
-/* static */ bool nsJSPrincipals::Subsume(JSPrincipals* jsprin,
-                                          JSPrincipals* other) {
+/* static */
+bool nsJSPrincipals::Subsume(JSPrincipals* jsprin, JSPrincipals* other) {
   bool result;
   nsresult rv = nsJSPrincipals::get(jsprin)->Subsumes(
       nsJSPrincipals::get(other), &result);
   return NS_SUCCEEDED(rv) && result;
 }
 
-/* static */ void nsJSPrincipals::Destroy(JSPrincipals* jsprin) {
+/* static */
+void nsJSPrincipals::Destroy(JSPrincipals* jsprin) {
   // The JS runtime can call this method during the last GC when
   // nsScriptSecurityManager is destroyed. So we must not assume here that
   // the security manager still exists.
 
   nsJSPrincipals* nsjsprin = nsJSPrincipals::get(jsprin);
 
   // We need to destroy the nsIPrincipal. We'll do this by adding
   // to the refcount and calling release
@@ -96,19 +97,20 @@ JS_PUBLIC_API void JSPrincipals::dump() 
             "!!! JSPrincipals (%p) is not nsJSPrincipals instance - bad token: "
             "actual=0x%x expected=0x%x\n",
             this, unsigned(debugToken), unsigned(nsJSPrincipals::DEBUG_TOKEN));
   }
 }
 
 #endif
 
-/* static */ bool nsJSPrincipals::ReadPrincipals(
-    JSContext* aCx, JSStructuredCloneReader* aReader,
-    JSPrincipals** aOutPrincipals) {
+/* static */
+bool nsJSPrincipals::ReadPrincipals(JSContext* aCx,
+                                    JSStructuredCloneReader* aReader,
+                                    JSPrincipals** aOutPrincipals) {
   uint32_t tag;
   uint32_t unused;
   if (!JS_ReadUint32Pair(aReader, &tag, &unused)) {
     return false;
   }
 
   if (!(tag == SCTAG_DOM_NULL_PRINCIPAL || tag == SCTAG_DOM_SYSTEM_PRINCIPAL ||
         tag == SCTAG_DOM_CONTENT_PRINCIPAL ||
@@ -253,19 +255,21 @@ static bool ReadPrincipalInfo(JSStructur
 #else
     MOZ_CRASH("unexpected principal structured clone tag");
 #endif
   }
 
   return true;
 }
 
-/* static */ bool nsJSPrincipals::ReadKnownPrincipalType(
-    JSContext* aCx, JSStructuredCloneReader* aReader, uint32_t aTag,
-    JSPrincipals** aOutPrincipals) {
+/* static */
+bool nsJSPrincipals::ReadKnownPrincipalType(JSContext* aCx,
+                                            JSStructuredCloneReader* aReader,
+                                            uint32_t aTag,
+                                            JSPrincipals** aOutPrincipals) {
   MOZ_ASSERT(aTag == SCTAG_DOM_NULL_PRINCIPAL ||
              aTag == SCTAG_DOM_SYSTEM_PRINCIPAL ||
              aTag == SCTAG_DOM_CONTENT_PRINCIPAL ||
              aTag == SCTAG_DOM_EXPANDED_PRINCIPAL);
 
   if (NS_WARN_IF(!NS_IsMainThread())) {
     xpc::Throw(aCx, NS_ERROR_UNCATCHABLE_EXCEPTION);
     return false;
--- a/caps/nsScriptSecurityManager.cpp
+++ b/caps/nsScriptSecurityManager.cpp
@@ -561,17 +561,18 @@ nsScriptSecurityManager::CheckSameOrigin
       ReportError("CheckSameOriginError", aSourceURI, aTargetURI,
                   aFromPrivateWindow);
     }
     return NS_ERROR_DOM_BAD_URI;
   }
   return NS_OK;
 }
 
-/*static*/ uint32_t nsScriptSecurityManager::HashPrincipalByOrigin(
+/*static*/
+uint32_t nsScriptSecurityManager::HashPrincipalByOrigin(
     nsIPrincipal* aPrincipal) {
   nsCOMPtr<nsIURI> uri;
   aPrincipal->GetDomain(getter_AddRefs(uri));
   if (!uri) aPrincipal->GetURI(getter_AddRefs(uri));
   return SecurityHashURI(uri);
 }
 
 NS_IMETHODIMP
@@ -1447,17 +1448,18 @@ void nsScriptSecurityManager::Shutdown()
   NS_IF_RELEASE(sIOService);
   BundleHelper::Shutdown();
 }
 
 nsScriptSecurityManager* nsScriptSecurityManager::GetScriptSecurityManager() {
   return gScriptSecMan;
 }
 
-/* static */ void nsScriptSecurityManager::InitStatics() {
+/* static */
+void nsScriptSecurityManager::InitStatics() {
   RefPtr<nsScriptSecurityManager> ssManager = new nsScriptSecurityManager();
   nsresult rv = ssManager->Init();
   if (NS_FAILED(rv)) {
     MOZ_CRASH("ssManager->Init() failed");
   }
 
   ClearOnShutdown(&gScriptSecMan);
   gScriptSecMan = ssManager;