Bug 1370369 - Use the new MOZ_DIAGNOSTIC_ASSERT_ENABLED instead of several defines - follow up patch r=froydnj
authorSylvestre Ledru <sledru@mozilla.com>
Mon, 05 Jun 2017 23:43:34 +0200
changeset 412993 25b41cf47c195a06edce86fa8e8e421707046c2f
parent 412992 fc110df7b5265c9da1a8b9bc007c9f1b086ddcce
child 412994 592139f3c7bab20eeced33e4d32f1bd6208d8f09
push id1490
push usermtabara@mozilla.com
push dateMon, 31 Jul 2017 14:08:16 +0000
treeherdermozilla-release@70e32e6bf15e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfroydnj
bugs1370369
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 1370369 - Use the new MOZ_DIAGNOSTIC_ASSERT_ENABLED instead of several defines - follow up patch r=froydnj MozReview-Commit-ID: I4ffmvKClc6
dom/workers/WorkerPrivate.cpp
xpcom/threads/MozPromise.h
--- a/dom/workers/WorkerPrivate.cpp
+++ b/dom/workers/WorkerPrivate.cpp
@@ -1934,17 +1934,17 @@ WorkerLoadInfo::SetPrincipalFromChannel(
   nsresult rv = GetPrincipalAndLoadGroupFromChannel(aChannel,
                                                     getter_AddRefs(principal),
                                                     getter_AddRefs(loadGroup));
   NS_ENSURE_SUCCESS(rv, rv);
 
   return SetPrincipalOnMainThread(principal, loadGroup);
 }
 
-#if defined(DEBUG) || !defined(RELEASE_OR_BETA)
+#ifdef MOZ_DIAGNOSTIC_ASSERT_ENABLED
 bool
 WorkerLoadInfo::FinalChannelPrincipalIsValid(nsIChannel* aChannel)
 {
   AssertIsOnMainThread();
 
   nsCOMPtr<nsIPrincipal> principal;
   nsCOMPtr<nsILoadGroup> loadGroup;
   nsresult rv = GetPrincipalAndLoadGroupFromChannel(aChannel,
@@ -2022,17 +2022,17 @@ WorkerLoadInfo::PrincipalURIMatchesScrip
   NS_ENSURE_TRUE(principalURI, false);
 
   bool equal = false;
   rv = principalURI->Equals(mBaseURI, &equal);
   NS_ENSURE_SUCCESS(rv, false);
 
   return equal;
 }
-#endif // defined(DEBUG) || !defined(RELEASE_OR_BETA)
+#endif // MOZ_DIAGNOSTIC_ASSERT_ENABLED
 
 bool
 WorkerLoadInfo::ProxyReleaseMainThreadObjects(WorkerPrivate* aWorkerPrivate)
 {
   nsCOMPtr<nsILoadGroup> nullLoadGroup;
   return ProxyReleaseMainThreadObjects(aWorkerPrivate, nullLoadGroup);
 }
 
@@ -3917,17 +3917,17 @@ WorkerPrivateParent<Derived>::SetPrincip
 
 template <class Derived>
 nsresult
 WorkerPrivateParent<Derived>::SetPrincipalFromChannel(nsIChannel* aChannel)
 {
   return mLoadInfo.SetPrincipalFromChannel(aChannel);
 }
 
-#if defined(DEBUG) || !defined(RELEASE_OR_BETA)
+#ifdef MOZ_DIAGNOSTIC_ASSERT_ENABLED
 template <class Derived>
 bool
 WorkerPrivateParent<Derived>::FinalChannelPrincipalIsValid(nsIChannel* aChannel)
 {
   return mLoadInfo.FinalChannelPrincipalIsValid(aChannel);
 }
 
 template <class Derived>
@@ -4066,17 +4066,17 @@ WorkerPrivateParent<Derived>::AssertInne
 
   nsPIDOMWindowOuter* outer = mLoadInfo.mWindow->GetOuterWindow();
   NS_ASSERTION(outer && outer->GetCurrentInnerWindow() == mLoadInfo.mWindow,
                "Inner window no longer correct!");
 }
 
 #endif
 
-#if defined(DEBUG) || !defined(RELEASE_OR_BETA)
+#ifdef MOZ_DIAGNOSTIC_ASSERT_ENABLED
 template <class Derived>
 bool
 WorkerPrivateParent<Derived>::PrincipalIsValid() const
 {
   return mLoadInfo.PrincipalIsValid();
 }
 #endif
 
--- a/xpcom/threads/MozPromise.h
+++ b/xpcom/threads/MozPromise.h
@@ -15,17 +15,17 @@
 #include "mozilla/Monitor.h"
 #include "mozilla/Tuple.h"
 #include "mozilla/TypeTraits.h"
 #include "mozilla/Variant.h"
 
 #include "nsTArray.h"
 #include "nsThreadUtils.h"
 
-#if defined(DEBUG) || !defined(RELEASE_OR_BETA)
+#if MOZ_DIAGNOSTIC_ASSERT_ENABLED
 #define PROMISE_DEBUG
 #endif
 
 #ifdef PROMISE_DEBUG
 #define PROMISE_ASSERT MOZ_RELEASE_ASSERT
 #else
 #define PROMISE_ASSERT(...) do { } while (0)
 #endif