Bug 1299727 - Rename NS_WARN_IF_FALSE as NS_WARNING_ASSERTION. r=erahm.
authorNicholas Nethercote <nnethercote@mozilla.com>
Thu, 01 Sep 2016 15:01:16 +1000
changeset 355906 93657f8dedaafa384bcd49c71b52e195ec968de8
parent 355905 d8b7827cca8303713e401363e701bdcc6553a8c4
child 355907 dd200883aa79f18a4536afed86bb311a50d0524b
push id1324
push usermtabara@mozilla.com
push dateMon, 16 Jan 2017 13:07:44 +0000
treeherdermozilla-release@a01c49833940 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerserahm
bugs1299727
milestone51.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 1299727 - Rename NS_WARN_IF_FALSE as NS_WARNING_ASSERTION. r=erahm. The new name makes the sense of the condition much clearer. E.g. compare: NS_WARN_IF_FALSE(!rv.Failed()); with: NS_WARNING_ASSERTION(!rv.Failed()); The new name also makes it clearer that it only has effect in debug builds, because that's standard for assertions.
caps/nsScriptSecurityManager.cpp
chrome/nsChromeRegistryChrome.cpp
docshell/base/nsDocShell.cpp
dom/base/File.h
dom/base/SameProcessMessageQueue.cpp
dom/base/nsDOMMutationObserver.cpp
dom/base/nsDocument.cpp
dom/base/nsFrameLoader.cpp
dom/base/nsGenericDOMDataNode.cpp
dom/base/nsGlobalWindow.cpp
dom/base/nsInProcessTabChildGlobal.cpp
dom/base/nsPlainTextSerializer.cpp
dom/bluetooth/ipc/BluetoothServiceChildProcess.cpp
dom/cellbroadcast/CellBroadcast.cpp
dom/crypto/WebCryptoThreadPool.cpp
dom/events/EventDispatcher.cpp
dom/events/EventListenerManager.cpp
dom/events/EventStateManager.cpp
dom/events/WheelHandlingHelper.cpp
dom/html/HTMLMenuElement.cpp
dom/html/nsHTMLDocument.cpp
dom/icc/IccListener.cpp
dom/indexedDB/ActorsParent.cpp
dom/ipc/Blob.cpp
dom/jsurl/nsJSProtocolHandler.cpp
dom/media/AudioBufferUtils.h
dom/media/AudioSegment.h
dom/media/CubebUtils.cpp
dom/media/DOMMediaStream.cpp
dom/media/GraphDriver.cpp
dom/media/MediaCache.cpp
dom/media/MediaInfo.h
dom/media/MediaResource.cpp
dom/media/ogg/OggDemuxer.cpp
dom/media/ogg/OggReader.cpp
dom/media/webaudio/DelayBuffer.cpp
dom/media/webrtc/MediaEngineDefault.h
dom/media/webrtc/PeerIdentity.cpp
dom/media/webspeech/synth/SpeechSynthesisVoice.cpp
dom/media/webspeech/synth/nsSpeechTask.cpp
dom/media/webspeech/synth/nsSynthVoiceRegistry.cpp
dom/media/webspeech/synth/pico/nsPicoService.cpp
dom/media/webspeech/synth/speechd/SpeechDispatcherService.cpp
dom/mobileconnection/MobileConnection.cpp
dom/mobilemessage/ipc/SmsIPCService.cpp
dom/security/nsContentSecurityManager.cpp
dom/smil/nsSMILCSSValueType.cpp
dom/smil/nsSMILCompositor.cpp
dom/voicemail/Voicemail.cpp
dom/workers/RuntimeService.cpp
dom/workers/ServiceWorkerClient.cpp
dom/workers/ServiceWorkerManager.cpp
dom/workers/ServiceWorkerPrivate.cpp
dom/workers/ServiceWorkerRegistration.cpp
dom/workers/ServiceWorkerUpdateJob.cpp
dom/workers/WorkerPrivate.cpp
dom/workers/WorkerRunnable.cpp
dom/xul/XULDocument.cpp
editor/libeditor/TextEditRules.cpp
embedding/browser/nsWebBrowser.cpp
embedding/components/webbrowserpersist/nsWebBrowserPersist.cpp
extensions/spellcheck/src/mozInlineSpellChecker.cpp
gfx/gl/GLContextProviderGLX.cpp
gfx/layers/RotatedBuffer.cpp
gfx/layers/basic/BasicPaintedLayer.cpp
gfx/layers/composite/TextureHost.cpp
gfx/layers/composite/TiledContentHost.cpp
gfx/layers/d3d9/Nv3DVUtils.cpp
gfx/src/X11Util.cpp
gfx/thebes/gfxCoreTextShaper.cpp
gfx/thebes/gfxFont.cpp
gfx/thebes/gfxHarfBuzzShaper.cpp
gfx/thebes/gfxTextRun.cpp
ipc/glue/MessageChannel.cpp
js/xpconnect/src/nsScriptError.cpp
layout/base/RestyleManagerBase.cpp
layout/base/nsCSSRendering.cpp
layout/base/nsDocumentViewer.cpp
layout/base/nsLayoutUtils.cpp
layout/base/nsPresContext.cpp
layout/base/nsPresShell.cpp
layout/generic/nsFlexContainerFrame.cpp
layout/generic/nsFloatManager.cpp
layout/generic/nsFrame.cpp
layout/generic/nsGridContainerFrame.cpp
layout/generic/nsLineLayout.cpp
layout/generic/nsRubyBaseContainerFrame.cpp
layout/generic/nsRubyFrame.cpp
layout/generic/nsTextFrame.cpp
layout/generic/nsTextRunTransformations.cpp
layout/mathml/nsMathMLFrame.cpp
layout/printing/nsPrintEngine.cpp
layout/style/CSSStyleSheet.cpp
layout/style/nsCSSRuleProcessor.cpp
layout/style/nsComputedDOMStyle.cpp
layout/style/nsRuleNode.h
layout/style/nsTransitionManager.cpp
layout/svg/SVGContextPaint.cpp
layout/tables/nsTableFrame.cpp
layout/tables/nsTableRowFrame.cpp
layout/xul/nsXULTooltipListener.cpp
layout/xul/tree/nsTreeBodyFrame.cpp
netwerk/base/nsFileStreams.cpp
netwerk/base/nsIOService.cpp
netwerk/cookie/CookieServiceChild.cpp
netwerk/dns/GetAddrInfo.cpp
netwerk/dns/nsHostResolver.cpp
netwerk/ipc/RemoteOpenFileChild.cpp
netwerk/ipc/RemoteOpenFileParent.cpp
netwerk/protocol/http/InterceptedChannel.cpp
netwerk/protocol/http/nsHttpConnection.cpp
netwerk/sctp/datachannel/DataChannel.cpp
parser/html/nsHtml5TreeOpExecutor.cpp
rdf/datasource/nsLocalStore.cpp
storage/mozStorageAsyncStatementExecution.cpp
storage/mozStorageConnection.cpp
storage/mozStorageHelper.h
storage/mozStoragePrivateHelpers.cpp
toolkit/components/downloads/nsDownloadManager.cpp
toolkit/components/places/History.cpp
toolkit/components/places/nsAnnoProtocolHandler.cpp
toolkit/components/places/nsNavBookmarks.cpp
toolkit/components/places/nsNavHistory.cpp
toolkit/components/places/nsNavHistory.h
toolkit/components/places/nsNavHistoryResult.cpp
toolkit/components/startup/nsAppStartup.cpp
toolkit/components/url-classifier/LookupCache.cpp
widget/MouseEvents.h
widget/cocoa/nsChildView.mm
widget/windows/WinUtils.cpp
widget/windows/nsDeviceContextSpecWin.cpp
widget/windows/nsWindow.cpp
xpcom/base/nsCycleCollector.cpp
xpcom/base/nsMessageLoop.cpp
xpcom/base/nsSystemInfo.cpp
xpcom/glue/nsDebug.h
xpcom/glue/nsThreadUtils.h
xpcom/threads/LazyIdleThread.cpp
xpcom/threads/nsThread.cpp
--- a/caps/nsScriptSecurityManager.cpp
+++ b/caps/nsScriptSecurityManager.cpp
@@ -252,18 +252,20 @@ nsScriptSecurityManager::AppStatusForPri
     // browser frame, so non-desktop should be able to assume that
     // inIsolatedMozBrowser is true for all mozbrowser frames.  Additionally,
     // apps are no longer used on desktop, so appId is always NO_APP_ID.  We use
     // a release assertion in nsFrameLoader::OwnerIsIsolatedMozBrowserFrame so
     // that platforms with apps can assume inIsolatedMozBrowser is true for all
     // mozbrowser frames.
     bool inIsolatedMozBrowser = aPrin->GetIsInIsolatedMozBrowserElement();
 
-    NS_WARN_IF_FALSE(appId != nsIScriptSecurityManager::UNKNOWN_APP_ID,
-                     "Asking for app status on a principal with an unknown app id");
+    NS_WARNING_ASSERTION(
+      appId != nsIScriptSecurityManager::UNKNOWN_APP_ID,
+      "Asking for app status on a principal with an unknown app id");
+
     // Installed apps have a valid app id (not NO_APP_ID or UNKNOWN_APP_ID)
     // and they are not inside a mozbrowser.
     if (appId == nsIScriptSecurityManager::NO_APP_ID ||
         appId == nsIScriptSecurityManager::UNKNOWN_APP_ID ||
         inIsolatedMozBrowser)
     {
         return nsIPrincipal::APP_STATUS_NOT_INSTALLED;
     }
--- a/chrome/nsChromeRegistryChrome.cpp
+++ b/chrome/nsChromeRegistryChrome.cpp
@@ -448,17 +448,18 @@ nsChromeRegistryChrome::SendRegisteredCh
     ContentParent::GetAll(parents);
     if (!parents.Length())
       return;
 
     for (uint32_t i = 0; i < parents.Length(); i++) {
       DebugOnly<bool> success =
         parents[i]->SendRegisterChrome(packages, resources, overrides,
                                        mSelectedLocale, true);
-      NS_WARN_IF_FALSE(success, "couldn't reset a child's registered chrome");
+      NS_WARNING_ASSERTION(success,
+                           "couldn't reset a child's registered chrome");
     }
   }
 }
 
 /* static */ void
 nsChromeRegistryChrome::ChromePackageFromPackageEntry(const nsACString& aPackageName,
                                                       PackageEntry* aPackage,
                                                       ChromePackage* aChromePackage,
--- a/docshell/base/nsDocShell.cpp
+++ b/docshell/base/nsDocShell.cpp
@@ -6326,19 +6326,19 @@ NS_IMETHODIMP
 nsDocShell::SetMixedContentChannel(nsIChannel* aMixedContentChannel)
 {
 #ifdef DEBUG
   // if the channel is non-null
   if (aMixedContentChannel) {
     // Get the root docshell.
     nsCOMPtr<nsIDocShellTreeItem> root;
     GetSameTypeRootTreeItem(getter_AddRefs(root));
-    NS_WARN_IF_FALSE(root.get() == static_cast<nsIDocShellTreeItem*>(this),
-                     "Setting mMixedContentChannel on a docshell that is not "
-                     "the root docshell");
+    NS_WARNING_ASSERTION(root.get() == static_cast<nsIDocShellTreeItem*>(this),
+                         "Setting mMixedContentChannel on a docshell that is "
+                         "not the root docshell");
   }
 #endif
   mMixedContentChannel = aMixedContentChannel;
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsDocShell::GetFailedChannel(nsIChannel** aFailedChannel)
@@ -12868,17 +12868,17 @@ nsDocShell::ExtractLastVisit(nsIChannel*
     // There is no last visit for this channel, so this must be the first
     // link.  Link the visit to the referrer of this request, if any.
     // Treat referrer as null if there is an error getting it.
     (void)NS_GetReferrerFromChannel(aChannel, aURI);
   } else {
     rv = props->GetPropertyAsUint32(NS_LITERAL_STRING("docshell.previousFlags"),
                                     aChannelRedirectFlags);
 
-    NS_WARN_IF_FALSE(
+    NS_WARNING_ASSERTION(
       NS_SUCCEEDED(rv),
       "Could not fetch previous flags, URI will be treated like referrer");
   }
 }
 
 void
 nsDocShell::SaveLastVisit(nsIChannel* aChannel,
                           nsIURI* aURI,
--- a/dom/base/File.h
+++ b/dom/base/File.h
@@ -730,17 +730,18 @@ protected:
     if (mFile && mIsTemporary) {
       NS_WARNING("In temporary ~BlobImplFile");
       // Ignore errors if any, not much we can do. Clean-up will be done by
       // https://mxr.mozilla.org/mozilla-central/source/xpcom/io/nsAnonymousTemporaryFile.cpp?rev=6c1c7e45c902#127
 #ifdef DEBUG
       nsresult rv =
 #endif
       mFile->Remove(false);
-      NS_WARN_IF_FALSE(NS_SUCCEEDED(rv), "Failed to remove temporary DOMFile.");
+      NS_WARNING_ASSERTION(NS_SUCCEEDED(rv),
+                           "Failed to remove temporary DOMFile.");
     }
   }
 
 private:
   // Create slice
   BlobImplFile(const BlobImplFile* aOther, uint64_t aStart,
                uint64_t aLength, const nsAString& aContentType)
     : BlobImplBase(aContentType, aOther->mStart + aStart, aLength)
--- a/dom/base/SameProcessMessageQueue.cpp
+++ b/dom/base/SameProcessMessageQueue.cpp
@@ -16,17 +16,18 @@ SameProcessMessageQueue::SameProcessMess
 {
 }
 
 SameProcessMessageQueue::~SameProcessMessageQueue()
 {
   // This code should run during shutdown, and we should already have pumped the
   // event loop. So we should only see messages here if someone is sending
   // messages pretty late in shutdown.
-  NS_WARN_IF_FALSE(mQueue.IsEmpty(), "Shouldn't send messages during shutdown");
+  NS_WARNING_ASSERTION(mQueue.IsEmpty(),
+                       "Shouldn't send messages during shutdown");
   sSingleton = nullptr;
 }
 
 void
 SameProcessMessageQueue::Push(Runnable* aRunnable)
 {
   mQueue.AppendElement(aRunnable);
   NS_DispatchToCurrentThread(aRunnable);
--- a/dom/base/nsDOMMutationObserver.cpp
+++ b/dom/base/nsDOMMutationObserver.cpp
@@ -706,18 +706,18 @@ nsDOMMutationObserver::Observe(nsINode& 
   r->SetNativeAnonymousChildList(nativeAnonymousChildList);
   r->SetAttributeFilter(Move(filters));
   r->SetAllAttributes(allAttrs);
   r->SetAnimations(animations);
   r->RemoveClones();
 
 #ifdef DEBUG
   for (int32_t i = 0; i < mReceivers.Count(); ++i) {
-    NS_WARN_IF_FALSE(mReceivers[i]->Target(),
-                     "All the receivers should have a target!");
+    NS_WARNING_ASSERTION(mReceivers[i]->Target(),
+                         "All the receivers should have a target!");
   }
 #endif
 }
 
 void
 nsDOMMutationObserver::Disconnect()
 {
   for (int32_t i = 0; i < mReceivers.Count(); ++i) {
--- a/dom/base/nsDocument.cpp
+++ b/dom/base/nsDocument.cpp
@@ -10336,17 +10336,18 @@ nsIDocument::CreateStaticClone(nsIDocShe
       for (int32_t i = 0; i < sheetsCount; ++i) {
         StyleSheetHandle::RefPtr sheet = GetStyleSheetAt(i);
         if (sheet) {
           if (sheet->IsApplicable()) {
             // XXXheycam Need to make ServoStyleSheet cloning work.
             if (sheet->IsGecko()) {
               RefPtr<CSSStyleSheet> clonedSheet =
                 sheet->AsGecko()->Clone(nullptr, nullptr, clonedDoc, nullptr);
-              NS_WARN_IF_FALSE(clonedSheet, "Cloning a stylesheet didn't work!");
+              NS_WARNING_ASSERTION(clonedSheet,
+                                   "Cloning a stylesheet didn't work!");
               if (clonedSheet) {
                 clonedDoc->AddStyleSheet(clonedSheet);
               }
             } else {
               NS_ERROR("stylo: ServoStyleSheet doesn't support cloning");
             }
           }
         }
@@ -10355,17 +10356,18 @@ nsIDocument::CreateStaticClone(nsIDocShe
       // Iterate backwards to maintain order
       for (StyleSheetHandle sheet : Reversed(thisAsDoc->mOnDemandBuiltInUASheets)) {
         if (sheet) {
           if (sheet->IsApplicable()) {
             // XXXheycam Need to make ServoStyleSheet cloning work.
             if (sheet->IsGecko()) {
               RefPtr<CSSStyleSheet> clonedSheet =
                 sheet->AsGecko()->Clone(nullptr, nullptr, clonedDoc, nullptr);
-              NS_WARN_IF_FALSE(clonedSheet, "Cloning a stylesheet didn't work!");
+              NS_WARNING_ASSERTION(clonedSheet,
+                                   "Cloning a stylesheet didn't work!");
               if (clonedSheet) {
                 clonedDoc->AddOnDemandBuiltInUASheet(clonedSheet);
               }
             } else {
               NS_ERROR("stylo: ServoStyleSheet doesn't support cloning");
             }
           }
         }
@@ -12411,18 +12413,20 @@ nsDocument::SetPointerLock(Element* aEle
     NS_WARNING("SetPointerLock(): Unable to get PresContext");
     return false;
   }
 
   nsCOMPtr<nsIWidget> widget;
   nsIFrame* rootFrame = shell->GetRootFrame();
   if (!NS_WARN_IF(!rootFrame)) {
     widget = rootFrame->GetNearestWidget();
-    NS_WARN_IF_FALSE(widget, "SetPointerLock(): Unable to find widget "
-                     "in shell->GetRootFrame()->GetNearestWidget();");
+    NS_WARNING_ASSERTION(
+      widget,
+      "SetPointerLock(): Unable to find widget in "
+      "shell->GetRootFrame()->GetNearestWidget();");
     if (aElement && !widget) {
       return false;
     }
   }
 
   // Hide the cursor and set pointer lock for future mouse events
   RefPtr<EventStateManager> esm = presContext->EventStateManager();
   esm->SetCursor(aCursorStyle, nullptr, false,
--- a/dom/base/nsFrameLoader.cpp
+++ b/dom/base/nsFrameLoader.cpp
@@ -2224,18 +2224,18 @@ nsFrameLoader::CheckForRecursiveLoad(nsI
                "MaybeCreateDocShell succeeded, but null mDocShell");
   if (!mDocShell) {
     return NS_ERROR_FAILURE;
   }
 
   // Check that we're still in the docshell tree.
   nsCOMPtr<nsIDocShellTreeOwner> treeOwner;
   mDocShell->GetTreeOwner(getter_AddRefs(treeOwner));
-  NS_WARN_IF_FALSE(treeOwner,
-                   "Trying to load a new url to a docshell without owner!");
+  NS_WARNING_ASSERTION(treeOwner,
+                       "Trying to load a new url to a docshell without owner!");
   NS_ENSURE_STATE(treeOwner);
 
   if (mDocShell->ItemType() != nsIDocShellTreeItem::typeContent) {
     // No need to do recursion-protection here XXXbz why not??  Do we really
     // trust people not to screw up with non-content docshells?
     return NS_OK;
   }
 
--- a/dom/base/nsGenericDOMDataNode.cpp
+++ b/dom/base/nsGenericDOMDataNode.cpp
@@ -965,19 +965,19 @@ nsGenericDOMDataNode::GetWholeText(nsASt
 {
   nsIContent* parent = GetParent();
 
   // Handle parent-less nodes
   if (!parent)
     return GetData(aWholeText);
 
   int32_t index = parent->IndexOf(this);
-  NS_WARN_IF_FALSE(index >= 0,
-                   "Trying to use .wholeText with an anonymous"
-                    "text node child of a binding parent?");
+  NS_WARNING_ASSERTION(index >= 0,
+                       "Trying to use .wholeText with an anonymous"
+                       "text node child of a binding parent?");
   NS_ENSURE_TRUE(index >= 0, NS_ERROR_DOM_NOT_SUPPORTED_ERR);
   int32_t first =
     FirstLogicallyAdjacentTextNode(parent, index);
   int32_t last =
     LastLogicallyAdjacentTextNode(parent, index, parent->GetChildCount());
 
   aWholeText.Truncate();
 
--- a/dom/base/nsGlobalWindow.cpp
+++ b/dom/base/nsGlobalWindow.cpp
@@ -6529,17 +6529,17 @@ nsGlobalWindow::FinishFullscreenChange(b
     if (!pmService) {
       return;
     }
 
     // XXXkhuey using the inner here, do we need to do something if it changes?
     ErrorResult rv;
     mWakeLock = pmService->NewWakeLock(NS_LITERAL_STRING("DOM_Fullscreen"),
                                        AsOuter()->GetCurrentInnerWindow(), rv);
-    NS_WARN_IF_FALSE(!rv.Failed(), "Failed to lock the wakelock");
+    NS_WARNING_ASSERTION(!rv.Failed(), "Failed to lock the wakelock");
     rv.SuppressException();
   } else if (mWakeLock && !mFullScreen) {
     ErrorResult rv;
     mWakeLock->Unlock(rv);
     mWakeLock = nullptr;
     rv.SuppressException();
   }
 }
--- a/dom/base/nsInProcessTabChildGlobal.cpp
+++ b/dom/base/nsInProcessTabChildGlobal.cpp
@@ -124,18 +124,18 @@ nsInProcessTabChildGlobal::MarkForCC()
 
 nsresult
 nsInProcessTabChildGlobal::Init()
 {
 #ifdef DEBUG
   nsresult rv =
 #endif
   InitTabChildGlobal();
-  NS_WARN_IF_FALSE(NS_SUCCEEDED(rv),
-                   "Couldn't initialize nsInProcessTabChildGlobal");
+  NS_WARNING_ASSERTION(NS_SUCCEEDED(rv),
+                       "Couldn't initialize nsInProcessTabChildGlobal");
   mMessageManager = new nsFrameMessageManager(this,
                                               nullptr,
                                               dom::ipc::MM_CHILD);
   return NS_OK;
 }
 
 NS_IMPL_CYCLE_COLLECTION_CLASS(nsInProcessTabChildGlobal)
 
--- a/dom/base/nsPlainTextSerializer.cpp
+++ b/dom/base/nsPlainTextSerializer.cpp
@@ -108,17 +108,17 @@ nsPlainTextSerializer::nsPlainTextSerial
 
   mIgnoredChildNodeLevel = 0;
 }
 
 nsPlainTextSerializer::~nsPlainTextSerializer()
 {
   delete[] mTagStack;
   delete[] mOLStack;
-  NS_WARN_IF_FALSE(mHeadLevel == 0, "Wrong head level!");
+  NS_WARNING_ASSERTION(mHeadLevel == 0, "Wrong head level!");
 }
 
 NS_IMPL_ISUPPORTS(nsPlainTextSerializer,
                   nsIContentSerializer)
 
 
 NS_IMETHODIMP 
 nsPlainTextSerializer::Init(uint32_t aFlags, uint32_t aWrapColumn,
--- a/dom/bluetooth/ipc/BluetoothServiceChildProcess.cpp
+++ b/dom/bluetooth/ipc/BluetoothServiceChildProcess.cpp
@@ -23,19 +23,19 @@ BluetoothChild* sBluetoothChild;
 
 inline
 void
 SendRequest(BluetoothReplyRunnable* aRunnable, const Request& aRequest)
 {
   MOZ_ASSERT(NS_IsMainThread());
   MOZ_ASSERT(aRunnable);
 
-  NS_WARN_IF_FALSE(sBluetoothChild,
-                   "Calling methods on BluetoothServiceChildProcess during "
-                   "shutdown!");
+  NS_WARNING_ASSERTION(
+    sBluetoothChild,
+    "Calling methods on BluetoothServiceChildProcess during shutdown!");
 
   if (sBluetoothChild) {
     BluetoothRequestChild* actor = new BluetoothRequestChild(aRunnable);
     sBluetoothChild->SendPBluetoothRequestConstructor(actor, aRequest);
   }
 }
 
 } // namespace
--- a/dom/cellbroadcast/CellBroadcast.cpp
+++ b/dom/cellbroadcast/CellBroadcast.cpp
@@ -77,18 +77,18 @@ CellBroadcast::Create(nsPIDOMWindowInner
 }
 
 CellBroadcast::CellBroadcast(nsPIDOMWindowInner* aWindow,
                              nsICellBroadcastService* aService)
   : DOMEventTargetHelper(aWindow)
 {
   mListener = new Listener(this);
   DebugOnly<nsresult> rv = aService->RegisterListener(mListener);
-  NS_WARN_IF_FALSE(NS_SUCCEEDED(rv),
-                   "Failed registering Cell Broadcast callback");
+  NS_WARNING_ASSERTION(NS_SUCCEEDED(rv),
+                       "Failed registering Cell Broadcast callback");
 }
 
 CellBroadcast::~CellBroadcast()
 {
   MOZ_ASSERT(mListener);
 
   mListener->Disconnect();
   nsCOMPtr<nsICellBroadcastService> service =
--- a/dom/crypto/WebCryptoThreadPool.cpp
+++ b/dom/crypto/WebCryptoThreadPool.cpp
@@ -23,17 +23,17 @@ NS_IMPL_ISUPPORTS(WebCryptoThreadPool, n
 
 /* static */ void
 WebCryptoThreadPool::Initialize()
 {
   MOZ_ASSERT(NS_IsMainThread(), "Wrong thread!");
   MOZ_ASSERT(!gInstance, "More than one instance!");
 
   gInstance = new WebCryptoThreadPool();
-  NS_WARN_IF_FALSE(gInstance, "Failed create thread pool!");
+  NS_WARNING_ASSERTION(gInstance, "Failed create thread pool!");
 
   if (gInstance && NS_FAILED(gInstance->Init())) {
     NS_WARNING("Failed to initialize thread pool!");
     gInstance = nullptr;
   }
 }
 
 /* static */ nsresult
@@ -85,17 +85,17 @@ WebCryptoThreadPool::Shutdown()
   MOZ_ASSERT(NS_IsMainThread(), "Wrong thread!");
   MutexAutoLock lock(mMutex);
 
   if (mPool) {
     mPool->Shutdown();
   }
 
   nsCOMPtr<nsIObserverService> obs = mozilla::services::GetObserverService();
-  NS_WARN_IF_FALSE(obs, "Failed to retrieve observer service!");
+  NS_WARNING_ASSERTION(obs, "Failed to retrieve observer service!");
 
   if (obs) {
     if (NS_FAILED(obs->RemoveObserver(this,
                                       NS_XPCOM_SHUTDOWN_THREADS_OBSERVER_ID))) {
       NS_WARNING("Failed to remove shutdown observer!");
     }
   }
 }
--- a/dom/events/EventDispatcher.cpp
+++ b/dom/events/EventDispatcher.cpp
@@ -162,17 +162,17 @@ public:
   {
     uint32_t lastIndex = aChain.Length() - 1;
     MOZ_ASSERT(&aChain[lastIndex] == aItem);
     aChain.RemoveElementAt(lastIndex);
   }
 
   bool IsValid()
   {
-    NS_WARN_IF_FALSE(!!(mTarget), "Event target is not valid!");
+    NS_WARNING_ASSERTION(!!(mTarget), "Event target is not valid!");
     return !!(mTarget);
   }
 
   EventTarget* GetNewTarget()
   {
     return mNewTarget;
   }
 
--- a/dom/events/EventListenerManager.cpp
+++ b/dom/events/EventListenerManager.cpp
@@ -382,32 +382,34 @@ EventListenerManager::AddEventListenerIn
              aEventMessage <= ePointerEventLast) {
     nsPIDOMWindowInner* window = GetInnerWindowForTarget();
     if (aTypeAtom == nsGkAtoms::onpointerenter ||
         aTypeAtom == nsGkAtoms::onpointerleave) {
       mMayHavePointerEnterLeaveEventListener = true;
       if (window) {
 #ifdef DEBUG
         nsCOMPtr<nsIDocument> d = window->GetExtantDoc();
-        NS_WARN_IF_FALSE(!nsContentUtils::IsChromeDoc(d),
-                         "Please do not use pointerenter/leave events in chrome. "
-                         "They are slower than pointerover/out!");
+        NS_WARNING_ASSERTION(
+          !nsContentUtils::IsChromeDoc(d),
+          "Please do not use pointerenter/leave events in chrome. "
+          "They are slower than pointerover/out!");
 #endif
         window->SetHasPointerEnterLeaveEventListeners();
       }
     }
   } else if (aTypeAtom == nsGkAtoms::onmouseenter ||
              aTypeAtom == nsGkAtoms::onmouseleave) {
     mMayHaveMouseEnterLeaveEventListener = true;
     if (nsPIDOMWindowInner* window = GetInnerWindowForTarget()) {
 #ifdef DEBUG
       nsCOMPtr<nsIDocument> d = window->GetExtantDoc();
-      NS_WARN_IF_FALSE(!nsContentUtils::IsChromeDoc(d),
-                       "Please do not use mouseenter/leave events in chrome. "
-                       "They are slower than mouseover/out!");
+      NS_WARNING_ASSERTION(
+        !nsContentUtils::IsChromeDoc(d),
+        "Please do not use mouseenter/leave events in chrome. "
+        "They are slower than mouseover/out!");
 #endif
       window->SetHasMouseEnterLeaveEventListeners();
     }
 #ifdef MOZ_GAMEPAD
   } else if (aEventMessage >= eGamepadEventFirst &&
              aEventMessage <= eGamepadEventLast) {
     if (nsPIDOMWindowInner* window = GetInnerWindowForTarget()) {
       window->SetHasGamepadEventListener();
--- a/dom/events/EventStateManager.cpp
+++ b/dom/events/EventStateManager.cpp
@@ -518,22 +518,22 @@ EventStateManager::PreHandleEvent(nsPres
 {
   NS_ENSURE_ARG_POINTER(aStatus);
   NS_ENSURE_ARG(aPresContext);
   if (!aEvent) {
     NS_ERROR("aEvent is null.  This should never happen.");
     return NS_ERROR_NULL_POINTER;
   }
 
-  NS_WARN_IF_FALSE(!aTargetFrame ||
-                   !aTargetFrame->GetContent() ||
-                   aTargetFrame->GetContent() == aTargetContent ||
-                   aTargetFrame->GetContent()->GetFlattenedTreeParent() == aTargetContent ||
-                   aTargetFrame->IsGeneratedContentFrame(),
-                   "aTargetFrame should be related with aTargetContent");
+  NS_WARNING_ASSERTION(
+    !aTargetFrame || !aTargetFrame->GetContent() ||
+    aTargetFrame->GetContent() == aTargetContent ||
+    aTargetFrame->GetContent()->GetFlattenedTreeParent() == aTargetContent ||
+    aTargetFrame->IsGeneratedContentFrame(),
+    "aTargetFrame should be related with aTargetContent");
 #if DEBUG
   if (aTargetFrame && aTargetFrame->IsGeneratedContentFrame()) {
     nsCOMPtr<nsIContent> targetContent;
     aTargetFrame->GetContentForEvent(aEvent, getter_AddRefs(targetContent));
     MOZ_ASSERT(aTargetContent == targetContent,
                "Unexpected target for generated content frame!");
   }
 #endif
--- a/dom/events/WheelHandlingHelper.cpp
+++ b/dom/events/WheelHandlingHelper.cpp
@@ -326,17 +326,18 @@ WheelTransaction::SetTimeout()
       return;
     }
     timer.swap(sTimer);
   }
   sTimer->Cancel();
   DebugOnly<nsresult> rv =
     sTimer->InitWithFuncCallback(OnTimeout, nullptr, GetTimeoutTime(),
                                  nsITimer::TYPE_ONE_SHOT);
-  NS_WARN_IF_FALSE(NS_SUCCEEDED(rv), "nsITimer::InitWithFuncCallback failed");
+  NS_WARNING_ASSERTION(NS_SUCCEEDED(rv),
+                       "nsITimer::InitWithFuncCallback failed");
 }
 
 /* static */ nsIntPoint
 WheelTransaction::GetScreenPoint(WidgetGUIEvent* aEvent)
 {
   NS_ASSERTION(aEvent, "aEvent is null");
   NS_ASSERTION(aEvent->mWidget, "aEvent-mWidget is null");
   return (aEvent->mRefPoint + aEvent->mWidget->WidgetToScreenOffset())
--- a/dom/html/HTMLMenuElement.cpp
+++ b/dom/html/HTMLMenuElement.cpp
@@ -108,17 +108,17 @@ HTMLMenuElement::CreateBuilder(nsIMenuBu
 already_AddRefed<nsIMenuBuilder>
 HTMLMenuElement::CreateBuilder()
 {
   if (mType != MENU_TYPE_CONTEXT) {
     return nullptr;
   }
 
   nsCOMPtr<nsIMenuBuilder> builder = do_CreateInstance(HTMLMENUBUILDER_CONTRACTID);
-  NS_WARN_IF_FALSE(builder, "No builder available");
+  NS_WARNING_ASSERTION(builder, "No builder available");
   return builder.forget();
 }
 
 NS_IMETHODIMP
 HTMLMenuElement::Build(nsIMenuBuilder* aBuilder)
 {
   NS_ENSURE_TRUE(nsContentUtils::IsCallerChrome(), NS_ERROR_DOM_SECURITY_ERR);
 
--- a/dom/html/nsHTMLDocument.cpp
+++ b/dom/html/nsHTMLDocument.cpp
@@ -741,17 +741,17 @@ nsHTMLDocument::StartDocumentLoad(const 
   SetDocumentCharacterSetSource(charsetSource);
   SetDocumentCharacterSet(charset);
 
   if (cachingChan) {
     NS_ASSERTION(charset == parserCharset,
                  "How did those end up different here?  wyciwyg channels are "
                  "not nsICachingChannel");
     rv = cachingChan->SetCacheTokenCachedCharset(charset);
-    NS_WARN_IF_FALSE(NS_SUCCEEDED(rv), "cannot SetMetaDataElement");
+    NS_WARNING_ASSERTION(NS_SUCCEEDED(rv), "cannot SetMetaDataElement");
     rv = NS_OK; // don't propagate error
   }
 
   // Set the parser as the stream listener for the document loader...
   rv = NS_OK;
   nsCOMPtr<nsIStreamListener> listener = mParser->GetStreamListener();
   listener.forget(aDocListener);
 
--- a/dom/icc/IccListener.cpp
+++ b/dom/icc/IccListener.cpp
@@ -40,18 +40,18 @@ IccListener::IccListener(IccManager* aIc
     nsString iccId;
     iccInfo->GetIccid(iccId);
     if (!iccId.IsEmpty()) {
       mIcc = new Icc(mIccManager->GetOwner(), mHandler, iccInfo);
     }
   }
 
   DebugOnly<nsresult> rv = mHandler->RegisterListener(this);
-  NS_WARN_IF_FALSE(NS_SUCCEEDED(rv),
-                   "Failed registering icc listener with Icc Handler");
+  NS_WARNING_ASSERTION(NS_SUCCEEDED(rv),
+                       "Failed registering icc listener with Icc Handler");
 }
 
 IccListener::~IccListener()
 {
   Shutdown();
 }
 
 void
--- a/dom/indexedDB/ActorsParent.cpp
+++ b/dom/indexedDB/ActorsParent.cpp
@@ -13252,26 +13252,29 @@ Factory::Create(const LoggingInfo& aLogg
   IncreaseBusyCount();
 
   MOZ_ASSERT(gLoggingInfoHashtable);
   RefPtr<DatabaseLoggingInfo> loggingInfo =
     gLoggingInfoHashtable->Get(aLoggingInfo.backgroundChildLoggingId());
   if (loggingInfo) {
     MOZ_ASSERT(aLoggingInfo.backgroundChildLoggingId() == loggingInfo->Id());
 #if !DISABLE_ASSERTS_FOR_FUZZING
-    NS_WARN_IF_FALSE(aLoggingInfo.nextTransactionSerialNumber() ==
-                       loggingInfo->mLoggingInfo.nextTransactionSerialNumber(),
-                     "NextTransactionSerialNumber doesn't match!");
-    NS_WARN_IF_FALSE(aLoggingInfo.nextVersionChangeTransactionSerialNumber() ==
-                       loggingInfo->mLoggingInfo.
-                         nextVersionChangeTransactionSerialNumber(),
-                     "NextVersionChangeTransactionSerialNumber doesn't match!");
-    NS_WARN_IF_FALSE(aLoggingInfo.nextRequestSerialNumber() ==
-                       loggingInfo->mLoggingInfo.nextRequestSerialNumber(),
-                     "NextRequestSerialNumber doesn't match!");
+    NS_WARNING_ASSERTION(
+      aLoggingInfo.nextTransactionSerialNumber() ==
+        loggingInfo->mLoggingInfo.nextTransactionSerialNumber(),
+      "NextTransactionSerialNumber doesn't match!");
+    NS_WARNING_ASSERTION(
+      aLoggingInfo.nextVersionChangeTransactionSerialNumber() ==
+        loggingInfo->mLoggingInfo.
+      nextVersionChangeTransactionSerialNumber(),
+      "NextVersionChangeTransactionSerialNumber doesn't match!");
+    NS_WARNING_ASSERTION(
+      aLoggingInfo.nextRequestSerialNumber() ==
+        loggingInfo->mLoggingInfo.nextRequestSerialNumber(),
+      "NextRequestSerialNumber doesn't match!");
 #endif // !DISABLE_ASSERTS_FOR_FUZZING
   } else {
     loggingInfo = new DatabaseLoggingInfo(aLoggingInfo);
     gLoggingInfoHashtable->Put(aLoggingInfo.backgroundChildLoggingId(),
                                loggingInfo);
   }
 
   RefPtr<Factory> actor = new Factory(loggingInfo.forget());
@@ -23084,29 +23087,30 @@ CommitOp::Run()
     if (DatabaseConnection* connection = database->GetConnection()) {
       // May be null if the VersionChangeOp was canceled.
       DatabaseConnection::UpdateRefcountFunction* fileRefcountFunction =
         connection->GetUpdateRefcountFunction();
 
       if (NS_SUCCEEDED(mResultCode)) {
         if (fileRefcountFunction) {
           mResultCode = fileRefcountFunction->WillCommit();
-          NS_WARN_IF_FALSE(NS_SUCCEEDED(mResultCode), "WillCommit() failed!");
+          NS_WARNING_ASSERTION(NS_SUCCEEDED(mResultCode),
+                               "WillCommit() failed!");
         }
 
         if (NS_SUCCEEDED(mResultCode)) {
           mResultCode = WriteAutoIncrementCounts();
-          NS_WARN_IF_FALSE(NS_SUCCEEDED(mResultCode),
-                           "WriteAutoIncrementCounts() failed!");
+          NS_WARNING_ASSERTION(NS_SUCCEEDED(mResultCode),
+                               "WriteAutoIncrementCounts() failed!");
 
           if (NS_SUCCEEDED(mResultCode)) {
             AssertForeignKeyConsistency(connection);
 
             mResultCode = connection->CommitWriteTransaction();
-            NS_WARN_IF_FALSE(NS_SUCCEEDED(mResultCode), "Commit failed!");
+            NS_WARNING_ASSERTION(NS_SUCCEEDED(mResultCode), "Commit failed!");
 
             if (NS_SUCCEEDED(mResultCode) &&
                 mTransaction->GetMode() == IDBTransaction::READ_WRITE_FLUSH) {
               mResultCode = connection->Checkpoint();
             }
 
             if (NS_SUCCEEDED(mResultCode) && fileRefcountFunction) {
               fileRefcountFunction->DidCommit();
--- a/dom/ipc/Blob.cpp
+++ b/dom/ipc/Blob.cpp
@@ -1600,17 +1600,17 @@ private:
     // Going to always release here.
     nsCOMPtr<nsIInputStream> stream;
     mStream.swap(stream);
 
     nsCOMPtr<nsIThread> ioTarget;
     mIOTarget.swap(ioTarget);
 
     DebugOnly<nsresult> rv = stream->Close();
-    NS_WARN_IF_FALSE(NS_SUCCEEDED(rv), "Failed to close stream!");
+    NS_WARNING_ASSERTION(NS_SUCCEEDED(rv), "Failed to close stream!");
 
     MOZ_ALWAYS_SUCCEEDS(NS_DispatchToMainThread(NewRunnableMethod(ioTarget, &nsIThread::Shutdown)));
 
     return NS_OK;
   }
 
   nsresult
   SendResponse()
--- a/dom/jsurl/nsJSProtocolHandler.cpp
+++ b/dom/jsurl/nsJSProtocolHandler.cpp
@@ -1083,17 +1083,18 @@ nsJSChannel::GetExecutionPolicy(uint32_t
 
 NS_IMETHODIMP
 nsJSChannel::SetExecuteAsync(bool aIsAsync)
 {
     if (!mIsActive) {
         mIsAsync = aIsAsync;
     }
     // else ignore this call
-    NS_WARN_IF_FALSE(!mIsActive, "Calling SetExecuteAsync on active channel?");
+    NS_WARNING_ASSERTION(!mIsActive,
+                         "Calling SetExecuteAsync on active channel?");
 
     return NS_OK;
 }
 
 NS_IMETHODIMP
 nsJSChannel::GetExecuteAsync(bool* aIsAsync)
 {
     *aIsAsync = mIsAsync;
--- a/dom/media/AudioBufferUtils.h
+++ b/dom/media/AudioBufferUtils.h
@@ -78,18 +78,19 @@ public:
     // It's okay to have exactly zero samples here, it can happen we have an
     // audio callback driver because of a hint on MSG creation, but the
     // AudioOutputStream has not been created yet, or if all the streams have finished
     // but we're still running.
     // Note: it's also ok if we had data in the scratch buffer - and we usually do - and
     // all the streams were ended (no mixer callback occured).
     // XXX Remove this warning, or find a way to avoid it if the mixer callback
     // isn't called.
-    NS_WARN_IF_FALSE(Available() == 0 || mSampleWriteOffset == 0,
-            "Audio Buffer is not full by the end of the callback.");
+    NS_WARNING_ASSERTION(
+      Available() == 0 || mSampleWriteOffset == 0,
+      "Audio Buffer is not full by the end of the callback.");
     // Make sure the data returned is always set and not random!
     if (Available()) {
       PodZero(mBuffer + mSampleWriteOffset, FramesToSamples(CHANNELS, Available()));
     }
     MOZ_ASSERT(mSamples, "Buffer not set.");
     mSamples = 0;
     mSampleWriteOffset = 0;
     mBuffer = nullptr;
--- a/dom/media/AudioSegment.h
+++ b/dom/media/AudioSegment.h
@@ -360,18 +360,19 @@ public:
   // channels.
   void WriteTo(uint64_t aID, AudioMixer& aMixer, uint32_t aChannelCount,
                uint32_t aSampleRate);
   // Mix the segment into a mixer, keeping it planar, up or down mixing to
   // aChannelCount channels.
   void Mix(AudioMixer& aMixer, uint32_t aChannelCount, uint32_t aSampleRate);
 
   int ChannelCount() {
-    NS_WARN_IF_FALSE(!mChunks.IsEmpty(),
-        "Cannot query channel count on a AudioSegment with no chunks.");
+    NS_WARNING_ASSERTION(
+      !mChunks.IsEmpty(),
+      "Cannot query channel count on a AudioSegment with no chunks.");
     // Find the first chunk that has non-zero channels. A chunk that hs zero
     // channels is just silence and we can simply discard it.
     for (ChunkIterator ci(*this); !ci.IsEnded(); ci.Next()) {
       if (ci->ChannelCount()) {
         return ci->ChannelCount();
       }
     }
     return 0;
--- a/dom/media/CubebUtils.cpp
+++ b/dom/media/CubebUtils.cpp
@@ -144,18 +144,18 @@ void InitBrandName()
     mozilla::services::GetStringBundleService();
   if (stringBundleService) {
     nsCOMPtr<nsIStringBundle> brandBundle;
     nsresult rv = stringBundleService->CreateBundle(kBrandBundleURL,
                                            getter_AddRefs(brandBundle));
     if (NS_SUCCEEDED(rv)) {
       rv = brandBundle->GetStringFromName(u"brandShortName",
                                           getter_Copies(brandName));
-      NS_WARN_IF_FALSE(NS_SUCCEEDED(rv),
-          "Could not get the program name for a cubeb stream.");
+      NS_WARNING_ASSERTION(
+        NS_SUCCEEDED(rv), "Could not get the program name for a cubeb stream.");
     }
   }
   /* cubeb expects a c-string. */
   const char* ascii = NS_LossyConvertUTF16toASCII(brandName).get();
   sBrandName = new char[brandName.Length() + 1];
   PodCopy(sBrandName.get(), ascii, brandName.Length());
   sBrandName[brandName.Length()] = 0;
 }
@@ -165,22 +165,22 @@ cubeb* GetCubebContextUnlocked()
   sMutex.AssertCurrentThreadOwns();
   if (sCubebContext) {
     return sCubebContext;
   }
 
   if (!sBrandName && NS_IsMainThread()) {
     InitBrandName();
   } else {
-    NS_WARN_IF_FALSE(sBrandName,
-        "Did not initialize sbrandName, and not on the main thread?");
+    NS_WARNING_ASSERTION(
+      sBrandName, "Did not initialize sbrandName, and not on the main thread?");
   }
 
   DebugOnly<int> rv = cubeb_init(&sCubebContext, sBrandName);
-  NS_WARN_IF_FALSE(rv == CUBEB_OK, "Could not get a cubeb context.");
+  NS_WARNING_ASSERTION(rv == CUBEB_OK, "Could not get a cubeb context.");
 
   return sCubebContext;
 }
 
 void ReportCubebBackendUsed()
 {
   StaticMutexAutoLock lock(sMutex);
 
--- a/dom/media/DOMMediaStream.cpp
+++ b/dom/media/DOMMediaStream.cpp
@@ -148,21 +148,21 @@ public:
     if (track) {
       LOG(LogLevel::Debug, ("DOMMediaStream %p Track %d from owned stream %p "
                             "bound to MediaStreamTrack %p.",
                             mStream, aTrackID, aInputStream, track));
       return;
     }
 
     // Track had not been created on main thread before, create it now.
-    NS_WARN_IF_FALSE(!mStream->mTracks.IsEmpty(),
-                     "A new track was detected on the input stream; creating "
-                     "a corresponding MediaStreamTrack. Initial tracks "
-                     "should be added manually to immediately and "
-                     "synchronously be available to JS.");
+    NS_WARNING_ASSERTION(
+      !mStream->mTracks.IsEmpty(),
+      "A new track was detected on the input stream; creating a corresponding "
+      "MediaStreamTrack. Initial tracks should be added manually to "
+      "immediately and synchronously be available to JS.");
     RefPtr<MediaStreamTrackSource> source;
     if (mStream->mTrackSourceGetter) {
       source = mStream->mTrackSourceGetter->GetMediaStreamTrackSource(aTrackID);
     }
     if (!source) {
       NS_ASSERTION(false, "Dynamic track created without an explicit TrackSource");
       nsPIDOMWindowInner* window = mStream->GetParentObject();
       nsIDocument* doc = window ? window->GetExtantDoc() : nullptr;
--- a/dom/media/GraphDriver.cpp
+++ b/dom/media/GraphDriver.cpp
@@ -481,17 +481,18 @@ OfflineClockDriver::WakeUp()
   MOZ_ASSERT(false, "An offline graph should not have to wake up.");
 }
 
 AsyncCubebTask::AsyncCubebTask(AudioCallbackDriver* aDriver, AsyncCubebOperation aOperation)
   : mDriver(aDriver),
     mOperation(aOperation),
     mShutdownGrip(aDriver->GraphImpl())
 {
-  NS_WARN_IF_FALSE(mDriver->mAudioStream || aOperation == INIT, "No audio stream !");
+  NS_WARNING_ASSERTION(mDriver->mAudioStream || aOperation == INIT,
+                       "No audio stream!");
 }
 
 AsyncCubebTask::~AsyncCubebTask()
 {
 }
 
 /* static */
 nsresult
@@ -653,18 +654,19 @@ AudioCallbackDriver::Init()
                           "AudioCallbackDriver",
                           input_id,
                           mGraphImpl->mInputWanted ? &input : nullptr,
                           output_id,
                           mGraphImpl->mOutputWanted ? &output : nullptr, latency_frames,
                           DataCallback_s, StateCallback_s, this) == CUBEB_OK) {
       mAudioStream.own(stream);
       DebugOnly<int> rv = cubeb_stream_set_volume(mAudioStream, CubebUtils::GetVolumeScale());
-      NS_WARN_IF_FALSE(rv == CUBEB_OK,
-          "Could not set the audio stream volume in GraphDriver.cpp");
+      NS_WARNING_ASSERTION(
+        rv == CUBEB_OK,
+        "Could not set the audio stream volume in GraphDriver.cpp");
       CubebUtils::ReportCubebBackendUsed();
     } else {
 #ifdef MOZ_WEBRTC
       StaticMutexAutoUnlock unlock(AudioInputCubeb::Mutex());
 #endif
       NS_WARNING("Could not create a cubeb stream for MediaStreamGraph, falling back to a SystemClockDriver");
       // Only report failures when we're not coming from a driver that was
       // created itself as a fallback driver because of a previous audio driver
@@ -1003,17 +1005,17 @@ AudioCallbackDriver::MixerCallback(Audio
   }
 
   MOZ_ASSERT(mBuffer.Available() <= aFrames);
 
   mBuffer.WriteFrames(aMixedBuffer, mBuffer.Available());
   MOZ_ASSERT(mBuffer.Available() == 0, "Missing frames to fill audio callback's buffer.");
 
   DebugOnly<uint32_t> written = mScratchBuffer.Fill(aMixedBuffer + toWrite * aChannels, aFrames - toWrite);
-  NS_WARN_IF_FALSE(written == aFrames - toWrite, "Dropping frames.");
+  NS_WARNING_ASSERTION(written == aFrames - toWrite, "Dropping frames.");
 };
 
 void AudioCallbackDriver::PanOutputIfNeeded(bool aMicrophoneActive)
 {
 #ifdef XP_MACOSX
   cubeb_device* out;
   int rv;
   char name[128];
--- a/dom/media/MediaCache.cpp
+++ b/dom/media/MediaCache.cpp
@@ -1721,18 +1721,18 @@ MediaCacheStream::NotifyDataLength(int64
 }
 
 void
 MediaCacheStream::NotifyDataStarted(int64_t aOffset)
 {
   NS_ASSERTION(NS_IsMainThread(), "Only call on main thread");
 
   ReentrantMonitorAutoEnter mon(gMediaCache->GetReentrantMonitor());
-  NS_WARN_IF_FALSE(aOffset == mChannelOffset,
-                   "Server is giving us unexpected offset");
+  NS_WARNING_ASSERTION(aOffset == mChannelOffset,
+                       "Server is giving us unexpected offset");
   MOZ_ASSERT(aOffset >= 0);
   mChannelOffset = aOffset;
   if (mStreamLength >= 0) {
     // If we started reading at a certain offset, then for sure
     // the stream is at least that long.
     mStreamLength = std::max(mStreamLength, mChannelOffset);
   }
 }
--- a/dom/media/MediaInfo.h
+++ b/dom/media/MediaInfo.h
@@ -277,17 +277,17 @@ public:
     switch (aDegree) {
       case 90:
         return kDegree_90;
       case 180:
         return kDegree_180;
       case 270:
         return kDegree_270;
       default:
-        NS_WARN_IF_FALSE(aDegree == 0, "Invalid rotation degree, ignored");
+        NS_WARNING_ASSERTION(aDegree == 0, "Invalid rotation degree, ignored");
         return kDegree_0;
     }
   }
 
   // Size in pixels at which the video is rendered. This is after it has
   // been scaled by its aspect ratio.
   nsIntSize mDisplay;
 
--- a/dom/media/MediaResource.cpp
+++ b/dom/media/MediaResource.cpp
@@ -249,18 +249,19 @@ ChannelMediaResource::OnStartRequest(nsI
         //       For now, tell the decoder that the stream is infinite.
         if (rangeTotal == -1) {
           boundedSeekLimit = false;
         } else {
           contentLength = std::max(contentLength, rangeTotal);
         }
         // Give some warnings if the ranges are unexpected.
         // XXX These could be error conditions.
-        NS_WARN_IF_FALSE(mOffset == rangeStart,
-                         "response range start does not match current offset");
+        NS_WARNING_ASSERTION(
+          mOffset == rangeStart,
+          "response range start does not match current offset");
         mOffset = rangeStart;
         mCacheStream.NotifyDataStarted(rangeStart);
       }
       acceptsRanges = gotRangeHeader;
     } else if (mOffset > 0 && responseStatus == HTTP_OK_CODE) {
       // If we get an OK response but we were seeking, or requesting a byte
       // range, then we have to assume that seeking doesn't work. We also need
       // to tell the cache that it's getting data for the start of the stream.
--- a/dom/media/ogg/OggDemuxer.cpp
+++ b/dom/media/ogg/OggDemuxer.cpp
@@ -1773,18 +1773,18 @@ OggDemuxer::GetSeekRanges(TrackInfo::Tra
     if (NS_FAILED(Reset(aType))) {
       return NS_ERROR_FAILURE;
     }
     int64_t startOffset = range.mStart;
     int64_t endOffset = range.mEnd;
     startTime = RangeStartTime(aType, startOffset);
     if (startTime != -1 &&
         ((endTime = RangeEndTime(aType, endOffset)) != -1)) {
-      NS_WARN_IF_FALSE(startTime < endTime,
-                       "Start time must be before end time");
+      NS_WARNING_ASSERTION(startTime < endTime,
+                           "Start time must be before end time");
       aRanges.AppendElement(SeekRange(startOffset,
                                       endOffset,
                                       startTime,
                                       endTime));
      }
   }
   if (NS_FAILED(Reset(aType))) {
     return NS_ERROR_FAILURE;
--- a/dom/media/ogg/OggReader.cpp
+++ b/dom/media/ogg/OggReader.cpp
@@ -1198,18 +1198,18 @@ nsresult OggReader::GetSeekRanges(nsTArr
       return NS_ERROR_FAILURE;
     }
     int64_t startOffset = range.mStart;
     int64_t endOffset = range.mEnd;
     startTime = RangeStartTime(startOffset);
     if (startTime != -1 &&
         ((endTime = RangeEndTime(endOffset)) != -1))
     {
-      NS_WARN_IF_FALSE(startTime < endTime,
-                       "Start time must be before end time");
+      NS_WARNING_ASSERTION(startTime < endTime,
+                           "Start time must be before end time");
       aRanges.AppendElement(SeekRange(startOffset,
                                       endOffset,
                                       startTime,
                                       endTime));
      }
   }
   if (NS_FAILED(ResetDecode())) {
     return NS_ERROR_FAILURE;
--- a/dom/media/webaudio/DelayBuffer.cpp
+++ b/dom/media/webaudio/DelayBuffer.cpp
@@ -233,18 +233,18 @@ void
 DelayBuffer::UpdateUpmixChannels(int aNewReadChunk, uint32_t aChannelCount,
                                  ChannelInterpretation aChannelInterpretation)
 {
   if (aNewReadChunk == mLastReadChunk) {
     MOZ_ASSERT(mUpmixChannels.Length() == aChannelCount);
     return;
   }
 
-  NS_WARN_IF_FALSE(mHaveWrittenBlock || aNewReadChunk != mCurrentChunk,
-                   "Smoothing is making feedback delay too small.");
+  NS_WARNING_ASSERTION(mHaveWrittenBlock || aNewReadChunk != mCurrentChunk,
+                       "Smoothing is making feedback delay too small.");
 
   mLastReadChunk = aNewReadChunk;
   mUpmixChannels = mChunks[aNewReadChunk].ChannelData<float>();
   MOZ_ASSERT(mUpmixChannels.Length() <= aChannelCount);
   if (mUpmixChannels.Length() < aChannelCount) {
     if (aChannelInterpretation == ChannelInterpretation::Speakers) {
       AudioChannelsUpMix(&mUpmixChannels,
                          aChannelCount, SilentChannel::ZeroChannel<float>());
--- a/dom/media/webrtc/MediaEngineDefault.h
+++ b/dom/media/webrtc/MediaEngineDefault.h
@@ -140,19 +140,20 @@ public:
   void NotifyPull(MediaStreamGraph* aGraph,
                   SourceMediaStream *aSource,
                   TrackID aId,
                   StreamTime aDesiredTime,
                   const PrincipalHandle& aPrincipalHandle) override
   {
 #ifdef DEBUG
     StreamTracks::Track* data = aSource->FindTrack(aId);
-    NS_WARN_IF_FALSE(!data || data->IsEnded() ||
-                     aDesiredTime <= aSource->GetEndOfAppendedData(aId),
-                     "MediaEngineDefaultAudioSource data underrun");
+    NS_WARNING_ASSERTION(
+      !data || data->IsEnded() ||
+      aDesiredTime <= aSource->GetEndOfAppendedData(aId),
+      "MediaEngineDefaultAudioSource data underrun");
 #endif
   }
 
   void NotifyOutputData(MediaStreamGraph* aGraph,
                         AudioDataValue* aBuffer, size_t aFrames,
                         TrackRate aRate, uint32_t aChannels) override
   {}
   void NotifyInputData(MediaStreamGraph* aGraph,
--- a/dom/media/webrtc/PeerIdentity.cpp
+++ b/dom/media/webrtc/PeerIdentity.cpp
@@ -74,12 +74,13 @@ PeerIdentity::GetHost(const nsAString& a
 
 /* static */ void
 PeerIdentity::GetNormalizedHost(const nsCOMPtr<nsIIDNService>& aIdnService,
                                 const nsAString& aHost,
                                 nsACString& aNormalizedHost)
 {
   const nsCString chost = NS_ConvertUTF16toUTF8(aHost);
   DebugOnly<nsresult> rv = aIdnService->ConvertUTF8toACE(chost, aNormalizedHost);
-  NS_WARN_IF_FALSE(NS_SUCCEEDED(rv), "Failed to convert UTF-8 host to ASCII");
+  NS_WARNING_ASSERTION(NS_SUCCEEDED(rv),
+                       "Failed to convert UTF-8 host to ASCII");
 }
 
 } /* namespace mozilla */
--- a/dom/media/webspeech/synth/SpeechSynthesisVoice.cpp
+++ b/dom/media/webspeech/synth/SpeechSynthesisVoice.cpp
@@ -48,45 +48,47 @@ SpeechSynthesisVoice::GetVoiceURI(nsStri
   aRetval = mUri;
 }
 
 void
 SpeechSynthesisVoice::GetName(nsString& aRetval) const
 {
   DebugOnly<nsresult> rv =
     nsSynthVoiceRegistry::GetInstance()->GetVoiceName(mUri, aRetval);
-  NS_WARN_IF_FALSE(NS_SUCCEEDED(rv), "Failed to get SpeechSynthesisVoice.name");
+  NS_WARNING_ASSERTION(NS_SUCCEEDED(rv),
+                       "Failed to get SpeechSynthesisVoice.name");
 }
 
 void
 SpeechSynthesisVoice::GetLang(nsString& aRetval) const
 {
   DebugOnly<nsresult> rv =
     nsSynthVoiceRegistry::GetInstance()->GetVoiceLang(mUri, aRetval);
-  NS_WARN_IF_FALSE(NS_SUCCEEDED(rv), "Failed to get SpeechSynthesisVoice.lang");
+  NS_WARNING_ASSERTION(NS_SUCCEEDED(rv),
+                       "Failed to get SpeechSynthesisVoice.lang");
 }
 
 bool
 SpeechSynthesisVoice::LocalService() const
 {
   bool isLocal;
   DebugOnly<nsresult> rv =
     nsSynthVoiceRegistry::GetInstance()->IsLocalVoice(mUri, &isLocal);
-  NS_WARN_IF_FALSE(
+  NS_WARNING_ASSERTION(
     NS_SUCCEEDED(rv), "Failed to get SpeechSynthesisVoice.localService");
 
   return isLocal;
 }
 
 bool
 SpeechSynthesisVoice::Default() const
 {
   bool isDefault;
   DebugOnly<nsresult> rv =
     nsSynthVoiceRegistry::GetInstance()->IsDefaultVoice(mUri, &isDefault);
-  NS_WARN_IF_FALSE(
+  NS_WARNING_ASSERTION(
     NS_SUCCEEDED(rv), "Failed to get SpeechSynthesisVoice.default");
 
   return isDefault;
 }
 
 } // namespace dom
 } // namespace mozilla
--- a/dom/media/webspeech/synth/nsSpeechTask.cpp
+++ b/dom/media/webspeech/synth/nsSpeechTask.cpp
@@ -597,17 +597,17 @@ nsSpeechTask::DispatchMarkImpl(const nsA
 
 void
 nsSpeechTask::Pause()
 {
   MOZ_ASSERT(XRE_IsParentProcess());
 
   if (mCallback) {
     DebugOnly<nsresult> rv = mCallback->OnPause();
-    NS_WARN_IF_FALSE(NS_SUCCEEDED(rv), "Unable to call onPause() callback");
+    NS_WARNING_ASSERTION(NS_SUCCEEDED(rv), "Unable to call onPause() callback");
   }
 
   if (mStream) {
     mStream->Suspend();
   }
 
   if (!mInited) {
     mPrePaused = true;
@@ -620,17 +620,18 @@ nsSpeechTask::Pause()
 
 void
 nsSpeechTask::Resume()
 {
   MOZ_ASSERT(XRE_IsParentProcess());
 
   if (mCallback) {
     DebugOnly<nsresult> rv = mCallback->OnResume();
-    NS_WARN_IF_FALSE(NS_SUCCEEDED(rv), "Unable to call onResume() callback");
+    NS_WARNING_ASSERTION(NS_SUCCEEDED(rv),
+                         "Unable to call onResume() callback");
   }
 
   if (mStream) {
     mStream->Resume();
   }
 
   if (mPrePaused) {
     mPrePaused = false;
@@ -646,17 +647,18 @@ void
 nsSpeechTask::Cancel()
 {
   MOZ_ASSERT(XRE_IsParentProcess());
 
   LOG(LogLevel::Debug, ("nsSpeechTask::Cancel"));
 
   if (mCallback) {
     DebugOnly<nsresult> rv = mCallback->OnCancel();
-    NS_WARN_IF_FALSE(NS_SUCCEEDED(rv), "Unable to call onCancel() callback");
+    NS_WARNING_ASSERTION(NS_SUCCEEDED(rv),
+                         "Unable to call onCancel() callback");
   }
 
   if (mStream) {
     mStream->Suspend();
   }
 
   if (!mInited) {
     mPreCanceled = true;
--- a/dom/media/webspeech/synth/nsSynthVoiceRegistry.cpp
+++ b/dom/media/webspeech/synth/nsSynthVoiceRegistry.cpp
@@ -809,17 +809,17 @@ nsSynthVoiceRegistry::SpeakImpl(VoiceDat
   LOG(LogLevel::Debug,
       ("nsSynthVoiceRegistry::SpeakImpl queueing text='%s' uri='%s' rate=%f pitch=%f",
        NS_ConvertUTF16toUTF8(aText).get(), NS_ConvertUTF16toUTF8(aVoice->mUri).get(),
        aRate, aPitch));
 
   SpeechServiceType serviceType;
 
   DebugOnly<nsresult> rv = aVoice->mService->GetServiceType(&serviceType);
-  NS_WARN_IF_FALSE(NS_SUCCEEDED(rv), "Failed to get speech service type");
+  NS_WARNING_ASSERTION(NS_SUCCEEDED(rv), "Failed to get speech service type");
 
   if (serviceType == nsISpeechService::SERVICETYPE_INDIRECT_AUDIO) {
     aTask->InitIndirectAudio();
   } else {
     aTask->InitDirectAudio();
   }
 
   if (NS_FAILED(aVoice->mService->Speak(aText, aVoice->mUri, aVolume, aRate,
--- a/dom/media/webspeech/synth/pico/nsPicoService.cpp
+++ b/dom/media/webspeech/synth/pico/nsPicoService.cpp
@@ -600,17 +600,17 @@ nsPicoService::RegisterVoices()
     nsAutoString name;
     name.AssignLiteral("Pico ");
     name.Append(voice->mLanguage);
 
     // This service is multi-threaded and can handle more than one utterance at a
     // time before previous utterances end. So, aQueuesUtterances == false
     DebugOnly<nsresult> rv =
       registry->AddVoice(this, uri, name, voice->mLanguage, true, false);
-    NS_WARN_IF_FALSE(NS_SUCCEEDED(rv), "Failed to add voice");
+    NS_WARNING_ASSERTION(NS_SUCCEEDED(rv), "Failed to add voice");
   }
 
   mInitialized = true;
 }
 
 bool
 nsPicoService::GetVoiceFileLanguage(const nsACString& aFileName, nsAString& aLang)
 {
--- a/dom/media/webspeech/synth/speechd/SpeechDispatcherService.cpp
+++ b/dom/media/webspeech/synth/speechd/SpeechDispatcherService.cpp
@@ -435,17 +435,17 @@ SpeechDispatcherService::RegisterVoices(
 
     // This service can only speak one utterance at a time, so we set
     // aQueuesUtterances to true in order to track global state and schedule
     // access to this service.
     DebugOnly<nsresult> rv =
       registry->AddVoice(this, iter.Key(), voice->mName, voice->mLanguage,
                          voice->mName.EqualsLiteral("default"), true);
 
-    NS_WARN_IF_FALSE(NS_SUCCEEDED(rv), "Failed to add voice");
+    NS_WARNING_ASSERTION(NS_SUCCEEDED(rv), "Failed to add voice");
   }
 
   mInitThread->Shutdown();
   mInitThread = nullptr;
 
   mInitialized = true;
 
   registry->NotifyVoicesChanged();
--- a/dom/mobileconnection/MobileConnection.cpp
+++ b/dom/mobileconnection/MobileConnection.cpp
@@ -136,35 +136,36 @@ MobileConnection::MobileConnection(nsPID
   }
 
   mListener = new Listener(this);
   mVoice = new MobileConnectionInfo(GetOwner());
   mData = new MobileConnectionInfo(GetOwner());
 
   if (CheckPermission("mobileconnection")) {
     DebugOnly<nsresult> rv = mMobileConnection->RegisterListener(mListener);
-    NS_WARN_IF_FALSE(NS_SUCCEEDED(rv),
-                     "Failed registering mobile connection messages with service");
+    NS_WARNING_ASSERTION(
+      NS_SUCCEEDED(rv),
+      "Failed registering mobile connection messages with service");
     UpdateVoice();
     UpdateData();
 
     nsCOMPtr<nsIIccService> iccService = do_GetService(ICC_SERVICE_CONTRACTID);
 
     if (iccService) {
       iccService->GetIccByServiceId(mClientId, getter_AddRefs(mIccHandler));
     }
 
     if (!mIccHandler) {
       NS_WARNING("Could not acquire nsIMobileConnection or nsIIcc!");
       return;
     }
 
     rv = mIccHandler->RegisterListener(mListener);
-    NS_WARN_IF_FALSE(NS_SUCCEEDED(rv),
-                     "Failed registering icc messages with service");
+    NS_WARNING_ASSERTION(NS_SUCCEEDED(rv),
+                         "Failed registering icc messages with service");
     UpdateIccId();
   }
 }
 
 void
 MobileConnection::Shutdown()
 {
   if (mListener) {
--- a/dom/mobilemessage/ipc/SmsIPCService.cpp
+++ b/dom/mobilemessage/ipc/SmsIPCService.cpp
@@ -33,18 +33,18 @@ SmsIPCService* sSingleton = nullptr;
 PSmsChild*
 GetSmsChild()
 {
   MOZ_ASSERT(NS_IsMainThread());
 
   if (!gSmsChild) {
     gSmsChild = ContentChild::GetSingleton()->SendPSmsConstructor();
 
-    NS_WARN_IF_FALSE(gSmsChild,
-                     "Calling methods on SmsIPCService during shutdown!");
+    NS_WARNING_ASSERTION(gSmsChild,
+                         "Calling methods on SmsIPCService during shutdown!");
   }
 
   return gSmsChild;
 }
 
 nsresult
 SendRequest(const IPCSmsRequest& aRequest,
             nsIMobileMessageCallback* aRequestReply)
--- a/dom/security/nsContentSecurityManager.cpp
+++ b/dom/security/nsContentSecurityManager.cpp
@@ -626,18 +626,18 @@ nsContentSecurityManager::IsOriginPotent
   nsresult rv = uri->GetScheme(scheme);
   if (NS_FAILED(rv)) {
     return NS_OK;
   }
 
   // Blobs are expected to inherit their principal so we don't expect to have
   // a codebase principal with scheme 'blob' here.  We can't assert that though
   // since someone could mess with a non-blob URI to give it that scheme.
-  NS_WARN_IF_FALSE(!scheme.EqualsLiteral("blob"),
-                   "IsOriginPotentiallyTrustworthy ignoring blob scheme");
+  NS_WARNING_ASSERTION(!scheme.EqualsLiteral("blob"),
+                       "IsOriginPotentiallyTrustworthy ignoring blob scheme");
 
   // According to the specification, the user agent may choose to extend the
   // trust to other, vendor-specific URL schemes. We use this for "resource:",
   // which is technically a substituting protocol handler that is not limited to
   // local resource mapping, but in practice is never mapped remotely as this
   // would violate assumptions a lot of code makes.
   if (scheme.EqualsLiteral("https") ||
       scheme.EqualsLiteral("file") ||
--- a/dom/smil/nsSMILCSSValueType.cpp
+++ b/dom/smil/nsSMILCSSValueType.cpp
@@ -189,18 +189,18 @@ nsSMILCSSValueType::IsEqual(const nsSMIL
   MOZ_ASSERT(aLeft.mType == aRight.mType, "Incompatible SMIL types");
   MOZ_ASSERT(aLeft.mType == this, "Unexpected SMIL value");
   const ValueWrapper* leftWrapper = ExtractValueWrapper(aLeft);
   const ValueWrapper* rightWrapper = ExtractValueWrapper(aRight);
 
   if (leftWrapper) {
     if (rightWrapper) {
       // Both non-null
-      NS_WARN_IF_FALSE(leftWrapper != rightWrapper,
-                       "Two nsSMILValues with matching ValueWrapper ptr");
+      NS_WARNING_ASSERTION(leftWrapper != rightWrapper,
+                           "Two nsSMILValues with matching ValueWrapper ptr");
       return (leftWrapper->mPropID == rightWrapper->mPropID &&
               leftWrapper->mCSSValue == rightWrapper->mCSSValue);
     }
     // Left non-null, right null
     return false;
   }
   if (rightWrapper) {
     // Left null, right non-null
--- a/dom/smil/nsSMILCompositor.cpp
+++ b/dom/smil/nsSMILCompositor.cpp
@@ -185,16 +185,16 @@ nsSMILCompositor::GetFirstFuncToAffectSa
 }
 
 void
 nsSMILCompositor::UpdateCachedBaseValue(const nsSMILValue& aBaseValue)
 {
   if (!mCachedBaseValue) {
     // We don't have last sample's base value cached. Assume it's changed.
     mCachedBaseValue = new nsSMILValue(aBaseValue);
-    NS_WARN_IF_FALSE(mCachedBaseValue, "failed to cache base value (OOM?)");
+    NS_WARNING_ASSERTION(mCachedBaseValue, "failed to cache base value (OOM?)");
     mForceCompositing = true;
   } else if (*mCachedBaseValue != aBaseValue) {
     // Base value has changed since last sample.
     *mCachedBaseValue = aBaseValue;
     mForceCompositing = true;
   }
 }
--- a/dom/voicemail/Voicemail.cpp
+++ b/dom/voicemail/Voicemail.cpp
@@ -82,18 +82,18 @@ Voicemail::Voicemail(nsPIDOMWindowInner*
                      nsIVoicemailService* aService)
   : DOMEventTargetHelper(aWindow)
   , mService(aService)
 {
   MOZ_ASSERT(mService);
 
   mListener = new Listener(this);
   DebugOnly<nsresult> rv = mService->RegisterListener(mListener);
-  NS_WARN_IF_FALSE(NS_SUCCEEDED(rv),
-                   "Failed registering voicemail messages with service");
+  NS_WARNING_ASSERTION(NS_SUCCEEDED(rv),
+                       "Failed registering voicemail messages with service");
 
   uint32_t length = 0;
   if (NS_SUCCEEDED(mService->GetNumItems(&length)) && length != 0) {
     mStatuses.SetLength(length);
   }
 }
 
 Voicemail::~Voicemail()
--- a/dom/workers/RuntimeService.cpp
+++ b/dom/workers/RuntimeService.cpp
@@ -2087,17 +2087,17 @@ RuntimeService::Shutdown()
 {
   AssertIsOnMainThread();
 
   MOZ_ASSERT(!mShuttingDown);
   // That's it, no more workers.
   mShuttingDown = true;
 
   nsCOMPtr<nsIObserverService> obs = services::GetObserverService();
-  NS_WARN_IF_FALSE(obs, "Failed to get observer service?!");
+  NS_WARNING_ASSERTION(obs, "Failed to get observer service?!");
 
   // Tell anyone that cares that they're about to lose worker support.
   if (obs && NS_FAILED(obs->NotifyObservers(nullptr, WORKERS_SHUTDOWN_TOPIC,
                                             nullptr))) {
     NS_WARNING("NotifyObservers failed!");
   }
 
   {
@@ -2124,17 +2124,17 @@ RuntimeService::Shutdown()
 // This spins the event loop until all workers are finished and their threads
 // have been joined.
 void
 RuntimeService::Cleanup()
 {
   AssertIsOnMainThread();
 
   nsCOMPtr<nsIObserverService> obs = services::GetObserverService();
-  NS_WARN_IF_FALSE(obs, "Failed to get observer service?!");
+  NS_WARNING_ASSERTION(obs, "Failed to get observer service?!");
 
   if (mIdleThreadTimer) {
     if (NS_FAILED(mIdleThreadTimer->Cancel())) {
       NS_WARNING("Failed to cancel idle timer!");
     }
     mIdleThreadTimer = nullptr;
   }
 
--- a/dom/workers/ServiceWorkerClient.cpp
+++ b/dom/workers/ServiceWorkerClient.cpp
@@ -137,17 +137,17 @@ private:
     if (NS_WARN_IF(rv.Failed())) {
       xpc::Throw(aCx, rv.StealNSResult());
       return NS_ERROR_FAILURE;
     }
 
     RootedDictionary<ServiceWorkerMessageEventInit> init(aCx);
 
     nsCOMPtr<nsIPrincipal> principal = aTargetContainer->GetParentObject()->PrincipalOrNull();
-    NS_WARN_IF_FALSE(principal, "Why is the principal null here?");
+    NS_WARNING_ASSERTION(principal, "Why is the principal null here?");
 
     bool isNullPrincipal = false;
     bool isSystemPrincipal = false;
     if (principal) {
       isNullPrincipal = principal->GetIsNullPrincipal();
       MOZ_ASSERT(!isNullPrincipal);
       isSystemPrincipal = principal->GetIsSystemPrincipal();
       MOZ_ASSERT(!isSystemPrincipal);
--- a/dom/workers/ServiceWorkerManager.cpp
+++ b/dom/workers/ServiceWorkerManager.cpp
@@ -2190,17 +2190,18 @@ public:
   }
 
   void
   HandleError()
   {
     AssertIsOnMainThread();
     NS_WARNING("Unexpected error while dispatching fetch event!");
     DebugOnly<nsresult> rv = mChannel->ResetInterception();
-    NS_WARN_IF_FALSE(NS_SUCCEEDED(rv), "Failed to resume intercepted network request");
+    NS_WARNING_ASSERTION(NS_SUCCEEDED(rv),
+                         "Failed to resume intercepted network request");
   }
 
   NS_IMETHOD
   Run() override
   {
     AssertIsOnMainThread();
 
     nsCOMPtr<nsIChannel> channel;
--- a/dom/workers/ServiceWorkerPrivate.cpp
+++ b/dom/workers/ServiceWorkerPrivate.cpp
@@ -1434,17 +1434,18 @@ private:
       : mChannel(aChannel)
     {
     }
 
     NS_IMETHOD Run() override
     {
       AssertIsOnMainThread();
       nsresult rv = mChannel->ResetInterception();
-      NS_WARN_IF_FALSE(NS_SUCCEEDED(rv), "Failed to resume intercepted network request");
+      NS_WARNING_ASSERTION(NS_SUCCEEDED(rv),
+                           "Failed to resume intercepted network request");
       return rv;
     }
   };
 
   bool
   DispatchFetchEvent(JSContext* aCx, WorkerPrivate* aWorkerPrivate)
   {
     MOZ_ASSERT(aCx);
--- a/dom/workers/ServiceWorkerRegistration.cpp
+++ b/dom/workers/ServiceWorkerRegistration.cpp
@@ -215,18 +215,20 @@ ServiceWorkerRegistrationMainThread::Get
       break;
     case WhichServiceWorker::ACTIVE_WORKER:
       rv = swm->GetActive(window, mScope, getter_AddRefs(serviceWorker));
       break;
     default:
       MOZ_CRASH("Invalid enum value");
   }
 
-  NS_WARN_IF_FALSE(NS_SUCCEEDED(rv) || rv == NS_ERROR_DOM_NOT_FOUND_ERR,
-                   "Unexpected error getting service worker instance from ServiceWorkerManager");
+  NS_WARNING_ASSERTION(
+    NS_SUCCEEDED(rv) || rv == NS_ERROR_DOM_NOT_FOUND_ERR,
+    "Unexpected error getting service worker instance from "
+    "ServiceWorkerManager");
   if (NS_FAILED(rv)) {
     return nullptr;
   }
 
   RefPtr<ServiceWorker> ref =
     static_cast<ServiceWorker*>(serviceWorker.get());
   return ref.forget();
 }
--- a/dom/workers/ServiceWorkerUpdateJob.cpp
+++ b/dom/workers/ServiceWorkerUpdateJob.cpp
@@ -385,17 +385,17 @@ ServiceWorkerUpdateJob::ComparisonResult
     nsXPIDLString message;
     NS_ConvertUTF8toUTF16 reportScope(mRegistration->mScope);
     NS_ConvertUTF8toUTF16 reportMaxPrefix(maxPrefix);
     const char16_t* params[] = { reportScope.get(), reportMaxPrefix.get() };
 
     rv = nsContentUtils::FormatLocalizedString(nsContentUtils::eDOM_PROPERTIES,
                                                "ServiceWorkerScopePathMismatch",
                                                params, message);
-    NS_WARN_IF_FALSE(NS_SUCCEEDED(rv), "Failed to format localized string");
+    NS_WARNING_ASSERTION(NS_SUCCEEDED(rv), "Failed to format localized string");
     RefPtr<ServiceWorkerManager> swm = ServiceWorkerManager::GetInstance();
     swm->ReportToAllClients(mScope,
                             message,
                             EmptyString(),
                             EmptyString(), 0, 0,
                             nsIScriptError::errorFlag);
     FailUpdateJob(NS_ERROR_DOM_SECURITY_ERR);
     return;
--- a/dom/workers/WorkerPrivate.cpp
+++ b/dom/workers/WorkerPrivate.cpp
@@ -285,31 +285,31 @@ LogErrorToConsole(const nsAString& aMess
                   uint32_t aColumnNumber,
                   uint32_t aFlags,
                   uint64_t aInnerWindowId)
 {
   AssertIsOnMainThread();
 
   nsCOMPtr<nsIScriptError> scriptError =
     do_CreateInstance(NS_SCRIPTERROR_CONTRACTID);
-  NS_WARN_IF_FALSE(scriptError, "Failed to create script error!");
+  NS_WARNING_ASSERTION(scriptError, "Failed to create script error!");
 
   if (scriptError) {
     if (NS_FAILED(scriptError->InitWithWindowID(aMessage, aFilename, aLine,
                                                 aLineNumber, aColumnNumber,
                                                 aFlags, "Web Worker",
                                                 aInnerWindowId))) {
       NS_WARNING("Failed to init script error!");
       scriptError = nullptr;
     }
   }
 
   nsCOMPtr<nsIConsoleService> consoleService =
     do_GetService(NS_CONSOLESERVICE_CONTRACTID);
-  NS_WARN_IF_FALSE(consoleService, "Failed to get console service!");
+  NS_WARNING_ASSERTION(consoleService, "Failed to get console service!");
 
   if (consoleService) {
     if (scriptError) {
       if (NS_SUCCEEDED(consoleService->LogMessage(scriptError))) {
         return;
       }
       NS_WARNING("LogMessage failed!");
     } else if (NS_SUCCEEDED(consoleService->LogStringMessage(
@@ -2431,19 +2431,19 @@ WorkerPrivateParent<Derived>::GetEventTa
         ParentStatus() <= Running &&
         self->mStatus <= Running) {
       mEventTarget = new EventTarget(self);
     }
 
     target = mEventTarget;
   }
 
-  NS_WARN_IF_FALSE(target,
-                   "Requested event target for a worker that is already "
-                   "shutting down!");
+  NS_WARNING_ASSERTION(
+    target,
+    "Requested event target for a worker that is already shutting down!");
 
   return target.forget();
 }
 
 template <class Derived>
 bool
 WorkerPrivateParent<Derived>::Start()
 {
--- a/dom/workers/WorkerRunnable.cpp
+++ b/dom/workers/WorkerRunnable.cpp
@@ -480,20 +480,20 @@ MainThreadStopSyncLoopRunnable::MainThre
   mWorkerPrivate->AssertValidSyncLoop(mSyncLoopTarget);
 #endif
 }
 
 nsresult
 MainThreadStopSyncLoopRunnable::Cancel()
 {
   nsresult rv = Run();
-  NS_WARN_IF_FALSE(NS_SUCCEEDED(rv), "Run() failed");
+  NS_WARNING_ASSERTION(NS_SUCCEEDED(rv), "Run() failed");
 
   nsresult rv2 = WorkerSyncRunnable::Cancel();
-  NS_WARN_IF_FALSE(NS_SUCCEEDED(rv2), "Cancel() failed");
+  NS_WARNING_ASSERTION(NS_SUCCEEDED(rv2), "Cancel() failed");
 
   return NS_FAILED(rv) ? rv : rv2;
 }
 
 bool
 MainThreadStopSyncLoopRunnable::WorkerRun(JSContext* aCx,
                                           WorkerPrivate* aWorkerPrivate)
 {
--- a/dom/xul/XULDocument.cpp
+++ b/dom/xul/XULDocument.cpp
@@ -3014,18 +3014,19 @@ XULDocument::DoneWalking()
         StartLayout();
 
         if (mIsWritingFastLoad && IsChromeURI(mDocumentURI))
             nsXULPrototypeCache::GetInstance()->WritePrototype(mMasterPrototype);
 
         NS_ASSERTION(mDelayFrameLoaderInitialization,
                      "mDelayFrameLoaderInitialization should be true!");
         mDelayFrameLoaderInitialization = false;
-        NS_WARN_IF_FALSE(mUpdateNestLevel == 0,
-                         "Constructing XUL document in middle of an update?");
+        NS_WARNING_ASSERTION(
+          mUpdateNestLevel == 0,
+          "Constructing XUL document in middle of an update?");
         if (mUpdateNestLevel == 0) {
             MaybeInitializeFinalizeFrameLoaders();
         }
 
         NS_DOCUMENT_NOTIFY_OBSERVERS(EndLoad, (this));
 
         // DispatchContentLoadedEvents undoes the onload-blocking we
         // did in PrepareToWalk().
--- a/editor/libeditor/TextEditRules.cpp
+++ b/editor/libeditor/TextEditRules.cpp
@@ -117,17 +117,17 @@ TextEditRules::Init(TextEditor* aTextEdi
     return NS_ERROR_NULL_POINTER;
   }
 
   InitFields();
 
   // We hold a non-refcounted reference back to our editor.
   mTextEditor = aTextEditor;
   RefPtr<Selection> selection = mTextEditor->GetSelection();
-  NS_WARN_IF_FALSE(selection, "editor cannot get selection");
+  NS_WARNING_ASSERTION(selection, "editor cannot get selection");
 
   // Put in a magic br if needed. This method handles null selection,
   // which should never happen anyway
   nsresult res = CreateBogusNodeIfNeeded(selection);
   NS_ENSURE_SUCCESS(res, res);
 
   // If the selection hasn't been set up yet, set it up collapsed to the end of
   // our editable content.
--- a/embedding/browser/nsWebBrowser.cpp
+++ b/embedding/browser/nsWebBrowser.cpp
@@ -1249,17 +1249,17 @@ nsWebBrowser::Create()
     mInitInfo->sessionHistory = do_CreateInstance(NS_SHISTORY_CONTRACTID, &rv);
     NS_ENSURE_SUCCESS(rv, rv);
   }
   mDocShellAsNav->SetSessionHistory(mInitInfo->sessionHistory);
 
   if (XRE_IsParentProcess()) {
     // Hook up global history. Do not fail if we can't - just warn.
     rv = EnableGlobalHistory(mShouldEnableHistory);
-    NS_WARN_IF_FALSE(NS_SUCCEEDED(rv), "EnableGlobalHistory() failed");
+    NS_WARNING_ASSERTION(NS_SUCCEEDED(rv), "EnableGlobalHistory() failed");
   }
 
   NS_ENSURE_SUCCESS(mDocShellAsWin->Create(), NS_ERROR_FAILURE);
 
   // Hook into the OnSecurityChange() notification for lock/unlock icon
   // updates
   nsCOMPtr<mozIDOMWindowProxy> domWindow;
   rv = GetContentDOMWindow(getter_AddRefs(domWindow));
--- a/embedding/components/webbrowserpersist/nsWebBrowserPersist.cpp
+++ b/embedding/components/webbrowserpersist/nsWebBrowserPersist.cpp
@@ -1002,17 +1002,18 @@ nsWebBrowserPersist::OnDataAvailable(
             NS_SUCCEEDED(channel->GetContentLength(&channelContentLength)))
         {
             // if we get -1 at this point, we didn't get content-length header
             // assume that we got all of the data and push what we have;
             // that's the best we can do now
             if ((-1 == channelContentLength) ||
                 ((channelContentLength - (aOffset + aLength)) == 0))
             {
-                NS_WARN_IF_FALSE(channelContentLength != -1,
+                NS_WARNING_ASSERTION(
+                    channelContentLength != -1,
                     "nsWebBrowserPersist::OnDataAvailable() no content length "
                     "header, pushing what we have");
                 // we're done with this pass; see if we need to do upload
                 nsAutoCString contentType;
                 channel->GetContentType(contentType);
                 // if we don't have the right type of output stream then it's a local file
                 nsCOMPtr<nsIStorageStream> storStream(do_QueryInterface(data->mStream));
                 if (storStream)
--- a/extensions/spellcheck/src/mozInlineSpellChecker.cpp
+++ b/extensions/spellcheck/src/mozInlineSpellChecker.cpp
@@ -907,18 +907,19 @@ mozInlineSpellChecker::SpellCheckAfterEd
 //
 //    Spellchecks all the words in the given range.
 //    Supply a nullptr range and this will check the entire editor.
 
 nsresult
 mozInlineSpellChecker::SpellCheckRange(nsIDOMRange* aRange)
 {
   if (!mSpellCheck) {
-    NS_WARN_IF_FALSE(mPendingSpellCheck,
-                     "Trying to spellcheck, but checking seems to be disabled");
+    NS_WARNING_ASSERTION(
+      mPendingSpellCheck,
+      "Trying to spellcheck, but checking seems to be disabled");
     return NS_ERROR_NOT_INITIALIZED;
   }
 
   mozInlineSpellStatus status(this);
   nsRange* range = static_cast<nsRange*>(aRange);
   nsresult rv = status.InitForRange(range);
   NS_ENSURE_SUCCESS(rv, rv);
   return ScheduleSpellCheck(status);
--- a/gfx/gl/GLContextProviderGLX.cpp
+++ b/gfx/gl/GLContextProviderGLX.cpp
@@ -418,18 +418,19 @@ GLXLibrary::CreatePixmap(gfxASurface* aS
         }
 
         matchIndex = i;
         break;
     }
     if (matchIndex == -1) {
         // GLX can't handle A8 surfaces, so this is not really unexpected. The
         // caller should deal with this situation.
-        NS_WARN_IF_FALSE(format->depth == 8,
-                         "[GLX] Couldn't find a FBConfig matching Pixmap format");
+        NS_WARNING_ASSERTION(
+          format->depth == 8,
+          "[GLX] Couldn't find a FBConfig matching Pixmap format");
         return X11None;
     }
 
     int pixmapAttribs[] = { LOCAL_GLX_TEXTURE_TARGET_EXT, LOCAL_GLX_TEXTURE_2D_EXT,
                             LOCAL_GLX_TEXTURE_FORMAT_EXT,
                             (alphaSize ? LOCAL_GLX_TEXTURE_FORMAT_RGBA_EXT
                              : LOCAL_GLX_TEXTURE_FORMAT_RGB_EXT),
                             X11None};
--- a/gfx/layers/RotatedBuffer.cpp
+++ b/gfx/layers/RotatedBuffer.cpp
@@ -350,32 +350,32 @@ RotatedContentBuffer::EnsureBuffer()
 {
   NS_ASSERTION(!mLoanedDrawTarget, "Loaned draw target must be returned");
   if (!mDTBuffer || !mDTBuffer->IsValid()) {
     if (mBufferProvider) {
       mDTBuffer = mBufferProvider->BorrowDrawTarget();
     }
   }
 
-  NS_WARN_IF_FALSE(mDTBuffer && mDTBuffer->IsValid(), "no buffer");
+  NS_WARNING_ASSERTION(mDTBuffer && mDTBuffer->IsValid(), "no buffer");
   return !!mDTBuffer;
 }
 
 bool
 RotatedContentBuffer::EnsureBufferOnWhite()
 {
   NS_ASSERTION(!mLoanedDrawTarget, "Loaned draw target must be returned");
   if (!mDTBufferOnWhite) {
     if (mBufferProviderOnWhite) {
       mDTBufferOnWhite =
         mBufferProviderOnWhite->BorrowDrawTarget();
     }
   }
 
-  NS_WARN_IF_FALSE(mDTBufferOnWhite, "no buffer");
+  NS_WARNING_ASSERTION(mDTBufferOnWhite, "no buffer");
   return !!mDTBufferOnWhite;
 }
 
 bool
 RotatedContentBuffer::HaveBuffer() const
 {
   return mBufferProvider || (mDTBuffer && mDTBuffer->IsValid());
 }
--- a/gfx/layers/basic/BasicPaintedLayer.cpp
+++ b/gfx/layers/basic/BasicPaintedLayer.cpp
@@ -198,18 +198,19 @@ BasicPaintedLayer::Validate(LayerManager
     if (target) {
       mContentClient->ReturnDrawTargetToBuffer(target);
       target = nullptr;
     }
 
     // It's possible that state.mRegionToInvalidate is nonempty here,
     // if we are shrinking the valid region to nothing. So use mRegionToDraw
     // instead.
-    NS_WARN_IF_FALSE(state.mRegionToDraw.IsEmpty(),
-                     "No context when we have something to draw, resource exhaustion?");
+    NS_WARNING_ASSERTION(
+      state.mRegionToDraw.IsEmpty(),
+      "No context when we have something to draw, resource exhaustion?");
   }
 
   for (uint32_t i = 0; i < readbackUpdates.Length(); ++i) {
     ReadbackProcessor::Update& update = readbackUpdates[i];
     nsIntPoint offset = update.mLayer->GetBackgroundLayerOffset();
     RefPtr<DrawTarget> dt =
       update.mLayer->GetSink()->BeginUpdate(update.mUpdateRect + offset,
                                             update.mSequenceCounter);
--- a/gfx/layers/composite/TextureHost.cpp
+++ b/gfx/layers/composite/TextureHost.cpp
@@ -508,17 +508,17 @@ BufferTextureHost::UpdatedInternal(const
   // we still need to update the full surface.
   if (aRegion && !mNeedsFullUpdate) {
     mMaybeUpdatedRegion.OrWith(*aRegion);
   } else {
     mNeedsFullUpdate = true;
   }
   if (GetFlags() & TextureFlags::IMMEDIATE_UPLOAD) {
     DebugOnly<bool> result = MaybeUpload(!mNeedsFullUpdate ? &mMaybeUpdatedRegion : nullptr);
-    NS_WARN_IF_FALSE(result, "Failed to upload a texture");
+    NS_WARNING_ASSERTION(result, "Failed to upload a texture");
   }
 }
 
 void
 BufferTextureHost::SetCompositor(Compositor* aCompositor)
 {
   MOZ_ASSERT(aCompositor);
   if (mCompositor == aCompositor) {
--- a/gfx/layers/composite/TiledContentHost.cpp
+++ b/gfx/layers/composite/TiledContentHost.cpp
@@ -291,18 +291,19 @@ TiledLayerBufferComposite::UseTiles(cons
   // to a TextureSource for gralloc (binding EGLImage to GL texture) can be really
   // high, so we avoid this whenever possible.
   for (size_t i = 0; i < tileDescriptors.Length(); i++) {
     const TileDescriptor& tileDesc = tileDescriptors[i];
 
     TileHost& tile = mRetainedTiles[i];
 
     if (tileDesc.type() != TileDescriptor::TTexturedTileDescriptor) {
-      NS_WARN_IF_FALSE(tileDesc.type() == TileDescriptor::TPlaceholderTileDescriptor,
-                       "Unrecognised tile descriptor type");
+      NS_WARNING_ASSERTION(
+        tileDesc.type() == TileDescriptor::TPlaceholderTileDescriptor,
+        "Unrecognised tile descriptor type");
       continue;
     }
 
     const TexturedTileDescriptor& texturedDesc = tileDesc.get_TexturedTileDescriptor();
 
     tile.mTextureHost = TextureHost::AsTextureHost(texturedDesc.textureParent());
     tile.mTextureHost->SetCompositor(aCompositor);
     tile.mTextureHost->DeserializeReadLock(texturedDesc.sharedLock(), aAllocator);
--- a/gfx/layers/d3d9/Nv3DVUtils.cpp
+++ b/gfx/layers/d3d9/Nv3DVUtils.cpp
@@ -34,17 +34,17 @@ Nv3DVUtils::~Nv3DVUtils()
 
 
 // Silence spurious warnings!
 #if defined(WARNING) || defined WARN_IF_FALSE
 #error We shouldn't be redefining these!
 #endif
 // Uncomment these to enable spurious warnings.
 //#define WARNING(str) NS_WARNING(str)
-//#define WARN_IF_FALSE(b, str) NS_WARN_IF_FALSE(b, str)
+//#define WARN_IF_FALSE(b, str) NS_WARNING_ASSERTION(b, str)
 #define WARNING(str)
 #define WARN_IF_FALSE(b, str)
 
 /**
  * Initializes the Nv3DVUtils object.
  */
 void
 Nv3DVUtils::Initialize()
--- a/gfx/src/X11Util.cpp
+++ b/gfx/src/X11Util.cpp
@@ -56,17 +56,19 @@ ScopedXErrorHandler::ErrorHandler(Displa
       sXErrorPtr->mError = *ev;
     return 0;
 }
 
 ScopedXErrorHandler::ScopedXErrorHandler()
 {
     // Off main thread usage is not safe in general, but OMTC GL layers uses this
     // with the main thread blocked, which makes it safe.
-    NS_WARN_IF_FALSE(NS_IsMainThread(), "ScopedXErrorHandler being called off main thread, may cause issues");
+    NS_WARNING_ASSERTION(
+        NS_IsMainThread(),
+        "ScopedXErrorHandler being called off main thread, may cause issues");
     // let sXErrorPtr point to this object's mXError object, but don't reset this mXError object!
     // think of the case of nested ScopedXErrorHandler's.
     mOldXErrorPtr = sXErrorPtr;
     sXErrorPtr = &mXError;
     mOldErrorHandler = XSetErrorHandler(ErrorHandler);
 }
 
 ScopedXErrorHandler::~ScopedXErrorHandler()
--- a/gfx/thebes/gfxCoreTextShaper.cpp
+++ b/gfx/thebes/gfxCoreTextShaper.cpp
@@ -440,18 +440,19 @@ gfxCoreTextShaper::SetGlyphsFromRun(gfxS
     bool isRightToLeft = aShapedText->IsRightToLeft();
     int32_t glyphStart = 0; // looking for a clump that starts at this glyph index
     int32_t charStart = isRightToLeft ?
         stringRange.length - 1 : 0; // and this char index (in the stringRange of the glyph run)
 
     while (glyphStart < numGlyphs) { // keep finding groups until all glyphs are accounted for
         bool inOrder = true;
         int32_t charEnd = glyphToChar[glyphStart] - stringRange.location;
-        NS_WARN_IF_FALSE(charEnd >= 0 && charEnd < stringRange.length,
-                         "glyph-to-char mapping points outside string range");
+        NS_WARNING_ASSERTION(
+            charEnd >= 0 && charEnd < stringRange.length,
+            "glyph-to-char mapping points outside string range");
         // clamp charEnd to the valid range of the string
         charEnd = std::max(charEnd, 0);
         charEnd = std::min(charEnd, int32_t(stringRange.length));
 
         int32_t glyphEnd = glyphStart;
         int32_t charLimit = isRightToLeft ? -1 : stringRange.length;
         do {
             // This is normally executed once for each iteration of the outer loop,
@@ -521,26 +522,26 @@ gfxCoreTextShaper::SetGlyphsFromRun(gfxS
                     prevGlyphCharIndex = glyphCharIndex;
                 }
             }
             if (allGlyphsAreWithinCluster) {
                 break;
             }
         } while (charEnd != charLimit);
 
-        NS_WARN_IF_FALSE(glyphStart < glyphEnd,
-                         "character/glyph clump contains no glyphs!");
+        NS_WARNING_ASSERTION(glyphStart < glyphEnd,
+                             "character/glyph clump contains no glyphs!");
         if (glyphStart == glyphEnd) {
             ++glyphStart; // make progress - avoid potential infinite loop
             charStart = charEnd;
             continue;
         }
 
-        NS_WARN_IF_FALSE(charStart != charEnd,
-                         "character/glyph clump contains no characters!");
+        NS_WARNING_ASSERTION(charStart != charEnd,
+                             "character/glyph clump contains no characters!");
         if (charStart == charEnd) {
             glyphStart = glyphEnd; // this is bad - we'll discard the glyph(s),
                                    // as there's nowhere to attach them
             continue;
         }
 
         // Now charStart..charEnd is a ligature clump, corresponding to glyphStart..glyphEnd;
         // Set baseCharIndex to the char we'll actually attach the glyphs to (1st of ligature),
--- a/gfx/thebes/gfxFont.cpp
+++ b/gfx/thebes/gfxFont.cpp
@@ -197,18 +197,18 @@ gfxFontCache::~gfxFontCache()
     if (mWordCacheExpirationTimer) {
         mWordCacheExpirationTimer->Cancel();
         mWordCacheExpirationTimer = nullptr;
     }
 
     // Expire everything that has a zero refcount, so we don't leak them.
     AgeAllGenerations();
     // All fonts should be gone.
-    NS_WARN_IF_FALSE(mFonts.Count() == 0,
-                     "Fonts still alive while shutting down gfxFontCache");
+    NS_WARNING_ASSERTION(mFonts.Count() == 0,
+                         "Fonts still alive while shutting down gfxFontCache");
     // Note that we have to delete everything through the expiration
     // tracker, since there might be fonts not in the hashtable but in
     // the tracker.
 }
 
 bool
 gfxFontCache::HashEntry::KeyEquals(const KeyTypePointer aKey) const
 {
@@ -1815,18 +1815,19 @@ gfxFont::DrawOneGlyph(uint32_t aGlyphID,
     }
     gfxPoint devPt(ToDeviceUnits(glyphX, runParams.devPerApp),
                    ToDeviceUnits(glyphY, runParams.devPerApp));
 
     if (fontParams.haveSVGGlyphs) {
         if (!runParams.paintSVGGlyphs) {
             return;
         }
-        NS_WARN_IF_FALSE(runParams.drawMode != DrawMode::GLYPH_PATH,
-                         "Rendering SVG glyph despite request for glyph path");
+        NS_WARNING_ASSERTION(
+          runParams.drawMode != DrawMode::GLYPH_PATH,
+          "Rendering SVG glyph despite request for glyph path");
         if (RenderSVGGlyph(runParams.context, devPt,
                            aGlyphID, fontParams.contextPaint,
                            runParams.callbacks, *aEmittedGlyphs)) {
             return;
         }
     }
 
     if (fontParams.haveColorGlyphs &&
@@ -2598,17 +2599,17 @@ gfxFont::GetShapedWord(DrawTarget *aDraw
     if (!sw) {
         NS_WARNING("failed to create gfxShapedWord - expect missing text");
         return nullptr;
     }
 
     DebugOnly<bool> ok =
         ShapeText(aDrawTarget, aText, 0, aLength, aRunScript, aVertical, sw);
 
-    NS_WARN_IF_FALSE(ok, "failed to shape word - expect garbled text");
+    NS_WARNING_ASSERTION(ok, "failed to shape word - expect garbled text");
 
     return sw;
 }
 
 bool
 gfxFont::CacheHashEntry::KeyEquals(const KeyTypePointer aKey) const
 {
     const gfxShapedWord* sw = mShapedWord.get();
@@ -2690,17 +2691,17 @@ gfxFont::ShapeText(DrawTarget      *aDra
     if (!ok) {
         if (!mHarfBuzzShaper) {
             mHarfBuzzShaper = MakeUnique<gfxHarfBuzzShaper>(this);
         }
         ok = mHarfBuzzShaper->ShapeText(aDrawTarget, aText, aOffset, aLength,
                                         aScript, aVertical, aShapedText);
     }
 
-    NS_WARN_IF_FALSE(ok, "shaper failed, expect scrambled or missing text");
+    NS_WARNING_ASSERTION(ok, "shaper failed, expect scrambled or missing text");
 
     PostShapingFixup(aDrawTarget, aText, aOffset, aLength,
                      aVertical, aShapedText);
 
     return ok;
 }
 
 void
@@ -2841,17 +2842,17 @@ gfxFont::ShapeTextWithoutWordCache(DrawT
                                               aScript, aVertical, aTextRun);
             } else {
                 aTextRun->SetMissingGlyph(aOffset + i, ch, this);
             }
         }
         fragStart = i + 1;
     }
 
-    NS_WARN_IF_FALSE(ok, "failed to shape text - expect garbled text");
+    NS_WARNING_ASSERTION(ok, "failed to shape text - expect garbled text");
     return ok;
 }
 
 #ifndef RELEASE_BUILD
 #define TEXT_PERF_INCR(tp, m) (tp ? (tp)->current.m++ : 0)
 #else
 #define TEXT_PERF_INCR(tp, m)
 #endif
--- a/gfx/thebes/gfxHarfBuzzShaper.cpp
+++ b/gfx/thebes/gfxHarfBuzzShaper.cpp
@@ -1510,17 +1510,18 @@ gfxHarfBuzzShaper::ShapeText(DrawTarget 
 
     if (isRightToLeft) {
         hb_buffer_reverse(buffer);
     }
 
     nsresult rv = SetGlyphsFromRun(aDrawTarget, aShapedText, aOffset, aLength,
                                    aText, buffer, aVertical);
 
-    NS_WARN_IF_FALSE(NS_SUCCEEDED(rv), "failed to store glyphs into gfxShapedWord");
+    NS_WARNING_ASSERTION(NS_SUCCEEDED(rv),
+                         "failed to store glyphs into gfxShapedWord");
     hb_buffer_destroy(buffer);
 
     return NS_SUCCEEDED(rv);
 }
 
 #define SMALL_GLYPH_RUN 128 // some testing indicates that 90%+ of text runs
                             // will fit without requiring separate allocation
                             // for charToGlyphArray
--- a/gfx/thebes/gfxTextRun.cpp
+++ b/gfx/thebes/gfxTextRun.cpp
@@ -1311,20 +1311,22 @@ gfxTextRun::CopyGlyphDataFrom(gfxTextRun
         // Although it's unusual (and not desirable), it's possible for us to assign
         // different fonts to a base character and a following diacritic.
         // Example on OSX 10.5/10.6 with default fonts installed:
         //     data:text/html,<p style="font-family:helvetica, arial, sans-serif;">
         //                    &%23x043E;&%23x0486;&%23x20;&%23x043E;&%23x0486;
         // This means the rendering of the cluster will probably not be very good,
         // but it's the best we can do for now if the specified font only covered the
         // initial base character and not its applied marks.
-        NS_WARN_IF_FALSE(aSource->IsClusterStart(start),
-                         "Started font run in the middle of a cluster");
-        NS_WARN_IF_FALSE(end == aSource->GetLength() || aSource->IsClusterStart(end),
-                         "Ended font run in the middle of a cluster");
+        NS_WARNING_ASSERTION(
+          aSource->IsClusterStart(start),
+          "Started font run in the middle of a cluster");
+        NS_WARNING_ASSERTION(
+          end == aSource->GetLength() || aSource->IsClusterStart(end),
+          "Ended font run in the middle of a cluster");
 
         nsresult rv = AddGlyphRun(font, iter.GetGlyphRun()->mMatchType,
                                   start - aRange.start + aDest, false,
                                   iter.GetGlyphRun()->mOrientation);
         if (NS_FAILED(rv))
             return;
     }
 }
--- a/ipc/glue/MessageChannel.cpp
+++ b/ipc/glue/MessageChannel.cpp
@@ -2276,18 +2276,19 @@ MessageChannel::DebugAbort(const char* f
     }
 
     NS_RUNTIMEABORT(why);
 }
 
 void
 MessageChannel::DumpInterruptStack(const char* const pfx) const
 {
-    NS_WARN_IF_FALSE(MessageLoop::current() != mWorkerLoop,
-                     "The worker thread had better be paused in a debugger!");
+    NS_WARNING_ASSERTION(
+      MessageLoop::current() != mWorkerLoop,
+      "The worker thread had better be paused in a debugger!");
 
     printf_stderr("%sMessageChannel 'backtrace':\n", pfx);
 
     // print a python-style backtrace, first frame to last
     for (uint32_t i = 0; i < mCxxStackFrames.length(); ++i) {
         int32_t id;
         const char* dir;
         const char* sems;
--- a/js/xpconnect/src/nsScriptError.cpp
+++ b/js/xpconnect/src/nsScriptError.cpp
@@ -296,19 +296,19 @@ nsScriptErrorBase::ToString(nsACString& 
     aResult.Assign(temp);
     JS_smprintf_free(temp);
     return NS_OK;
 }
 
 NS_IMETHODIMP
 nsScriptErrorBase::GetOuterWindowID(uint64_t* aOuterWindowID)
 {
-    NS_WARN_IF_FALSE(NS_IsMainThread() || mInitializedOnMainThread,
-                     "This can't be safely determined off the main thread, "
-                     "returning an inaccurate value!");
+    NS_WARNING_ASSERTION(NS_IsMainThread() || mInitializedOnMainThread,
+                         "This can't be safely determined off the main thread, "
+                         "returning an inaccurate value!");
 
     if (!mInitializedOnMainThread && NS_IsMainThread()) {
         InitializeOnMainThread();
     }
 
     *aOuterWindowID = mOuterWindowID;
     return NS_OK;
 }
@@ -325,19 +325,19 @@ nsScriptErrorBase::GetTimeStamp(int64_t*
 {
     *aTimeStamp = mTimeStamp;
     return NS_OK;
 }
 
 NS_IMETHODIMP
 nsScriptErrorBase::GetIsFromPrivateWindow(bool* aIsFromPrivateWindow)
 {
-    NS_WARN_IF_FALSE(NS_IsMainThread() || mInitializedOnMainThread,
-                     "This can't be safely determined off the main thread, "
-                     "returning an inaccurate value!");
+    NS_WARNING_ASSERTION(NS_IsMainThread() || mInitializedOnMainThread,
+                         "This can't be safely determined off the main thread, "
+                         "returning an inaccurate value!");
 
     if (!mInitializedOnMainThread && NS_IsMainThread()) {
         InitializeOnMainThread();
     }
 
     *aIsFromPrivateWindow = mIsFromPrivateWindow;
     return NS_OK;
 }
--- a/layout/base/RestyleManagerBase.cpp
+++ b/layout/base/RestyleManagerBase.cpp
@@ -565,19 +565,19 @@ RecomputePosition(nsIFrame* aFrame)
     cbReflowInput.emplace(cbFrame->PresContext(), cbFrame, &rc, cbSize);
     cbReflowInput->ComputedPhysicalMargin() = cbFrame->GetUsedMargin();
     cbReflowInput->ComputedPhysicalPadding() = cbFrame->GetUsedPadding();
     cbReflowInput->ComputedPhysicalBorderPadding() =
       cbFrame->GetUsedBorderAndPadding();
     parentReflowInput.mCBReflowInput = cbReflowInput.ptr();
   }
 
-  NS_WARN_IF_FALSE(parentSize.ISize(parentWM) != NS_INTRINSICSIZE &&
-                   parentSize.BSize(parentWM) != NS_INTRINSICSIZE,
-                   "parentSize should be valid");
+  NS_WARNING_ASSERTION(parentSize.ISize(parentWM) != NS_INTRINSICSIZE &&
+                       parentSize.BSize(parentWM) != NS_INTRINSICSIZE,
+                       "parentSize should be valid");
   parentReflowInput.SetComputedISize(std::max(parentSize.ISize(parentWM), 0));
   parentReflowInput.SetComputedBSize(std::max(parentSize.BSize(parentWM), 0));
   parentReflowInput.ComputedPhysicalMargin().SizeTo(0, 0, 0, 0);
 
   parentReflowInput.ComputedPhysicalPadding() = parentFrame->GetUsedPadding();
   parentReflowInput.ComputedPhysicalBorderPadding() =
     parentFrame->GetUsedBorderAndPadding();
   LogicalSize availSize = parentSize.ConvertTo(frameWM, parentWM);
--- a/layout/base/nsCSSRendering.cpp
+++ b/layout/base/nsCSSRendering.cpp
@@ -1807,18 +1807,18 @@ SetupDirtyRects(const nsRect& aBGClipAre
                 nscoord aAppUnitsPerPixel,
                 /* OUT: */
                 nsRect* aDirtyRect, gfxRect* aDirtyRectGfx)
 {
   aDirtyRect->IntersectRect(aBGClipArea, aCallerDirtyRect);
 
   // Compute the Thebes equivalent of the dirtyRect.
   *aDirtyRectGfx = nsLayoutUtils::RectToGfxRect(*aDirtyRect, aAppUnitsPerPixel);
-  NS_WARN_IF_FALSE(aDirtyRect->IsEmpty() || !aDirtyRectGfx->IsEmpty(),
-                   "converted dirty rect should not be empty");
+  NS_WARNING_ASSERTION(aDirtyRect->IsEmpty() || !aDirtyRectGfx->IsEmpty(),
+                       "converted dirty rect should not be empty");
   MOZ_ASSERT(!aDirtyRect->IsEmpty() || aDirtyRectGfx->IsEmpty(),
              "second should be empty if first is");
 }
 
 /* static */ void
 nsCSSRendering::GetImageLayerClip(const nsStyleImageLayers::Layer& aLayer,
                                   nsIFrame* aForFrame, const nsStyleBorder& aBorder,
                                   const nsRect& aBorderArea, const nsRect& aCallerDirtyRect,
--- a/layout/base/nsDocumentViewer.cpp
+++ b/layout/base/nsDocumentViewer.cpp
@@ -2479,18 +2479,18 @@ nsDocumentViewer::FindContainerView()
     return nullptr;
   }
 
   // subdocFrame might not be a subdocument frame; the frame
   // constructor can treat a <frame> as an inline in some XBL
   // cases. Treat that as display:none, the document is not
   // displayed.
   if (subdocFrame->GetType() != nsGkAtoms::subDocumentFrame) {
-    NS_WARN_IF_FALSE(!subdocFrame->GetType(),
-                     "Subdocument container has non-subdocument frame");
+    NS_WARNING_ASSERTION(!subdocFrame->GetType(),
+                         "Subdocument container has non-subdocument frame");
     return nullptr;
   }
 
   NS_ASSERTION(subdocFrame->GetView(), "Subdoc frames must have views");
   return static_cast<nsSubDocumentFrame*>(subdocFrame)->EnsureInnerView();
 }
 
 nsresult
@@ -3777,18 +3777,19 @@ nsDocumentViewer::Print(nsIPrintSettings
 }
 
 NS_IMETHODIMP
 nsDocumentViewer::PrintPreview(nsIPrintSettings* aPrintSettings, 
                                mozIDOMWindowProxy* aChildDOMWin, 
                                nsIWebProgressListener* aWebProgressListener)
 {
 #if defined(NS_PRINTING) && defined(NS_PRINT_PREVIEW)
-  NS_WARN_IF_FALSE(IsInitializedForPrintPreview(),
-                   "Using docshell.printPreview is the preferred way for print previewing!");
+  NS_WARNING_ASSERTION(
+    IsInitializedForPrintPreview(),
+    "Using docshell.printPreview is the preferred way for print previewing!");
 
   NS_ENSURE_ARG_POINTER(aChildDOMWin);
   nsresult rv = NS_OK;
 
   if (GetIsPrinting()) {
     nsPrintEngine::CloseProgressDialog(aWebProgressListener);
     return NS_ERROR_FAILURE;
   }
--- a/layout/base/nsLayoutUtils.cpp
+++ b/layout/base/nsLayoutUtils.cpp
@@ -5155,20 +5155,20 @@ nsLayoutUtils::MinSizeContributionForAxi
 
   return result;
 }
 
 /* static */ nscoord
 nsLayoutUtils::ComputeCBDependentValue(nscoord aPercentBasis,
                                        const nsStyleCoord& aCoord)
 {
-  NS_WARN_IF_FALSE(aPercentBasis != NS_UNCONSTRAINEDSIZE,
-                   "have unconstrained width or height; this should only "
-                   "result from very large sizes, not attempts at intrinsic "
-                   "size calculation");
+  NS_WARNING_ASSERTION(
+    aPercentBasis != NS_UNCONSTRAINEDSIZE,
+    "have unconstrained width or height; this should only result from very "
+    "large sizes, not attempts at intrinsic size calculation");
 
   if (aCoord.IsCoordPercentCalcUnit()) {
     return nsRuleNode::ComputeCoordPercentCalc(aCoord, aPercentBasis);
   }
   NS_ASSERTION(aCoord.GetUnit() == eStyleUnit_None ||
                aCoord.GetUnit() == eStyleUnit_Auto,
                "unexpected width value");
   return 0;
@@ -7484,17 +7484,19 @@ nsLayoutUtils::SurfaceFromElement(HTMLCa
 
 nsLayoutUtils::SurfaceFromElementResult
 nsLayoutUtils::SurfaceFromElement(HTMLVideoElement* aElement,
                                   uint32_t aSurfaceFlags,
                                   RefPtr<DrawTarget>& aTarget)
 {
   SurfaceFromElementResult result;
 
-  NS_WARN_IF_FALSE((aSurfaceFlags & SFE_PREFER_NO_PREMULTIPLY_ALPHA) == 0, "We can't support non-premultiplied alpha for video!");
+  NS_WARNING_ASSERTION(
+    (aSurfaceFlags & SFE_PREFER_NO_PREMULTIPLY_ALPHA) == 0,
+    "We can't support non-premultiplied alpha for video!");
 
 #ifdef MOZ_EME
   if (aElement->ContainsRestrictedContent()) {
     return result;
   }
 #endif
 
   uint16_t readyState;
--- a/layout/base/nsPresContext.cpp
+++ b/layout/base/nsPresContext.cpp
@@ -1157,21 +1157,21 @@ nsPresContext::CompatibilityModeChanged(
   StyleSetHandle styleSet = mShell->StyleSet();
   auto cache = nsLayoutStylesheetCache::For(styleSet->BackendType());
   StyleSheetHandle sheet = cache->QuirkSheet();
 
   if (needsQuirkSheet) {
     // quirk.css needs to come after html.css; we just keep it at the end.
     DebugOnly<nsresult> rv =
       styleSet->AppendStyleSheet(SheetType::Agent, sheet);
-    NS_WARN_IF_FALSE(NS_SUCCEEDED(rv), "failed to insert quirk.css");
+    NS_WARNING_ASSERTION(NS_SUCCEEDED(rv), "failed to insert quirk.css");
   } else {
     DebugOnly<nsresult> rv =
       styleSet->RemoveStyleSheet(SheetType::Agent, sheet);
-    NS_WARN_IF_FALSE(NS_SUCCEEDED(rv), "failed to remove quirk.css");
+    NS_WARNING_ASSERTION(NS_SUCCEEDED(rv), "failed to remove quirk.css");
   }
 
   mQuirkSheetAdded = needsQuirkSheet;
 }
 
 // Helper function for setting Anim Mode on image
 static void SetImgAnimModeOnImgReq(imgIRequest* aImgReq, uint16_t aMode)
 {
--- a/layout/base/nsPresShell.cpp
+++ b/layout/base/nsPresShell.cpp
@@ -1315,17 +1315,18 @@ PresShell::Destroy()
     // now dead, we shouldn't be looking up any more properties in that table.
     // We want to do this before we call DetachShell() on the prescontext, so
     // property destructors can usefully call GetPresShell() on the
     // prescontext.
     mPresContext->PropertyTable()->DeleteAll();
   }
 
 
-  NS_WARN_IF_FALSE(!mWeakFrames, "Weak frames alive after destroying FrameManager");
+  NS_WARNING_ASSERTION(!mWeakFrames,
+                       "Weak frames alive after destroying FrameManager");
   while (mWeakFrames) {
     mWeakFrames->Clear(this);
   }
 
   // Let the style set do its cleanup.
   mStyleSet->Shutdown();
 
   if (mPresContext) {
@@ -8879,17 +8880,17 @@ PresShell::PrepareToUseCaretPosition(nsI
                                  nsIPresShell::SCROLL_MINIMUM,
                                  nsIPresShell::SCROLL_IF_NOT_VISIBLE),
                                nsIPresShell::ScrollAxis(
                                  nsIPresShell::SCROLL_MINIMUM,
                                  nsIPresShell::SCROLL_IF_NOT_VISIBLE),
                                nsIPresShell::SCROLL_OVERFLOW_HIDDEN);
     NS_ENSURE_SUCCESS(rv, false);
     frame = content->GetPrimaryFrame();
-    NS_WARN_IF_FALSE(frame, "No frame for focused content?");
+    NS_WARNING_ASSERTION(frame, "No frame for focused content?");
   }
 
   // Actually scroll the selection (ie caret) into view. Note that this must
   // be synchronous since we will be checking the caret position on the screen.
   //
   // Be easy about errors, and just don't scroll in those cases. Better to have
   // the correct menu at a weird place than the wrong menu.
   // After ScrollSelectionIntoView(), the pending notifications might be
--- a/layout/generic/nsFlexContainerFrame.cpp
+++ b/layout/generic/nsFlexContainerFrame.cpp
@@ -3484,19 +3484,20 @@ nsFlexContainerFrame::GenerateFlexLines(
 nscoord
 nsFlexContainerFrame::GetMainSizeFromReflowInput(
   const ReflowInput& aReflowInput,
   const FlexboxAxisTracker& aAxisTracker)
 {
   if (aAxisTracker.IsRowOriented()) {
     // Row-oriented --> our main axis is the inline axis, so our main size
     // is our inline size (which should already be resolved).
-    NS_WARN_IF_FALSE(aReflowInput.ComputedISize() != NS_UNCONSTRAINEDSIZE,
-                     "Unconstrained inline size; this should only result from "
-                     "huge sizes (not intrinsic sizing w/ orthogonal flows)");
+    NS_WARNING_ASSERTION(
+      aReflowInput.ComputedISize() != NS_UNCONSTRAINEDSIZE,
+      "Unconstrained inline size; this should only result from huge sizes "
+      "(not intrinsic sizing w/ orthogonal flows)");
     return aReflowInput.ComputedISize();
   }
 
   // Note: This may be unconstrained, if our block size is "auto":
   return GetEffectiveComputedBSize(aReflowInput);
 }
 
 // Returns the largest outer hypothetical main-size of any line in |aLines|.
@@ -3587,19 +3588,20 @@ nsFlexContainerFrame::ComputeCrossSize(c
                                        bool* aIsDefinite,
                                        nsReflowStatus& aStatus)
 {
   MOZ_ASSERT(aIsDefinite, "outparam pointer must be non-null");
 
   if (aAxisTracker.IsColumnOriented()) {
     // Column-oriented --> our cross axis is the inline axis, so our cross size
     // is our inline size (which should already be resolved).
-    NS_WARN_IF_FALSE(aReflowInput.ComputedISize() != NS_UNCONSTRAINEDSIZE,
-                     "Unconstrained inline size; this should only result from "
-                     "huge sizes (not intrinsic sizing w/ orthogonal flows)");
+    NS_WARNING_ASSERTION(
+      aReflowInput.ComputedISize() != NS_UNCONSTRAINEDSIZE,
+      "Unconstrained inline size; this should only result from huge sizes "
+      "(not intrinsic sizing w/ orthogonal flows)");
     *aIsDefinite = true;
     return aReflowInput.ComputedISize();
   }
 
   nscoord effectiveComputedBSize = GetEffectiveComputedBSize(aReflowInput);
   if (effectiveComputedBSize != NS_INTRINSICSIZE) {
     // Row-oriented case (cross axis is block-axis), with fixed BSize:
     *aIsDefinite = true;
@@ -3750,18 +3752,19 @@ nsFlexContainerFrame::SizeItemInCrossAxi
   nscoord crossAxisBorderPadding = aItem.GetBorderPadding().TopBottom();
   if (childDesiredSize.Height() < crossAxisBorderPadding) {
     // Child's requested size isn't large enough for its border/padding!
     // This is OK for the trivial nsFrame::Reflow() impl, but other frame
     // classes should know better. So, if we get here, the child had better be
     // an instance of nsFrame (i.e. it should return null from GetType()).
     // XXXdholbert Once we've fixed bug 765861, we should upgrade this to an
     // assertion that trivially passes if bug 765861's flag has been flipped.
-    NS_WARN_IF_FALSE(!aItem.Frame()->GetType(),
-                     "Child should at least request space for border/padding");
+    NS_WARNING_ASSERTION(
+      !aItem.Frame()->GetType(),
+      "Child should at least request space for border/padding");
     aItem.SetCrossSize(0);
   } else {
     // (normal case)
     aItem.SetCrossSize(childDesiredSize.Height() - crossAxisBorderPadding);
   }
 
   // If this is the first child, save its ascent, since it may be what
   // establishes the container's baseline. Also save the ascent if this child
@@ -4194,19 +4197,20 @@ nsFlexContainerFrame::DoFlexLayout(nsPre
   desiredSizeInFlexWM.ISize(flexWM) += containerBP.IStartEnd(flexWM);
   desiredSizeInFlexWM.BSize(flexWM) += containerBP.BStartEnd(flexWM);
 
   if (flexContainerAscent == nscoord_MIN) {
     // Still don't have our baseline set -- this happens if we have no
     // children (or if our children are huge enough that they have nscoord_MIN
     // as their baseline... in which case, we'll use the wrong baseline, but no
     // big deal)
-    NS_WARN_IF_FALSE(lines.getFirst()->IsEmpty(),
-                     "Have flex items but didn't get an ascent - that's odd "
-                     "(or there are just gigantic sizes involved)");
+    NS_WARNING_ASSERTION(
+      lines.getFirst()->IsEmpty(),
+      "Have flex items but didn't get an ascent - that's odd (or there are "
+      "just gigantic sizes involved)");
     // Per spec, synthesize baseline from the flex container's content box
     // (i.e. use block-end side of content-box)
     // XXXdholbert This only makes sense if parent's writing mode is
     // horizontal (& even then, really we should be using the BSize in terms
     // of the parent's writing mode, not ours). Clean up in bug 1155322.
     flexContainerAscent = desiredSizeInFlexWM.BSize(flexWM);
   }
 
--- a/layout/generic/nsFloatManager.cpp
+++ b/layout/generic/nsFloatManager.cpp
@@ -154,18 +154,17 @@ nsFloatManager::GetFlowArea(WritingMode 
     return nsFlowAreaRect(aWM, aContentArea.IStart(aWM), aBOffset,
                           aContentArea.ISize(aWM), aBSize, false);
   }
 
   nscoord blockEnd;
   if (aBSize == nscoord_MAX) {
     // This warning (and the two below) are possible to hit on pages
     // with really large objects.
-    NS_WARN_IF_FALSE(aInfoType == BAND_FROM_POINT,
-                     "bad height");
+    NS_WARNING_ASSERTION(aInfoType == BAND_FROM_POINT, "bad height");
     blockEnd = nscoord_MAX;
   } else {
     blockEnd = blockStart + aBSize;
     if (blockEnd < blockStart || blockEnd > nscoord_MAX) {
       NS_WARNING("bad value");
       blockEnd = nscoord_MAX;
     }
   }
--- a/layout/generic/nsFrame.cpp
+++ b/layout/generic/nsFrame.cpp
@@ -374,17 +374,17 @@ NS_MergeReflowStatusInto(nsReflowStatus*
 
 void
 nsWeakFrame::Init(nsIFrame* aFrame)
 {
   Clear(mFrame ? mFrame->PresContext()->GetPresShell() : nullptr);
   mFrame = aFrame;
   if (mFrame) {
     nsIPresShell* shell = mFrame->PresContext()->GetPresShell();
-    NS_WARN_IF_FALSE(shell, "Null PresShell in nsWeakFrame!");
+    NS_WARNING_ASSERTION(shell, "Null PresShell in nsWeakFrame!");
     if (shell) {
       shell->AddWeakFrame(this);
     } else {
       mFrame = nullptr;
     }
   }
 }
 
@@ -652,28 +652,28 @@ nsFrame::DestroyFrom(nsIFrame* aDestruct
 
   // If we have any IB split siblings, clear their references to us.
   // (Note: This has to happen before we call shell->NotifyDestroyingFrame,
   // because that clears our Properties() table.)
   if (mState & NS_FRAME_PART_OF_IBSPLIT) {
     // Delete previous sibling's reference to me.
     nsIFrame* prevSib = Properties().Get(nsIFrame::IBSplitPrevSibling());
     if (prevSib) {
-      NS_WARN_IF_FALSE(this ==
-         prevSib->Properties().Get(nsIFrame::IBSplitSibling()),
-         "IB sibling chain is inconsistent");
+      NS_WARNING_ASSERTION(
+        this == prevSib->Properties().Get(nsIFrame::IBSplitSibling()),
+        "IB sibling chain is inconsistent");
       prevSib->Properties().Delete(nsIFrame::IBSplitSibling());
     }
 
     // Delete next sibling's reference to me.
     nsIFrame* nextSib = Properties().Get(nsIFrame::IBSplitSibling());
     if (nextSib) {
-      NS_WARN_IF_FALSE(this ==
-         nextSib->Properties().Get(nsIFrame::IBSplitPrevSibling()),
-         "IB sibling chain is inconsistent");
+      NS_WARNING_ASSERTION(
+        this == nextSib->Properties().Get(nsIFrame::IBSplitPrevSibling()),
+        "IB sibling chain is inconsistent");
       nextSib->Properties().Delete(nsIFrame::IBSplitPrevSibling());
     }
   }
 
   bool isPrimaryFrame = (mContent && mContent->GetPrimaryFrame() == this);
   if (isPrimaryFrame) {
     // This needs to happen before shell->NotifyDestroyingFrame because
     // that clears our Properties() table.
--- a/layout/generic/nsGridContainerFrame.cpp
+++ b/layout/generic/nsGridContainerFrame.cpp
@@ -1606,17 +1606,17 @@ struct nsGridContainerFrame::Tracks
    */
   void ResizeRow(uint32_t aRow, nscoord aNewSize)
   {
     MOZ_ASSERT(mAxis == eLogicalAxisBlock,
                "Should only be fragmenting in the block axis (between rows)");
     MOZ_ASSERT(aNewSize >= 0);
     auto& sz = mSizes[aRow];
     nscoord delta = aNewSize - sz.mBase;
-    NS_WARN_IF_FALSE(delta != nscoord(0), "Useless call to ResizeRow");
+    NS_WARNING_ASSERTION(delta != nscoord(0), "Useless call to ResizeRow");
     sz.mBase = aNewSize;
     const uint32_t numRows = mSizes.Length();
     for (uint32_t r = aRow + 1; r < numRows; ++r) {
       mSizes[r].mPosition += delta;
     }
   }
 
   nscoord ResolveSize(const LineRange& aRange) const
--- a/layout/generic/nsLineLayout.cpp
+++ b/layout/generic/nsLineLayout.cpp
@@ -323,21 +323,21 @@ nsLineLayout::UpdateBand(WritingMode aWM
       !LineContainerFrame()->GetParent()->IsCrazySizeAssertSuppressed()) {
     nsFrame::ListTag(stdout, mBlockReflowInput->mFrame);
     printf(": UpdateBand: bad caller: BSize WAS %d(0x%x)\n",
            availSpace.BSize(lineWM), availSpace.BSize(lineWM));
   }
 #endif
 
   // Compute the difference between last times width and the new width
-  NS_WARN_IF_FALSE(mRootSpan->mIEnd != NS_UNCONSTRAINEDSIZE &&
-                   availSpace.ISize(lineWM) != NS_UNCONSTRAINEDSIZE,
-                   "have unconstrained inline size; this should only result "
-                   "from very large sizes, not attempts at intrinsic width "
-                   "calculation");
+  NS_WARNING_ASSERTION(
+    mRootSpan->mIEnd != NS_UNCONSTRAINEDSIZE &&
+    availSpace.ISize(lineWM) != NS_UNCONSTRAINEDSIZE,
+    "have unconstrained inline size; this should only result from very large "
+    "sizes, not attempts at intrinsic width calculation");
   // The root span's mIStart moves to aICoord
   nscoord deltaICoord = availSpace.IStart(lineWM) - mRootSpan->mIStart;
   // The inline size of all spans changes by this much (the root span's
   // mIEnd moves to aICoord + aISize, its new inline size is aISize)
   nscoord deltaISize = availSpace.ISize(lineWM) -
                        (mRootSpan->mIEnd - mRootSpan->mIStart);
 #ifdef NOISY_REFLOW
   nsFrame::ListTag(stdout, mBlockReflowInput->mFrame);
@@ -1188,20 +1188,20 @@ nsLineLayout::AllowForStartMargin(PerFra
   if ((pfd->mFrame->GetPrevContinuation() ||
        pfd->mFrame->FrameIsNonFirstInIBSplit()) &&
       aReflowInput.mStyleBorder->mBoxDecorationBreak ==
         StyleBoxDecorationBreak::Slice) {
     // Zero this out so that when we compute the max-element-width of
     // the frame we will properly avoid adding in the starting margin.
     pfd->mMargin.IStart(lineWM) = 0;
   } else if (NS_UNCONSTRAINEDSIZE == aReflowInput.ComputedISize()) {
-    NS_WARN_IF_FALSE(NS_UNCONSTRAINEDSIZE != aReflowInput.AvailableISize(),
-                     "have unconstrained inline-size; this should only result "
-                     "from very large sizes, not attempts at intrinsic "
-                     "inline-size calculation");
+    NS_WARNING_ASSERTION(
+      NS_UNCONSTRAINEDSIZE != aReflowInput.AvailableISize(),
+      "have unconstrained inline-size; this should only result from very "
+      "large sizes, not attempts at intrinsic inline-size calculation");
     // For inline-ish and text-ish things (which don't compute widths
     // in the reflow state), adjust available inline-size to account
     // for the start margin. The end margin will be accounted for when
     // we finish flowing the frame.
     WritingMode wm = aReflowInput.GetWritingMode();
     aReflowInput.AvailableISize() -=
         pfd->mMargin.ConvertTo(wm, lineWM).IStart(wm);
   }
@@ -2966,17 +2966,17 @@ FindNearestRubyBaseAncestor(nsIFrame* aF
 {
   MOZ_ASSERT(aFrame->StyleContext()->ShouldSuppressLineBreak());
   while (aFrame && aFrame->GetType() != nsGkAtoms::rubyBaseFrame) {
     aFrame = aFrame->GetParent();
   }
   // XXX It is possible that no ruby base ancestor is found because of
   // some edge cases like form control or canvas inside ruby text.
   // See bug 1138092 comment 4.
-  NS_WARN_IF_FALSE(aFrame, "no ruby base ancestor?");
+  NS_WARNING_ASSERTION(aFrame, "no ruby base ancestor?");
   return aFrame;
 }
 
 /**
  * This method expands the given frame by the given reserved isize.
  */
 void
 nsLineLayout::ExpandRubyBox(PerFrameData* aFrame, nscoord aReservedISize,
--- a/layout/generic/nsRubyBaseContainerFrame.cpp
+++ b/layout/generic/nsRubyBaseContainerFrame.cpp
@@ -390,18 +390,19 @@ nsRubyBaseContainerFrame::Reflow(nsPresC
   };
   isize = ReflowColumns(reflowInput, aStatus);
   DebugOnly<nscoord> lineSpanSize = aReflowInput.mLineLayout->EndSpan(this);
   aDesiredSize.ISize(lineWM) = isize;
   // When there are no frames inside the ruby base container, EndSpan
   // will return 0. However, in this case, the actual width of the
   // container could be non-zero because of non-empty ruby annotations.
   // XXX When bug 765861 gets fixed, this warning should be upgraded.
-  NS_WARN_IF_FALSE(NS_INLINE_IS_BREAK(aStatus) ||
-                   isize == lineSpanSize || mFrames.IsEmpty(), "bad isize");
+  NS_WARNING_ASSERTION(
+    NS_INLINE_IS_BREAK(aStatus) || isize == lineSpanSize || mFrames.IsEmpty(),
+    "bad isize");
 
   // If there exists any span, the columns must either be completely
   // reflowed, or be not reflowed at all.
   MOZ_ASSERT(NS_INLINE_IS_BREAK_BEFORE(aStatus) ||
              NS_FRAME_IS_COMPLETE(aStatus) || !hasSpan);
   if (!NS_INLINE_IS_BREAK_BEFORE(aStatus) &&
       NS_FRAME_IS_COMPLETE(aStatus) && hasSpan) {
     // Reflow spans
--- a/layout/generic/nsRubyFrame.cpp
+++ b/layout/generic/nsRubyFrame.cpp
@@ -337,19 +337,19 @@ nsRubyFrame::ReflowSegment(nsPresContext
     RubyUtils::SetReservedISize(aBaseContainer, deltaISize);
     aReflowInput.mLineLayout->AdvanceICoord(deltaISize);
   }
 
   // Set block leadings of the base container
   nscoord startLeading = baseRect.BStart(lineWM) - offsetRect.BStart(lineWM);
   nscoord endLeading = offsetRect.BEnd(lineWM) - baseRect.BEnd(lineWM);
   // XXX When bug 765861 gets fixed, this warning should be upgraded.
-  NS_WARN_IF_FALSE(startLeading >= 0 && endLeading >= 0,
-                   "Leadings should be non-negative (because adding "
-                   "ruby annotation can only increase the size)");
+  NS_WARNING_ASSERTION(startLeading >= 0 && endLeading >= 0,
+                       "Leadings should be non-negative (because adding "
+                       "ruby annotation can only increase the size)");
   mBStartLeading = std::max(mBStartLeading, startLeading);
   mBEndLeading = std::max(mBEndLeading, endLeading);
 }
 
 nsRubyBaseContainerFrame*
 nsRubyFrame::PullOneSegment(const nsLineLayout* aLineLayout,
                             ContinuationTraversingState& aState)
 {
--- a/layout/generic/nsTextFrame.cpp
+++ b/layout/generic/nsTextFrame.cpp
@@ -1226,18 +1226,19 @@ CanTextCrossFrameBoundary(nsIFrame* aFra
       result.mFrameToScan = nullptr;
       result.mTextRunCanCrossFrameBoundary = true;
     }
   } else {
     if (continuesTextRun) {
       result.mFrameToScan = aFrame->PrincipalChildList().FirstChild();
       result.mOverflowFrameToScan =
         aFrame->GetChildList(nsIFrame::kOverflowList).FirstChild();
-      NS_WARN_IF_FALSE(!result.mOverflowFrameToScan,
-                       "Scanning overflow inline frames is something we should avoid");
+      NS_WARNING_ASSERTION(
+        !result.mOverflowFrameToScan,
+        "Scanning overflow inline frames is something we should avoid");
       result.mScanSiblings = true;
       result.mTextRunCanCrossFrameBoundary = true;
       result.mLineBreakerCanCrossFrameBoundary = true;
     } else {
       MOZ_ASSERT(aType != nsGkAtoms::rubyTextContainerFrame,
                  "Shouldn't call this method for ruby text container");
       result.mFrameToScan = nullptr;
       result.mOverflowFrameToScan = nullptr;
@@ -9475,18 +9476,18 @@ nsTextFrame::TrimTrailingWhiteSpace(Draw
   // opportunity on the line).
   // Otherwise this can/ really only happen when we have glyphs with special
   // shapes at the end of lines, I think. Breaking inside a kerning pair won't
   // do it because that would mean we broke inside this textrun, and
   // BreakAndMeasureText should make sure the resulting shaped substring fits.
   // Maybe if we passed a maxTextLength? But that only happens at direction
   // changes (so we wouldn't kern across the boundary) or for first-letter
   // (which always fits because it starts the line!).
-  NS_WARN_IF_FALSE(result.mDeltaWidth >= 0,
-                   "Negative deltawidth, something odd is happening");
+  NS_WARNING_ASSERTION(result.mDeltaWidth >= 0,
+                       "Negative deltawidth, something odd is happening");
 
 #ifdef NOISY_TRIM
   ListTag(stdout);
   printf(": trim => %d\n", result.mDeltaWidth);
 #endif
   return result;
 }
 
--- a/layout/generic/nsTextRunTransformations.cpp
+++ b/layout/generic/nsTextRunTransformations.cpp
@@ -175,19 +175,19 @@ MergeCharactersInTextRun(gfxTextRun* aDe
       }
 
       // If the start of the merge run is actually a character that should
       // have been merged with the previous character (this can happen
       // if there's a font change in the middle of a case-mapped character,
       // that decomposed into a sequence of base+diacritics, for example),
       // just discard the entire merge run. See comment at start of this
       // function.
-      NS_WARN_IF_FALSE(!aCharsToMerge[mergeRunStart],
-                       "unable to merge across a glyph run boundary, "
-                       "glyph(s) discarded");
+      NS_WARNING_ASSERTION(
+        !aCharsToMerge[mergeRunStart],
+        "unable to merge across a glyph run boundary, glyph(s) discarded");
       if (!aCharsToMerge[mergeRunStart]) {
         if (anyMissing) {
           mergedGlyph.SetMissing(glyphs.Length());
         } else {
           mergedGlyph.SetComplex(mergedGlyph.IsClusterStart(),
                                  mergedGlyph.IsLigatureGroupStart(),
                                  glyphs.Length());
         }
--- a/layout/mathml/nsMathMLFrame.cpp
+++ b/layout/mathml/nsMathMLFrame.cpp
@@ -158,18 +158,19 @@ nsMathMLFrame::GetPresentationDataFrom(n
     if (!content)
       break;
 
     if (content->IsMathMLElement(nsGkAtoms::math)) {
       break;
     }
     frame = frame->GetParent();
   }
-  NS_WARN_IF_FALSE(frame && frame->GetContent(),
-                   "bad MathML markup - could not find the top <math> element");
+  NS_WARNING_ASSERTION(
+    frame && frame->GetContent(),
+    "bad MathML markup - could not find the top <math> element");
 }
 
 /* static */ void
 nsMathMLFrame::GetRuleThickness(DrawTarget*    aDrawTarget,
                                 nsFontMetrics* aFontMetrics,
                                 nscoord&       aRuleThickness)
 {
   nscoord xHeight = aFontMetrics->XHeight();
--- a/layout/printing/nsPrintEngine.cpp
+++ b/layout/printing/nsPrintEngine.cpp
@@ -3380,17 +3380,17 @@ nsPrintEngine::TurnScriptingOn(bool aDoT
 
     nsIDocument* doc = po->mDocument;
     if (!doc) {
       continue;
     }
 
     if (nsCOMPtr<nsPIDOMWindowInner> window = doc->GetInnerWindow()) {
       nsCOMPtr<nsIGlobalObject> go = do_QueryInterface(window);
-      NS_WARN_IF_FALSE(go && go->GetGlobalJSObject(), "Can't get global");
+      NS_WARNING_ASSERTION(go && go->GetGlobalJSObject(), "Can't get global");
       nsresult propThere = NS_PROPTABLE_PROP_NOT_THERE;
       doc->GetProperty(nsGkAtoms::scriptEnabledBeforePrintOrPreview,
                        &propThere);
       if (aDoTurnOn) {
         if (propThere != NS_PROPTABLE_PROP_NOT_THERE) {
           doc->DeleteProperty(nsGkAtoms::scriptEnabledBeforePrintOrPreview);
           if (go && go->GetGlobalJSObject()) {
             xpc::Scriptability::Get(go->GetGlobalJSObject()).Unblock();
--- a/layout/style/CSSStyleSheet.cpp
+++ b/layout/style/CSSStyleSheet.cpp
@@ -1483,18 +1483,18 @@ CSSStyleSheet::AppendStyleRule(css::Rule
   aRule->SetStyleSheet(this);
   DidDirty();
 
   if (css::Rule::NAMESPACE_RULE == aRule->GetType()) {
 #ifdef DEBUG
     nsresult rv =
 #endif
       RegisterNamespaceRule(aRule);
-    NS_WARN_IF_FALSE(NS_SUCCEEDED(rv),
-                     "RegisterNamespaceRule returned error");
+    NS_WARNING_ASSERTION(NS_SUCCEEDED(rv),
+                         "RegisterNamespaceRule returned error");
   }
 }
 
 int32_t
 CSSStyleSheet::StyleRuleCount() const
 {
   return mInner->mOrderedRules.Count();
 }
--- a/layout/style/nsCSSRuleProcessor.cpp
+++ b/layout/style/nsCSSRuleProcessor.cpp
@@ -2307,20 +2307,20 @@ HasPseudoClassSelectorArgsWithCombinator
 nsCSSRuleProcessor::RestrictedSelectorMatches(
     Element* aElement,
     nsCSSSelector* aSelector,
     TreeMatchContext& aTreeMatchContext)
 {
   MOZ_ASSERT(aSelector->IsRestrictedSelector(),
              "aSelector must not have a pseudo-element");
 
-  NS_WARN_IF_FALSE(!HasPseudoClassSelectorArgsWithCombinators(aSelector),
-                   "processing eRestyle_SomeDescendants can be slow if "
-                   "pseudo-classes with selector arguments can now have "
-                   "combinators in them");
+  NS_WARNING_ASSERTION(
+    !HasPseudoClassSelectorArgsWithCombinators(aSelector),
+    "processing eRestyle_SomeDescendants can be slow if pseudo-classes with "
+    "selector arguments can now have combinators in them");
 
   // We match aSelector as if :visited and :link both match visited and
   // unvisited links.
 
   NodeMatchContext nodeContext(EventStates(),
                                nsCSSRuleProcessor::IsLink(aElement));
   if (nodeContext.mIsRelevantLink) {
     aTreeMatchContext.SetHaveRelevantLink();
--- a/layout/style/nsComputedDOMStyle.cpp
+++ b/layout/style/nsComputedDOMStyle.cpp
@@ -5421,20 +5421,20 @@ nsComputedDOMStyle::StyleCoordToNSCoord(
     if ((this->*aPercentageBaseGetter)(percentageBase)) {
       nscoord result =
         nsRuleNode::ComputeCoordPercentCalc(aCoord, percentageBase);
       if (aClampNegativeCalc && result < 0) {
         // It's expected that we can get a negative value here with calc().
         // We can also get a negative value with a percentage value if
         // percentageBase is negative; this isn't expected, but can happen
         // when large length values overflow.
-        NS_WARN_IF_FALSE(percentageBase >= 0,
-                         "percentage base value overflowed to become "
-                         "negative for a property that disallows negative "
-                         "values");
+        NS_WARNING_ASSERTION(
+          percentageBase >= 0,
+          "percentage base value overflowed to become negative for a property "
+          "that disallows negative values");
         MOZ_ASSERT(aCoord.IsCalcUnit() ||
                    (aCoord.HasPercent() && percentageBase < 0),
                    "parser should have rejected value");
         result = 0;
       }
       return result;
     }
     // Fall through to returning aDefaultValue if we have no percentage base.
--- a/layout/style/nsRuleNode.h
+++ b/layout/style/nsRuleNode.h
@@ -199,18 +199,18 @@ public:
                !mEntries[aSID],
                "rule node should not have unconditional and conditional style "
                "data for a given struct");
     MOZ_ASSERT(aConditions.CacheableWithDependencies(),
                "don't call SetStyleData with a cache key that has no "
                "conditions or is uncacheable");
 #ifdef DEBUG
     for (Entry* e = static_cast<Entry*>(mEntries[aSID]); e; e = e->mNext) {
-      NS_WARN_IF_FALSE(e->mConditions != aConditions,
-                       "wasteful to have duplicate conditional style data");
+      NS_WARNING_ASSERTION(e->mConditions != aConditions,
+                           "wasteful to have duplicate conditional style data");
     }
 #endif
 
     mConditionalBits |= GetBitForSID(aSID);
     mEntries[aSID] =
       new (aPresContext) Entry(aConditions, aStyleStruct,
                                static_cast<Entry*>(mEntries[aSID]));
   }
--- a/layout/style/nsTransitionManager.cpp
+++ b/layout/style/nsTransitionManager.cpp
@@ -392,19 +392,19 @@ nsTransitionManager::StyleContextChanged
   if (newStyleContext->GetParent() &&
       newStyleContext->GetParent()->HasPseudoElementData()) {
     // Ignore transitions on things that inherit properties from
     // pseudo-elements.
     // FIXME (Bug 522599): Add tests for this.
     return;
   }
 
-  NS_WARN_IF_FALSE(!mPresContext->EffectCompositor()->
-                     HasThrottledStyleUpdates(),
-                   "throttled animations not up to date");
+  NS_WARNING_ASSERTION(
+    !mPresContext->EffectCompositor()->HasThrottledStyleUpdates(),
+    "throttled animations not up to date");
 
   // Compute what the css-transitions spec calls the "after-change
   // style", which is the new style without any data from transitions,
   // but still inheriting from data that contains transitions that are
   // not stopping or starting right now.
   RefPtr<nsStyleContext> afterChangeStyle;
   if (collection) {
     MOZ_ASSERT(mPresContext->StyleSet()->IsGecko(),
--- a/layout/svg/SVGContextPaint.cpp
+++ b/layout/svg/SVGContextPaint.cpp
@@ -244,23 +244,23 @@ AutoSetRestoreSVGContextPaint::AutoSetRe
 
   if (mOuterContextPaint) {
     mSVGDocument->UnsetProperty(nsGkAtoms::svgContextPaint);
   }
 
   DebugOnly<nsresult> res =
     mSVGDocument->SetProperty(nsGkAtoms::svgContextPaint, aContextPaint);
 
-  NS_WARN_IF_FALSE(NS_SUCCEEDED(res), "Failed to set context paint");
+  NS_WARNING_ASSERTION(NS_SUCCEEDED(res), "Failed to set context paint");
 }
 
 AutoSetRestoreSVGContextPaint::~AutoSetRestoreSVGContextPaint()
 {
   mSVGDocument->UnsetProperty(nsGkAtoms::svgContextPaint);
   if (mOuterContextPaint) {
     DebugOnly<nsresult> res =
       mSVGDocument->SetProperty(nsGkAtoms::svgContextPaint, mOuterContextPaint);
 
-    NS_WARN_IF_FALSE(NS_SUCCEEDED(res), "Failed to restore context paint");
+    NS_WARNING_ASSERTION(NS_SUCCEEDED(res), "Failed to restore context paint");
   }
 }
 
 } // namespace mozilla
--- a/layout/tables/nsTableFrame.cpp
+++ b/layout/tables/nsTableFrame.cpp
@@ -2996,19 +2996,20 @@ nsTableFrame::ReflowChildren(TableReflow
                              nsIFrame*&          aLastChildReflowed,
                              nsOverflowAreas&    aOverflowAreas)
 {
   aStatus = NS_FRAME_COMPLETE;
   aLastChildReflowed = nullptr;
 
   nsIFrame* prevKidFrame = nullptr;
   WritingMode wm = aReflowInput.reflowInput.GetWritingMode();
-  NS_WARN_IF_FALSE(wm.IsVertical() || NS_UNCONSTRAINEDSIZE !=
-                                      aReflowInput.reflowInput.ComputedWidth(),
-                   "shouldn't have unconstrained width in horizontal mode");
+  NS_WARNING_ASSERTION(
+    wm.IsVertical() ||
+    NS_UNCONSTRAINEDSIZE != aReflowInput.reflowInput.ComputedWidth(),
+    "shouldn't have unconstrained width in horizontal mode");
   nsSize containerSize =
     aReflowInput.reflowInput.ComputedSizeAsContainerIfConstrained();
 
   nsPresContext* presContext = PresContext();
   // XXXldb Should we be checking constrained height instead?
   // tables are not able to pull back children from its next inflow, so even
   // under paginated contexts tables are should not paginate if they are inside
   // column set
--- a/layout/tables/nsTableRowFrame.cpp
+++ b/layout/tables/nsTableRowFrame.cpp
@@ -43,20 +43,20 @@ struct TableCellReflowInput : public Ref
   void FixUp(const LogicalSize& aAvailSpace);
 };
 
 } // namespace mozilla
 
 void TableCellReflowInput::FixUp(const LogicalSize& aAvailSpace)
 {
   // fix the mComputed values during a pass 2 reflow since the cell can be a percentage base
-  NS_WARN_IF_FALSE(NS_UNCONSTRAINEDSIZE != aAvailSpace.ISize(mWritingMode),
-                   "have unconstrained inline-size; this should only result from "
-                   "very large sizes, not attempts at intrinsic inline size "
-                   "calculation");
+  NS_WARNING_ASSERTION(
+    NS_UNCONSTRAINEDSIZE != aAvailSpace.ISize(mWritingMode),
+    "have unconstrained inline-size; this should only result from very large "
+    "sizes, not attempts at intrinsic inline size calculation");
   if (NS_UNCONSTRAINEDSIZE != ComputedISize()) {
     nscoord computedISize = aAvailSpace.ISize(mWritingMode) -
       ComputedLogicalBorderPadding().IStartEnd(mWritingMode);
     computedISize = std::max(0, computedISize);
     SetComputedISize(computedISize);
   }
   if (NS_UNCONSTRAINEDSIZE != ComputedBSize() &&
       NS_UNCONSTRAINEDSIZE != aAvailSpace.BSize(mWritingMode)) {
--- a/layout/xul/nsXULTooltipListener.cpp
+++ b/layout/xul/nsXULTooltipListener.cpp
@@ -468,17 +468,17 @@ SetTitletipLabel(nsITreeBoxObject* aTree
   nsCOMPtr<nsITreeView> view;
   aTreeBox->GetView(getter_AddRefs(view));
   if (view) {
     nsAutoString label;
 #ifdef DEBUG
     nsresult rv = 
 #endif
       view->GetCellText(aRow, aCol, label);
-    NS_WARN_IF_FALSE(NS_SUCCEEDED(rv), "Couldn't get the cell text!");
+    NS_WARNING_ASSERTION(NS_SUCCEEDED(rv), "Couldn't get the cell text!");
     aTooltip->SetAttr(kNameSpaceID_None, nsGkAtoms::label, label, true);
   }
 }
 #endif
 
 void
 nsXULTooltipListener::LaunchTooltip()
 {
--- a/layout/xul/tree/nsTreeBodyFrame.cpp
+++ b/layout/xul/tree/nsTreeBodyFrame.cpp
@@ -2862,17 +2862,17 @@ nsTreeBodyFrame::PaintTreeBody(nsRenderi
   if (oldPageCount != mPageLength || mHorzWidth != CalcHorzWidth(GetScrollParts())) {
     // Schedule a ResizeReflow that will update our info properly.
     PresContext()->PresShell()->
       FrameNeedsReflow(this, nsIPresShell::eResize, NS_FRAME_IS_DIRTY);
   }
 #ifdef DEBUG
   int32_t rowCount = mRowCount;
   mView->GetRowCount(&rowCount);
-  NS_WARN_IF_FALSE(mRowCount == rowCount, "row count changed unexpectedly");
+  NS_WARNING_ASSERTION(mRowCount == rowCount, "row count changed unexpectedly");
 #endif
 
   DrawResult result = DrawResult::SUCCESS;
 
   // Loop through our columns and paint them (e.g., for sorting).  This is only
   // relevant when painting backgrounds, since columns contain no content.  Content
   // is contained in the rows.
   for (nsTreeColumn* currCol = mColumns->GetFirstColumn(); currCol;
--- a/netwerk/base/nsFileStreams.cpp
+++ b/netwerk/base/nsFileStreams.cpp
@@ -624,17 +624,18 @@ nsFileInputStream::Deserialize(const Inp
 
     const FileInputStreamParams& params = aParams.get_FileInputStreamParams();
 
     uint32_t fileDescriptorIndex = params.fileDescriptorIndex();
 
     FileDescriptor fd;
     if (fileDescriptorIndex < aFileDescriptors.Length()) {
         fd = aFileDescriptors[fileDescriptorIndex];
-        NS_WARN_IF_FALSE(fd.IsValid(), "Received an invalid file descriptor!");
+        NS_WARNING_ASSERTION(fd.IsValid(),
+                             "Received an invalid file descriptor!");
     } else {
         NS_WARNING("Received a bad file descriptor index!");
     }
 
     if (fd.IsValid()) {
         auto rawFD = fd.ClonePlatformHandle();
         PRFileDesc* fileDesc = PR_ImportFile(PROsfd(rawFD.release()));
         if (!fileDesc) {
--- a/netwerk/base/nsIOService.cpp
+++ b/netwerk/base/nsIOService.cpp
@@ -1265,17 +1265,18 @@ nsIOService::PrefsChanged(nsIPrefBranch 
                                            &size)))
             /* check for bogus values and default if we find such a value
              * the upper limit here is arbitrary. having a 1mb segment size
              * is pretty crazy.  if you remove this, consider adding some
              * integer rollover test.
              */
             if (size > 0 && size < 1024*1024)
                 gDefaultSegmentSize = size;
-        NS_WARN_IF_FALSE( (!(size & (size - 1))) , "network segment size is not a power of 2!");
+        NS_WARNING_ASSERTION(!(size & (size - 1)),
+                             "network segment size is not a power of 2!");
     }
 
     if (!pref || strcmp(pref, NETWORK_NOTIFY_CHANGED_PREF) == 0) {
         bool allow;
         nsresult rv = prefs->GetBoolPref(NETWORK_NOTIFY_CHANGED_PREF, &allow);
         if (NS_SUCCEEDED(rv)) {
             mNetworkNotifyChanged = allow;
         }
--- a/netwerk/cookie/CookieServiceChild.cpp
+++ b/netwerk/cookie/CookieServiceChild.cpp
@@ -50,17 +50,17 @@ CookieServiceChild::CookieServiceChild()
 
   // Create a child PCookieService actor.
   NeckoChild::InitNeckoChild();
   gNeckoChild->SendPCookieServiceConstructor(this);
 
   // Init our prefs and observer.
   nsCOMPtr<nsIPrefBranch> prefBranch =
     do_GetService(NS_PREFSERVICE_CONTRACTID);
-  NS_WARN_IF_FALSE(prefBranch, "no prefservice");
+  NS_WARNING_ASSERTION(prefBranch, "no prefservice");
   if (prefBranch) {
     prefBranch->AddObserver(kPrefCookieBehavior, this, true);
     prefBranch->AddObserver(kPrefThirdPartySession, this, true);
     PrefChanged(prefBranch);
   }
 }
 
 CookieServiceChild::~CookieServiceChild()
--- a/netwerk/dns/GetAddrInfo.cpp
+++ b/netwerk/dns/GetAddrInfo.cpp
@@ -78,17 +78,17 @@ private:
       MOZ_ASSERT_UNREACHABLE("No mutex available during GetAddrInfo "
                              "shutdown.");
       return;
     }
 
     LOG("Freeing Dnsapi.dll");
     MOZ_ASSERT(mLibrary);
     DebugOnly<BOOL> rv = FreeLibrary(mLibrary);
-    NS_WARN_IF_FALSE(rv, "Failed to free Dnsapi.dll.");
+    NS_WARNING_ASSERTION(rv, "Failed to free Dnsapi.dll.");
   }
 };
 
 static StaticRefPtr<DnsapiInfo> gDnsapiInfo;
 
 static MOZ_ALWAYS_INLINE nsresult
 _GetAddrInfoInit_Windows()
 {
@@ -112,17 +112,17 @@ static MOZ_ALWAYS_INLINE nsresult
   if (NS_WARN_IF(!library)) {
     return NS_ERROR_FAILURE;
   }
 
   FARPROC dnsQueryFunc = GetProcAddress(library, "DnsQuery_A");
   FARPROC dnsFreeFunc = GetProcAddress(library, "DnsFree");
   if (NS_WARN_IF(!dnsQueryFunc) || NS_WARN_IF(!dnsFreeFunc)) {
     DebugOnly<BOOL> rv = FreeLibrary(library);
-    NS_WARN_IF_FALSE(rv, "Failed to free Dnsapi.dll.");
+    NS_WARNING_ASSERTION(rv, "Failed to free Dnsapi.dll.");
     return NS_ERROR_FAILURE;
   }
 
   DnsapiInfo* info = new DnsapiInfo;
   info->mLibrary = library;
   info->mDnsQueryFunc = (decltype(info->mDnsQueryFunc)) dnsQueryFunc;
   info->mDnsFreeFunc = (decltype(info->mDnsFreeFunc)) dnsFreeFunc;
   gDnsapiInfo = info;
--- a/netwerk/dns/nsHostResolver.cpp
+++ b/netwerk/dns/nsHostResolver.cpp
@@ -558,18 +558,18 @@ nsHostResolver::Init()
 #if TTL_AVAILABLE
     // The preferences probably haven't been loaded from the disk yet, so we
     // need to register a callback that will set up the experiment once they
     // are. We also need to explicitly set a value for the props otherwise the
     // callback won't be called.
     {
         DebugOnly<nsresult> rv = Preferences::RegisterCallbackAndCall(
             &DnsPrefChanged, kPrefGetTtl, this);
-        NS_WARN_IF_FALSE(NS_SUCCEEDED(rv),
-                         "Could not register DNS TTL pref callback.");
+        NS_WARNING_ASSERTION(NS_SUCCEEDED(rv),
+                             "Could not register DNS TTL pref callback.");
     }
 #endif
 
 #if defined(HAVE_RES_NINIT)
     // We want to make sure the system is using the correct resolver settings,
     // so we force it to reload those settings whenever we startup a subsequent
     // nsHostResolver instance.  We assume that there is no reason to do this
     // for the first nsHostResolver instance since that is usually created
@@ -641,18 +641,18 @@ void
 nsHostResolver::Shutdown()
 {
     LOG(("Shutting down host resolver.\n"));
 
 #if TTL_AVAILABLE
     {
         DebugOnly<nsresult> rv = Preferences::UnregisterCallback(
             &DnsPrefChanged, kPrefGetTtl, this);
-        NS_WARN_IF_FALSE(NS_SUCCEEDED(rv),
-                         "Could not unregister DNS TTL pref callback.");
+        NS_WARNING_ASSERTION(NS_SUCCEEDED(rv),
+                             "Could not unregister DNS TTL pref callback.");
     }
 #endif
 
     PRCList pendingQHigh, pendingQMed, pendingQLow, evictionQ;
     PR_INIT_CLIST(&pendingQHigh);
     PR_INIT_CLIST(&pendingQMed);
     PR_INIT_CLIST(&pendingQLow);
     PR_INIT_CLIST(&evictionQ);
@@ -701,17 +701,18 @@ nsHostResolver::Shutdown()
     PRIntervalTime delay = PR_MillisecondsToInterval(25);
     PRIntervalTime stopTime = PR_IntervalNow() + PR_SecondsToInterval(20);
     while (mThreadCount && PR_IntervalNow() < stopTime)
         PR_Sleep(delay);
 #endif
 
     {
         mozilla::DebugOnly<nsresult> rv = GetAddrInfoShutdown();
-        NS_WARN_IF_FALSE(NS_SUCCEEDED(rv), "Failed to shutdown GetAddrInfo");
+        NS_WARNING_ASSERTION(NS_SUCCEEDED(rv),
+                             "Failed to shutdown GetAddrInfo");
     }
 }
 
 void 
 nsHostResolver::MoveQueue(nsHostRecord *aRec, PRCList &aDestQ)
 {
     NS_ASSERTION(aRec->onQueue, "Moving Host Record Not Currently Queued");
     
@@ -1339,18 +1340,19 @@ nsHostResolver::OnLookupComplete(nsHostR
             }
 #if TTL_AVAILABLE
             if (!rec->mGetTtl && !rec->resolving && sGetTtlEnabled) {
                 LOG(("Issuing second async lookup for TTL for host [%s%s%s].",
                      LOG_HOST(rec->host, rec->netInterface)));
                 rec->flags =
                   (rec->flags & ~RES_PRIORITY_MEDIUM) | RES_PRIORITY_LOW;
                 DebugOnly<nsresult> rv = IssueLookup(rec);
-                NS_WARN_IF_FALSE(NS_SUCCEEDED(rv),
-                                 "Could not issue second async lookup for TTL.");
+                NS_WARNING_ASSERTION(
+                    NS_SUCCEEDED(rv),
+                    "Could not issue second async lookup for TTL.");
             }
 #endif
         }
     }
 
     if (!PR_CLIST_IS_EMPTY(&cbs)) {
         PRCList *node = cbs.next;
         while (node != &cbs) {
--- a/netwerk/ipc/RemoteOpenFileChild.cpp
+++ b/netwerk/ipc/RemoteOpenFileChild.cpp
@@ -308,17 +308,17 @@ RemoteOpenFileChild::HandleFileDescripto
 void
 RemoteOpenFileChild::NotifyListener(nsresult aResult)
 {
   MOZ_ASSERT(mListener);
   mListener->OnRemoteFileOpenComplete(aResult);
   mListener = nullptr;     // release ref to listener
 
   RefPtr<nsJARProtocolHandler> handler(gJarHandler);
-  NS_WARN_IF_FALSE(handler, "nsJARProtocolHandler is already gone!");
+  NS_WARNING_ASSERTION(handler, "nsJARProtocolHandler is already gone!");
 
   if (handler) {
     handler->RemoteOpenFileComplete(this, aResult);
   }
 }
 
 //-----------------------------------------------------------------------------
 // RemoteOpenFileChild::PRemoteOpenFileChild
--- a/netwerk/ipc/RemoteOpenFileParent.cpp
+++ b/netwerk/ipc/RemoteOpenFileParent.cpp
@@ -32,17 +32,17 @@ RemoteOpenFileParent::OpenSendCloseDelet
 #else
 
   // TODO: make this async!
 
   FileDescriptor fileDescriptor;
 
   nsAutoCString path;
   nsresult rv = mURI->GetFilePath(path);
-  NS_WARN_IF_FALSE(NS_SUCCEEDED(rv), "GetFilePath failed!");
+  NS_WARNING_ASSERTION(NS_SUCCEEDED(rv), "GetFilePath failed!");
 
   NS_UnescapeURL(path);
 
   if (NS_SUCCEEDED(rv)) {
     int fd = open(path.get(), O_RDONLY);
     if (fd == -1) {
       printf_stderr("RemoteOpenFileParent: file '%s' was not found!\n",
                     path.get());
--- a/netwerk/protocol/http/InterceptedChannel.cpp
+++ b/netwerk/protocol/http/InterceptedChannel.cpp
@@ -65,24 +65,26 @@ InterceptedChannelBase::EnsureSynthesize
 
 void
 InterceptedChannelBase::DoNotifyController()
 {
     nsresult rv = NS_OK;
 
     if (NS_WARN_IF(!mController)) {
       rv = ResetInterception();
-      NS_WARN_IF_FALSE(NS_SUCCEEDED(rv), "Failed to resume intercepted network request");
+      NS_WARNING_ASSERTION(NS_SUCCEEDED(rv),
+                           "Failed to resume intercepted network request");
       return;
     }
 
     rv = mController->ChannelIntercepted(this);
     if (NS_WARN_IF(NS_FAILED(rv))) {
       rv = ResetInterception();
-      NS_WARN_IF_FALSE(NS_SUCCEEDED(rv), "Failed to resume intercepted network request");
+      NS_WARNING_ASSERTION(NS_SUCCEEDED(rv),
+                           "Failed to resume intercepted network request");
     }
     mController = nullptr;
 }
 
 nsresult
 InterceptedChannelBase::DoSynthesizeStatus(uint16_t aStatus, const nsACString& aReason)
 {
     EnsureSynthesizedResponse();
--- a/netwerk/protocol/http/nsHttpConnection.cpp
+++ b/netwerk/protocol/http/nsHttpConnection.cpp
@@ -1249,18 +1249,19 @@ nsHttpConnection::ReadTimeoutTick(PRInte
     // Spdy implements some timeout handling using the SPDY ping frame.
     if (mSpdySession) {
         return mSpdySession->ReadTimeoutTick(now);
     }
 
     uint32_t nextTickAfter = UINT32_MAX;
     // Timeout if the response is taking too long to arrive.
     if (mResponseTimeoutEnabled) {
-        NS_WARN_IF_FALSE(gHttpHandler->ResponseTimeoutEnabled(),
-                         "Timing out a response, but response timeout is disabled!");
+        NS_WARNING_ASSERTION(
+            gHttpHandler->ResponseTimeoutEnabled(),
+            "Timing out a response, but response timeout is disabled!");
 
         PRIntervalTime initialResponseDelta = now - mLastWriteTime;
 
         if (initialResponseDelta > mTransaction->ResponseTimeout()) {
             LOG(("canceling transaction: no response for %ums: timeout is %dms\n",
                  PR_IntervalToMilliseconds(initialResponseDelta),
                  PR_IntervalToMilliseconds(mTransaction->ResponseTimeout())));
 
--- a/netwerk/sctp/datachannel/DataChannel.cpp
+++ b/netwerk/sctp/datachannel/DataChannel.cpp
@@ -706,17 +706,18 @@ DataChannelConnection::SctpDtlsOutput(vo
 #error This code will not work as-is since SetEvenOdd() runs on Mainthread
 
 bool
 DataChannelConnection::Listen(unsigned short port)
 {
   struct sockaddr_in addr;
   socklen_t addr_len;
 
-  NS_WARN_IF_FALSE(!NS_IsMainThread(), "Blocks, do not call from main thread!!!");
+  NS_WARNING_ASSERTION(!NS_IsMainThread(),
+                       "Blocks, do not call from main thread!!!");
 
   /* Acting as the 'server' */
   memset((void *)&addr, 0, sizeof(addr));
 #ifdef HAVE_SIN_LEN
   addr.sin_len = sizeof(struct sockaddr_in);
 #endif
   addr.sin_family = AF_INET;
   addr.sin_port = htons(port);
@@ -761,17 +762,18 @@ DataChannelConnection::Listen(unsigned s
 
 // Blocks! - Don't call this from main thread!
 bool
 DataChannelConnection::Connect(const char *addr, unsigned short port)
 {
   struct sockaddr_in addr4;
   struct sockaddr_in6 addr6;
 
-  NS_WARN_IF_FALSE(!NS_IsMainThread(), "Blocks, do not call from main thread!!!");
+  NS_WARNING_ASSERTION(!NS_IsMainThread(),
+                       "Blocks, do not call from main thread!!!");
 
   /* Acting as the connector */
   LOG(("Connecting to %s, port %u", addr, port));
   memset((void *)&addr4, 0, sizeof(struct sockaddr_in));
   memset((void *)&addr6, 0, sizeof(struct sockaddr_in6));
 #ifdef HAVE_SIN_LEN
   addr4.sin_len = sizeof(struct sockaddr_in);
 #endif
@@ -2165,17 +2167,17 @@ int32_t
 DataChannelConnection::SendMsgInternal(DataChannel *channel, const char *data,
                                        size_t length, uint32_t ppid)
 {
   uint16_t flags;
   struct sctp_sendv_spa spa;
   int32_t result;
 
   NS_ENSURE_TRUE(channel->mState == OPEN || channel->mState == CONNECTING, 0);
-  NS_WARN_IF_FALSE(length > 0, "Length is 0?!");
+  NS_WARNING_ASSERTION(length > 0, "Length is 0?!");
 
   // To avoid problems where an in-order OPEN is lost and an
   // out-of-order data message "beats" it, require data to be in-order
   // until we get an ACK.
   if ((channel->mFlags & DATA_CHANNEL_FLAGS_OUT_OF_ORDER_ALLOWED) &&
       !(channel->mFlags & DATA_CHANNEL_FLAGS_WAITING_ACK)) {
     flags = SCTP_UNORDERED;
   } else {
@@ -2279,18 +2281,18 @@ DataChannelConnection::SendBinary(DataCh
       data += sendlen;
     }
     LOG(("Sent %d buffers for %u bytes, %d sent immediately, %d buffers queued",
          (origlen+DATA_CHANNEL_MAX_BINARY_FRAGMENT-1)/DATA_CHANNEL_MAX_BINARY_FRAGMENT,
          origlen, sent,
          channel->mBufferedData.Length()));
     return sent;
   }
-  NS_WARN_IF_FALSE(len <= DATA_CHANNEL_MAX_BINARY_FRAGMENT,
-                   "Sending too-large data on unreliable channel!");
+  NS_WARNING_ASSERTION(len <= DATA_CHANNEL_MAX_BINARY_FRAGMENT,
+                       "Sending too-large data on unreliable channel!");
 
   // This will fail if the message is too large (default 256K)
   return SendMsgInternal(channel, data, len, ppid_final);
 }
 
 class ReadBlobRunnable : public Runnable {
 public:
   ReadBlobRunnable(DataChannelConnection* aConnection, uint16_t aStream,
--- a/parser/html/nsHtml5TreeOpExecutor.cpp
+++ b/parser/html/nsHtml5TreeOpExecutor.cpp
@@ -1001,17 +1001,17 @@ nsHtml5TreeOpExecutor::SetSpeculationBas
 {
   if (mSpeculationBaseURI) {
     // the first one wins
     return;
   }
   const nsCString& charset = mDocument->GetDocumentCharacterSet();
   DebugOnly<nsresult> rv = NS_NewURI(getter_AddRefs(mSpeculationBaseURI), aURL,
                                      charset.get(), mDocument->GetDocumentURI());
-  NS_WARN_IF_FALSE(NS_SUCCEEDED(rv), "Failed to create a URI");
+  NS_WARNING_ASSERTION(NS_SUCCEEDED(rv), "Failed to create a URI");
 }
 
 void
 nsHtml5TreeOpExecutor::SetSpeculationReferrerPolicy(const nsAString& aReferrerPolicy)
 {
   // Specs says:
   // - Let value be the result of stripping leading and trailing whitespace from
   // the value of element's content attribute.
--- a/rdf/datasource/nsLocalStore.cpp
+++ b/rdf/datasource/nsLocalStore.cpp
@@ -272,17 +272,17 @@ LocalStoreImpl::Init(const char *uri)
 NS_IMETHODIMP
 LocalStoreImpl::Flush()
 {
 	nsCOMPtr<nsIRDFRemoteDataSource> remote = do_QueryInterface(mInner);
     // FIXME Bug 340242: Temporarily make this a warning rather than an
     // assertion until we sort out the ordering of how we write
     // everything to the localstore, flush it, and disconnect it when
     // we're getting profile-change notifications.
-    NS_WARN_IF_FALSE(remote != nullptr, "not an nsIRDFRemoteDataSource");
+    NS_WARNING_ASSERTION(remote != nullptr, "not an nsIRDFRemoteDataSource");
 	if (! remote)
         return NS_ERROR_UNEXPECTED;
 
     return remote->Flush();
 }
 
 NS_IMETHODIMP
 LocalStoreImpl::FlushTo(const char *aURI)
--- a/storage/mozStorageAsyncStatementExecution.cpp
+++ b/storage/mozStorageAsyncStatementExecution.cpp
@@ -454,17 +454,17 @@ AsyncExecuteStatements::notifyComplete()
         mState = ERROR;
         (void)notifyError(mozIStorageError::ERROR,
                           "Transaction failed to commit");
       }
     }
     else {
       DebugOnly<nsresult> rv =
         mConnection->rollbackTransactionInternal(mNativeConnection);
-      NS_WARN_IF_FALSE(NS_SUCCEEDED(rv), "Transaction failed to rollback");
+      NS_WARNING_ASSERTION(NS_SUCCEEDED(rv), "Transaction failed to rollback");
     }
     mHasTransaction = false;
   }
 
   // Always generate a completion notification; it is what guarantees that our
   // destruction does not happen here on the async thread.
   RefPtr<CompletionNotifier> completionEvent =
     new CompletionNotifier(mCallback, mState);
--- a/storage/mozStorageConnection.cpp
+++ b/storage/mozStorageConnection.cpp
@@ -53,18 +53,20 @@
 mozilla::LazyLogModule gStorageLog("mozStorage");
 
 // Checks that the protected code is running on the main-thread only if the
 // connection was also opened on it.
 #ifdef DEBUG
 #define CHECK_MAINTHREAD_ABUSE() \
   do { \
     nsCOMPtr<nsIThread> mainThread = do_GetMainThread(); \
-    NS_WARN_IF_FALSE(threadOpenedOn == mainThread || !NS_IsMainThread(), \
-               "Using Storage synchronous API on main-thread, but the connection was opened on another thread."); \
+    NS_WARNING_ASSERTION( \
+      threadOpenedOn == mainThread || !NS_IsMainThread(), \
+      "Using Storage synchronous API on main-thread, but the connection was " \
+      "opened on another thread."); \
   } while(0)
 #else
 #define CHECK_MAINTHREAD_ABUSE() do { /* Nothing */ } while(0)
 #endif
 
 namespace mozilla {
 namespace storage {
 
--- a/storage/mozStorageHelper.h
+++ b/storage/mozStorageHelper.h
@@ -89,23 +89,23 @@ public:
     }
   }
 
   ~mozStorageTransaction()
   {
     if (mConnection && mHasTransaction && !mCompleted) {
       if (mCommitOnComplete) {
         mozilla::DebugOnly<nsresult> rv = Commit();
-        NS_WARN_IF_FALSE(NS_SUCCEEDED(rv),
-                         "A transaction didn't commit correctly");
+        NS_WARNING_ASSERTION(NS_SUCCEEDED(rv),
+                             "A transaction didn't commit correctly");
       }
       else {
         mozilla::DebugOnly<nsresult> rv = Rollback();
-        NS_WARN_IF_FALSE(NS_SUCCEEDED(rv),
-                         "A transaction didn't rollback correctly");
+        NS_WARNING_ASSERTION(NS_SUCCEEDED(rv),
+                             "A transaction didn't rollback correctly");
       }
     }
   }
 
   /**
    * Commits the transaction if one is in progress. If one is not in progress,
    * this is a NOP since the actual owner of the transaction outside of our
    * scope is in charge of finally committing or rolling back the transaction.
--- a/storage/mozStoragePrivateHelpers.cpp
+++ b/storage/mozStoragePrivateHelpers.cpp
@@ -69,17 +69,17 @@ convertResultCode(int aSQLiteResultCode)
   }
 
   // generic error
 #ifdef DEBUG
   nsAutoCString message;
   message.AppendLiteral("SQLite returned error code ");
   message.AppendInt(rc);
   message.AppendLiteral(" , Storage will convert it to NS_ERROR_FAILURE");
-  NS_WARN_IF_FALSE(rc == SQLITE_ERROR, message.get());
+  NS_WARNING_ASSERTION(rc == SQLITE_ERROR, message.get());
 #endif
   return NS_ERROR_FAILURE;
 }
 
 void
 checkAndLogStatementPerformance(sqlite3_stmt *aStatement)
 {
   // Check to see if the query performed sorting operations or not.  If it
--- a/toolkit/components/downloads/nsDownloadManager.cpp
+++ b/toolkit/components/downloads/nsDownloadManager.cpp
@@ -1000,17 +1000,18 @@ nsDownloadManager::Init()
 #endif
 
   // Do things *after* initializing various download manager properties such as
   // restoring downloads to a consistent state
   rv = RestoreDatabaseState();
   NS_ENSURE_SUCCESS(rv, rv);
 
   rv = RestoreActiveDownloads();
-  NS_WARN_IF_FALSE(NS_SUCCEEDED(rv), "Failed to restore all active downloads");
+  NS_WARNING_ASSERTION(NS_SUCCEEDED(rv),
+                       "Failed to restore all active downloads");
 
   nsCOMPtr<nsINavHistoryService> history =
     do_GetService(NS_NAVHISTORYSERVICE_CONTRACTID);
 
   (void)mObserverService->NotifyObservers(
                                 static_cast<nsIDownloadManager *>(this),
                                 "download-manager-initialized",
                                 nullptr);
--- a/toolkit/components/places/History.cpp
+++ b/toolkit/components/places/History.cpp
@@ -656,17 +656,17 @@ public:
                                 static_cast<uint32_t>(mPlace.typed));
     }
 
     nsCOMPtr<nsIObserverService> obsService =
       mozilla::services::GetObserverService();
     if (obsService) {
       DebugOnly<nsresult> rv =
         obsService->NotifyObservers(uri, URI_VISIT_SAVED, nullptr);
-      NS_WARN_IF_FALSE(NS_SUCCEEDED(rv), "Could not notify observers");
+      NS_WARNING_ASSERTION(NS_SUCCEEDED(rv), "Could not notify observers");
     }
 
     History* history = History::GetService();
     NS_ENSURE_STATE(history);
     history->AppendToRecentlyVisitedURIs(uri);
     history->NotifyVisited(uri);
 
     return NS_OK;
@@ -1865,17 +1865,17 @@ History::History()
   , mShutdownMutex("History::mShutdownMutex")
   , mObservers(VISIT_OBSERVERS_INITIAL_CACHE_LENGTH)
   , mRecentlyVisitedURIs(RECENTLY_VISITED_URIS_SIZE)
 {
   NS_ASSERTION(!gService, "Ruh-roh!  This service has already been created!");
   gService = this;
 
   nsCOMPtr<nsIObserverService> os = services::GetObserverService();
-  NS_WARN_IF_FALSE(os, "Observer service was not found!");
+  NS_WARNING_ASSERTION(os, "Observer service was not found!");
   if (os) {
     (void)os->AddObserver(this, TOPIC_PLACES_SHUTDOWN, false);
   }
 }
 
 History::~History()
 {
   UnregisterWeakMemoryReporter(this);
--- a/toolkit/components/places/nsAnnoProtocolHandler.cpp
+++ b/toolkit/components/places/nsAnnoProtocolHandler.cpp
@@ -174,18 +174,19 @@ public:
   }
 
   NS_IMETHOD OnStopRequest(nsIRequest *, nsISupports *, nsresult aStatusCode) override
   {
     // We always need to close our output stream, regardless of the status code.
     (void)mOutputStream->Close();
 
     // But, we'll warn about it not being successful if it wasn't.
-    NS_WARN_IF_FALSE(NS_SUCCEEDED(aStatusCode),
-                     "Got an error when trying to load our default favicon!");
+    NS_WARNING_ASSERTION(
+      NS_SUCCEEDED(aStatusCode),
+      "Got an error when trying to load our default favicon!");
 
     return NS_OK;
   }
 
 protected:
   virtual ~faviconAsyncLoader() {}
 
 private:
--- a/toolkit/components/places/nsNavBookmarks.cpp
+++ b/toolkit/components/places/nsNavBookmarks.cpp
@@ -625,17 +625,17 @@ nsNavBookmarks::RemoveItem(int64_t aItem
       nsNavHistory* history = nsNavHistory::GetHistoryService();
       NS_ENSURE_TRUE(history, NS_ERROR_OUT_OF_MEMORY);
       rv = history->UpdateFrecency(bookmark.placeId);
       NS_ENSURE_SUCCESS(rv, rv);
     }
     // A broken url should not interrupt the removal process.
     (void)NS_NewURI(getter_AddRefs(uri), bookmark.url);
     // We cannot assert since some automated tests are checking this path.
-    NS_WARN_IF_FALSE(uri, "Invalid URI in RemoveItem");
+    NS_WARNING_ASSERTION(uri, "Invalid URI in RemoveItem");
   }
 
   NOTIFY_OBSERVERS(mCanNotify, mCacheObservers, mObservers,
                    nsINavBookmarkObserver,
                    OnItemRemoved(bookmark.id,
                                  bookmark.parentId,
                                  bookmark.position,
                                  bookmark.type,
@@ -1110,17 +1110,17 @@ nsNavBookmarks::RemoveFolderChildren(int
         nsNavHistory* history = nsNavHistory::GetHistoryService();
         NS_ENSURE_TRUE(history, NS_ERROR_OUT_OF_MEMORY);
         rv = history->UpdateFrecency(child.placeId);
         NS_ENSURE_SUCCESS(rv, rv);
       }
       // A broken url should not interrupt the removal process.
       (void)NS_NewURI(getter_AddRefs(uri), child.url);
       // We cannot assert since some automated tests are checking this path.
-      NS_WARN_IF_FALSE(uri, "Invalid URI in RemoveFolderChildren");
+      NS_WARNING_ASSERTION(uri, "Invalid URI in RemoveFolderChildren");
     }
 
     NOTIFY_OBSERVERS(mCanNotify, mCacheObservers, mObservers,
                      nsINavBookmarkObserver,
                      OnItemRemoved(child.id,
                                    child.parentId,
                                    child.position,
                                    child.type,
--- a/toolkit/components/places/nsNavHistory.cpp
+++ b/toolkit/components/places/nsNavHistory.cpp
@@ -340,17 +340,17 @@ nsNavHistory::GetDatabaseStatus(uint16_t
 }
 
 uint32_t
 nsNavHistory::GetRecentFlags(nsIURI *aURI)
 {
   uint32_t result = 0;
   nsAutoCString spec;
   nsresult rv = aURI->GetSpec(spec);
-  NS_WARN_IF_FALSE(NS_SUCCEEDED(rv), "Unable to get aURI's spec");
+  NS_WARNING_ASSERTION(NS_SUCCEEDED(rv), "Unable to get aURI's spec");
 
   if (NS_SUCCEEDED(rv)) {
     if (CheckIsRecentEvent(&mRecentTyped, spec))
       result |= RECENT_TYPED;
     if (CheckIsRecentEvent(&mRecentLink, spec))
       result |= RECENT_ACTIVATED;
     if (CheckIsRecentEvent(&mRecentBookmark, spec))
       result |= RECENT_BOOKMARKED;
@@ -564,17 +564,17 @@ public:
   NS_IMETHOD Run() override
   {
     MOZ_ASSERT(NS_IsMainThread(), "Must be called on the main thread");
     nsNavHistory* navHistory = nsNavHistory::GetHistoryService();
     if (navHistory) {
       nsCOMPtr<nsIURI> uri;
       (void)NS_NewURI(getter_AddRefs(uri), mSpec);
       // We cannot assert since some automated tests are checking this path.
-      NS_WARN_IF_FALSE(uri, "Invalid URI in FrecencyNotification");
+      NS_WARNING_ASSERTION(uri, "Invalid URI in FrecencyNotification");
       // Notify a frecency change only if we have a valid uri, otherwise
       // the observer couldn't gather any useful data from the notification.
       if (uri) {
         navHistory->NotifyFrecencyChanged(uri, mNewFrecency, mGUID, mHidden,
                                           mLastVisitDate);
       }
     }
     return NS_OK;
@@ -2336,17 +2336,18 @@ nsNavHistory::BeginUpdateBatch()
 
 // nsNavHistory::EndUpdateBatch
 nsresult
 nsNavHistory::EndUpdateBatch()
 {
   if (--mBatchLevel == 0) {
     if (mBatchDBTransaction) {
       DebugOnly<nsresult> rv = mBatchDBTransaction->Commit();
-      NS_WARN_IF_FALSE(NS_SUCCEEDED(rv), "Batch failed to commit transaction");
+      NS_WARNING_ASSERTION(NS_SUCCEEDED(rv),
+                           "Batch failed to commit transaction");
       delete mBatchDBTransaction;
       mBatchDBTransaction = nullptr;
     }
 
     NOTIFY_OBSERVERS(mCanNotify, mCacheObservers, mObservers,
                      nsINavHistoryObserver, OnEndUpdateBatch());
   }
   return NS_OK;
@@ -2856,17 +2857,17 @@ nsNavHistory::OnBeginVacuum(bool* _vacuu
   *_vacuumGranted = true;
   return NS_OK;
 }
 
 
 NS_IMETHODIMP
 nsNavHistory::OnEndVacuum(bool aSucceeded)
 {
-  NS_WARN_IF_FALSE(aSucceeded, "Places.sqlite vacuum failed.");
+  NS_WARNING_ASSERTION(aSucceeded, "Places.sqlite vacuum failed.");
   return NS_OK;
 }
 
 
 ////////////////////////////////////////////////////////////////////////////////
 //// nsPIPlacesDatabase
 
 NS_IMETHODIMP
--- a/toolkit/components/places/nsNavHistory.h
+++ b/toolkit/components/places/nsNavHistory.h
@@ -412,17 +412,18 @@ public:
       case nsINavHistoryService::TRANSITION_REDIRECT_PERMANENT:
         return mPermRedirectVisitBonus;
       case nsINavHistoryService::TRANSITION_REDIRECT_TEMPORARY:
         return mTempRedirectVisitBonus;
       case nsINavHistoryService::TRANSITION_RELOAD:
         return mReloadVisitBonus;
       default:
         // 0 == undefined (see bug #375777 for details)
-        NS_WARN_IF_FALSE(!aTransitionType, "new transition but no bonus for frecency");
+        NS_WARNING_ASSERTION(!aTransitionType,
+                             "new transition but no bonus for frecency");
         return mDefaultVisitBonus;
     }
   }
 
   int32_t GetNumVisitsForFrecency() const
   {
     return mNumVisitsForFrecency;
   }
--- a/toolkit/components/places/nsNavHistoryResult.cpp
+++ b/toolkit/components/places/nsNavHistoryResult.cpp
@@ -2909,18 +2909,21 @@ nsNavHistoryQueryResultNode::OnItemChang
         MOZ_FALLTHROUGH;
       default:
         (void)Refresh();
     }
   }
   else {
     // Some node could observe both bookmarks and history.  But a node observing
     // only history should never get a bookmark notification.
-    NS_WARN_IF_FALSE(mResult && (mResult->mIsAllBookmarksObserver || mResult->mIsBookmarkFolderObserver),
-                     "history observers should not get OnItemChanged, but should get the corresponding history notifications instead");
+    NS_WARNING_ASSERTION(
+      mResult && (mResult->mIsAllBookmarksObserver ||
+                  mResult->mIsBookmarkFolderObserver),
+      "history observers should not get OnItemChanged, but should get the "
+      "corresponding history notifications instead");
 
     // Tags in history queries are a special case since tags are per uri and
     // we filter tags based on searchterms.
     if (aItemType == nsINavBookmarksService::TYPE_BOOKMARK &&
         aProperty.EqualsLiteral("tags")) {
       nsNavBookmarks* bookmarks = nsNavBookmarks::GetBookmarksService();
       NS_ENSURE_TRUE(bookmarks, NS_ERROR_OUT_OF_MEMORY);
       nsCOMPtr<nsIURI> uri;
@@ -2946,18 +2949,21 @@ nsNavHistoryQueryResultNode::OnItemVisit
                                            nsIURI* aURI,
                                            int64_t aParentId,
                                            const nsACString& aGUID,
                                            const nsACString& aParentGUID)
 {
   // for bookmark queries, "all bookmark" observer should get OnItemVisited
   // but it is ignored.
   if (mLiveUpdate != QUERYUPDATE_COMPLEX_WITH_BOOKMARKS)
-    NS_WARN_IF_FALSE(mResult && (mResult->mIsAllBookmarksObserver || mResult->mIsBookmarkFolderObserver),
-                     "history observers should not get OnItemVisited, but should get OnVisit instead");
+    NS_WARNING_ASSERTION(
+      mResult && (mResult->mIsAllBookmarksObserver ||
+                  mResult->mIsBookmarkFolderObserver),
+      "history observers should not get OnItemVisited, but should get OnVisit "
+      "instead");
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsNavHistoryQueryResultNode::OnItemMoved(int64_t aFolder,
                                          int64_t aOldParent,
                                          int32_t aOldIndex,
                                          int64_t aNewParent,
--- a/toolkit/components/startup/nsAppStartup.cpp
+++ b/toolkit/components/startup/nsAppStartup.cpp
@@ -185,36 +185,37 @@ nsAppStartup::Init()
   // Note: The operation is meant mostly for in-house profiling.
   // Therefore, we do not warn if probes manager cannot be initialized
 
   if (mProbesManager) {
     mPlacesInitCompleteProbe =
       mProbesManager->
       GetProbe(kPlacesInitCompleteCID,
                NS_LITERAL_CSTRING("places-init-complete"));
-    NS_WARN_IF_FALSE(mPlacesInitCompleteProbe,
-                     "Cannot initialize probe 'places-init-complete'");
+    NS_WARNING_ASSERTION(mPlacesInitCompleteProbe,
+                         "Cannot initialize probe 'places-init-complete'");
 
     mSessionWindowRestoredProbe =
       mProbesManager->
       GetProbe(kSessionStoreWindowRestoredCID,
                NS_LITERAL_CSTRING("sessionstore-windows-restored"));
-    NS_WARN_IF_FALSE(mSessionWindowRestoredProbe,
-                     "Cannot initialize probe 'sessionstore-windows-restored'");
-                     
+    NS_WARNING_ASSERTION(
+      mSessionWindowRestoredProbe,
+      "Cannot initialize probe 'sessionstore-windows-restored'");
+
     mXPCOMShutdownProbe =
       mProbesManager->
       GetProbe(kXPCOMShutdownCID,
                NS_LITERAL_CSTRING("xpcom-shutdown"));
-    NS_WARN_IF_FALSE(mXPCOMShutdownProbe,
-                     "Cannot initialize probe 'xpcom-shutdown'");
+    NS_WARNING_ASSERTION(mXPCOMShutdownProbe,
+                         "Cannot initialize probe 'xpcom-shutdown'");
 
     rv = mProbesManager->StartSession();
-    NS_WARN_IF_FALSE(NS_SUCCEEDED(rv),
-                     "Cannot initialize system probe manager");
+    NS_WARNING_ASSERTION(NS_SUCCEEDED(rv),
+                         "Cannot initialize system probe manager");
   }
 #endif //defined(XP_WIN)
 
   return NS_OK;
 }
 
 
 //
--- a/toolkit/components/url-classifier/LookupCache.cpp
+++ b/toolkit/components/url-classifier/LookupCache.cpp
@@ -202,17 +202,17 @@ LookupCache::WriteFile()
   nsCOMPtr<nsIFile> psFile;
   nsresult rv = mStoreDirectory->Clone(getter_AddRefs(psFile));
   NS_ENSURE_SUCCESS(rv, rv);
 
   rv = psFile->AppendNative(mTableName + NS_LITERAL_CSTRING(PREFIXSET_SUFFIX));
   NS_ENSURE_SUCCESS(rv, rv);
 
   rv = mPrefixSet->StoreToFile(psFile);
-  NS_WARN_IF_FALSE(NS_SUCCEEDED(rv), "failed to store the prefixset");
+  NS_WARNING_ASSERTION(NS_SUCCEEDED(rv), "failed to store the prefixset");
 
   return NS_OK;
 }
 
 void
 LookupCache::ClearAll()
 {
   ClearCache();
--- a/widget/MouseEvents.h
+++ b/widget/MouseEvents.h
@@ -245,21 +245,20 @@ public:
     if (aMessage == eContextMenu) {
       button = (mContextMenuTrigger == eNormal) ? eRightButton : eLeftButton;
     }
   }
 
 #ifdef DEBUG
   virtual ~WidgetMouseEvent()
   {
-    NS_WARN_IF_FALSE(mMessage != eContextMenu ||
-                     button ==
-                       ((mContextMenuTrigger == eNormal) ? eRightButton :
-                                                           eLeftButton),
-                     "Wrong button set to eContextMenu event?");
+    NS_WARNING_ASSERTION(
+      mMessage != eContextMenu ||
+      button == ((mContextMenuTrigger == eNormal) ? eRightButton : eLeftButton),
+      "Wrong button set to eContextMenu event?");
   }
 #endif
 
   virtual WidgetEvent* Duplicate() const override
   {
     MOZ_ASSERT(mClass == eMouseEventClass,
                "Duplicate() must be overridden by sub class");
     // Not copying widget, it is a weak reference.
--- a/widget/cocoa/nsChildView.mm
+++ b/widget/cocoa/nsChildView.mm
@@ -373,17 +373,19 @@ nsChildView::~nsChildView()
   // our list of children while it's being iterated, so the way we iterate the
   // list must allow for this.
   for (nsIWidget* kid = mLastChild; kid;) {
     nsChildView* childView = static_cast<nsChildView*>(kid);
     kid = kid->GetPrevSibling();
     childView->ResetParent();
   }
 
-  NS_WARN_IF_FALSE(mOnDestroyCalled, "nsChildView object destroyed without calling Destroy()");
+  NS_WARNING_ASSERTION(
+    mOnDestroyCalled,
+    "nsChildView object destroyed without calling Destroy()");
 
   DestroyCompositor();
 
   if (mAPZC && gfxPrefs::AsyncPanZoomSeparateEventThread()) {
     gNumberOfWidgetsNeedingEventThread--;
     if (gNumberOfWidgetsNeedingEventThread == 0) {
       [EventThreadRunner stop];
     }
--- a/widget/windows/WinUtils.cpp
+++ b/widget/windows/WinUtils.cpp
@@ -754,17 +754,17 @@ WinUtils::WaitForMessage(DWORD aTimeoutM
     if (aTimeoutMs != INFINITE) {
       elapsed = ::GetTickCount() - waitStart;
     }
     if (elapsed >= aTimeoutMs) {
       break;
     }
     DWORD result = ::MsgWaitForMultipleObjectsEx(0, NULL, aTimeoutMs - elapsed,
                                                  MOZ_QS_ALLEVENT, waitFlags);
-    NS_WARN_IF_FALSE(result != WAIT_FAILED, "Wait failed");
+    NS_WARNING_ASSERTION(result != WAIT_FAILED, "Wait failed");
     if (result == WAIT_TIMEOUT) {
       break;
     }
     if (result == WAIT_IO_COMPLETION) {
       continue;
     }
 
     // Sent messages (via SendMessage and friends) are processed differently
--- a/widget/windows/nsDeviceContextSpecWin.cpp
+++ b/widget/windows/nsDeviceContextSpecWin.cpp
@@ -251,17 +251,17 @@ already_AddRefed<PrintTarget> nsDeviceCo
     if (NS_FAILED(rv)) {
       return nullptr;
     }
 
     return PrintTargetPDF::CreateOrNull(stream, IntSize::Truncate(width, height));
   }
 
   if (mDevMode) {
-    NS_WARN_IF_FALSE(mDriverName, "No driver!");
+    NS_WARNING_ASSERTION(mDriverName, "No driver!");
     HDC dc = ::CreateDCW(mDriverName, mDeviceName, nullptr, mDevMode);
     if (!dc) {
       gfxCriticalError(gfxCriticalError::DefaultOptions(false))
         << "Failed to create device context in GetSurfaceForPrinter";
       return nullptr;
     }
 
     // The PrintTargetWindows takes over ownership of this DC
--- a/widget/windows/nsWindow.cpp
+++ b/widget/windows/nsWindow.cpp
@@ -6832,17 +6832,17 @@ nsWindow::WindowUsesOMTC()
 {
   ULONG_PTR style = ::GetClassLongPtr(mWnd, GCL_STYLE);
   if (!style) {
     NS_WARNING("Could not get window class style");
     return;
   }
   style |= CS_HREDRAW | CS_VREDRAW;
   DebugOnly<ULONG_PTR> result = ::SetClassLongPtr(mWnd, GCL_STYLE, style);
-  NS_WARN_IF_FALSE(result, "Could not reset window class style");
+  NS_WARNING_ASSERTION(result, "Could not reset window class style");
 }
 
 bool
 nsWindow::HasBogusPopupsDropShadowOnMultiMonitor() {
   if (sHasBogusPopupsDropShadowOnMultiMonitor == TRI_UNKNOWN) {
     // Since any change in the preferences requires a restart, this can be
     // done just once.
     // Check for Direct2D first.
--- a/xpcom/base/nsCycleCollector.cpp
+++ b/xpcom/base/nsCycleCollector.cpp
@@ -3594,17 +3594,17 @@ nsCycleCollector::ShutdownCollect()
 
   SliceBudget unlimitedBudget = SliceBudget::unlimited();
   uint32_t i;
   for (i = 0; i < DEFAULT_SHUTDOWN_COLLECTIONS; ++i) {
     if (!Collect(ShutdownCC, unlimitedBudget, nullptr)) {
       break;
     }
   }
-  NS_WARN_IF_FALSE(i < NORMAL_SHUTDOWN_COLLECTIONS, "Extra shutdown CC");
+  NS_WARNING_ASSERTION(i < NORMAL_SHUTDOWN_COLLECTIONS, "Extra shutdown CC");
 }
 
 static void
 PrintPhase(const char* aPhase)
 {
 #ifdef DEBUG_PHASES
   printf("cc: begin %s on %s\n", aPhase,
          NS_IsMainThread() ? "mainthread" : "worker");
--- a/xpcom/base/nsMessageLoop.cpp
+++ b/xpcom/base/nsMessageLoop.cpp
@@ -128,17 +128,17 @@ MessageLoopTimerCallback::MessageLoopTim
 }
 
 NS_IMETHODIMP
 MessageLoopTimerCallback::Notify(nsITimer* aTimer)
 {
   // We don't expect to hit the case when the timer fires but mTask has been
   // deleted, because mTask should cancel the timer before the mTask is
   // deleted.  But you never know...
-  NS_WARN_IF_FALSE(mTask, "This timer shouldn't have fired.");
+  NS_WARNING_ASSERTION(mTask, "This timer shouldn't have fired.");
 
   if (mTask) {
     mTask->Run();
   }
   return NS_OK;
 }
 
 NS_IMPL_ISUPPORTS(MessageLoopTimerCallback, nsITimerCallback)
--- a/xpcom/base/nsSystemInfo.cpp
+++ b/xpcom/base/nsSystemInfo.cpp
@@ -620,17 +620,17 @@ nsSystemInfo::Init()
     if (NS_WARN_IF(NS_FAILED(rv))) {
       return rv;
     }
   }
 
 #ifdef XP_WIN
   BOOL isWow64;
   BOOL gotWow64Value = IsWow64Process(GetCurrentProcess(), &isWow64);
-  NS_WARN_IF_FALSE(gotWow64Value, "IsWow64Process failed");
+  NS_WARNING_ASSERTION(gotWow64Value, "IsWow64Process failed");
   if (gotWow64Value) {
     rv = SetPropertyAsBool(NS_LITERAL_STRING("isWow64"), !!isWow64);
     if (NS_WARN_IF(NS_FAILED(rv))) {
       return rv;
     }
   }
   if (NS_FAILED(GetProfileHDDInfo())) {
     // We might have been called before profile-do-change. We'll observe that
@@ -900,50 +900,50 @@ nsSystemInfo::SetupAndroidInfo(const And
   }
 }
 #endif // MOZ_WIDGET_ANDROID
 
 void
 nsSystemInfo::SetInt32Property(const nsAString& aPropertyName,
                                const int32_t aValue)
 {
-  NS_WARN_IF_FALSE(aValue > 0, "Unable to read system value");
+  NS_WARNING_ASSERTION(aValue > 0, "Unable to read system value");
   if (aValue > 0) {
 #ifdef DEBUG
     nsresult rv =
 #endif
       SetPropertyAsInt32(aPropertyName, aValue);
-    NS_WARN_IF_FALSE(NS_SUCCEEDED(rv), "Unable to set property");
+    NS_WARNING_ASSERTION(NS_SUCCEEDED(rv), "Unable to set property");
   }
 }
 
 void
 nsSystemInfo::SetUint32Property(const nsAString& aPropertyName,
                                 const uint32_t aValue)
 {
   // Only one property is currently set via this function.
   // It may legitimately be zero.
 #ifdef DEBUG
   nsresult rv =
 #endif
     SetPropertyAsUint32(aPropertyName, aValue);
-  NS_WARN_IF_FALSE(NS_SUCCEEDED(rv), "Unable to set property");
+  NS_WARNING_ASSERTION(NS_SUCCEEDED(rv), "Unable to set property");
 }
 
 void
 nsSystemInfo::SetUint64Property(const nsAString& aPropertyName,
                                 const uint64_t aValue)
 {
-  NS_WARN_IF_FALSE(aValue > 0, "Unable to read system value");
+  NS_WARNING_ASSERTION(aValue > 0, "Unable to read system value");
   if (aValue > 0) {
 #ifdef DEBUG
     nsresult rv =
 #endif
       SetPropertyAsUint64(aPropertyName, aValue);
-    NS_WARN_IF_FALSE(NS_SUCCEEDED(rv), "Unable to set property");
+    NS_WARNING_ASSERTION(NS_SUCCEEDED(rv), "Unable to set property");
   }
 }
 
 #if defined(XP_WIN)
 NS_IMETHODIMP
 nsSystemInfo::Observe(nsISupports* aSubject, const char* aTopic,
                       const char16_t* aData)
 {
--- a/xpcom/glue/nsDebug.h
+++ b/xpcom/glue/nsDebug.h
@@ -45,35 +45,35 @@ inline bool NS_warn_if_impl(bool aCondit
 #define NS_WARN_IF(condition) \
   NS_warn_if_impl(condition, #condition, __FILE__, __LINE__)
 #else
 #define NS_WARN_IF(condition) (bool)(condition)
 #endif
 #endif
 
 /**
- * Warn if a given condition is false.
+ * Test an assertion for truth. If the expression is not true then
+ * emit a warning.
  *
  * Program execution continues past the usage of this macro.
  *
  * Note also that the non-debug version of this macro does <b>not</b>
  * evaluate the message argument.
  */
 #ifdef DEBUG
-#define NS_WARN_IF_FALSE(_expr,_msg)                          \
+#define NS_WARNING_ASSERTION(_expr, _msg)                     \
   do {                                                        \
     if (!(_expr)) {                                           \
       NS_DebugBreak(NS_DEBUG_WARNING, _msg, #_expr, __FILE__, __LINE__); \
     }                                                         \
   } while(0)
 #else
-#define NS_WARN_IF_FALSE(_expr, _msg)  do { /* nothing */ } while(0)
+#define NS_WARNING_ASSERTION(_expr, _msg)  do { /* nothing */ } while(0)
 #endif
 
-
 /**
  * Test an assertion for truth. If the expression is not true then
  * trigger a program failure.
  *
  * Note that the non-debug version of this macro does <b>not</b>
  * evaluate the message argument.
  */
 #ifdef DEBUG
--- a/xpcom/glue/nsThreadUtils.h
+++ b/xpcom/glue/nsThreadUtils.h
@@ -78,17 +78,17 @@ NS_NewNamedThread(const char (&aName)[LE
   nsCOMPtr<nsIThread> thread;
   nsresult rv = NS_NewThread(getter_AddRefs(thread), nullptr, aStackSize);
   if (NS_WARN_IF(NS_FAILED(rv))) {
     return rv;
   }
   NS_SetThreadName<LEN>(thread, aName);
   if (aInitialEvent) {
     rv = thread->Dispatch(aInitialEvent, NS_DISPATCH_NORMAL);
-    NS_WARN_IF_FALSE(NS_SUCCEEDED(rv), "Initial event dispatch failed");
+    NS_WARNING_ASSERTION(NS_SUCCEEDED(rv), "Initial event dispatch failed");
   }
 
   *aResult = nullptr;
   thread.swap(*aResult);
   return rv;
 }
 
 /**
--- a/xpcom/threads/LazyIdleThread.cpp
+++ b/xpcom/threads/LazyIdleThread.cpp
@@ -58,18 +58,18 @@ LazyIdleThread::~LazyIdleThread()
 }
 
 void
 LazyIdleThread::SetWeakIdleObserver(nsIObserver* aObserver)
 {
   ASSERT_OWNING_THREAD();
 
   if (mShutdown) {
-    NS_WARN_IF_FALSE(!aObserver,
-                     "Setting an observer after Shutdown was called!");
+    NS_WARNING_ASSERTION(!aObserver,
+                         "Setting an observer after Shutdown was called!");
     return;
   }
 
   mIdleObserver = aObserver;
 }
 
 void
 LazyIdleThread::DisableIdleTimeout()
@@ -265,17 +265,17 @@ LazyIdleThread::ShutdownThread()
 
     mIdleTimer = nullptr;
   }
 
   if (mThread) {
     if (mShutdownMethod == AutomaticShutdown && NS_IsMainThread()) {
       nsCOMPtr<nsIObserverService> obs =
         mozilla::services::GetObserverService();
-      NS_WARN_IF_FALSE(obs, "Failed to get observer service!");
+      NS_WARNING_ASSERTION(obs, "Failed to get observer service!");
 
       if (obs &&
           NS_FAILED(obs->RemoveObserver(this, "xpcom-shutdown-threads"))) {
         NS_WARNING("Failed to remove observer!");
       }
     }
 
     if (mIdleObserver) {
@@ -364,17 +364,17 @@ LazyIdleThread::Release()
   NS_LOG_RELEASE(this, count, "LazyIdleThread");
 
   if (!count) {
     // Stabilize refcount.
     mRefCnt = 1;
 
     nsCOMPtr<nsIRunnable> runnable =
       NewNonOwningRunnableMethod(this, &LazyIdleThread::SelfDestruct);
-    NS_WARN_IF_FALSE(runnable, "Couldn't make runnable!");
+    NS_WARNING_ASSERTION(runnable, "Couldn't make runnable!");
 
     if (NS_FAILED(NS_DispatchToCurrentThread(runnable))) {
       MOZ_ASSERT(NS_IsMainThread(), "Wrong thread!");
       // The only way this could fail is if we're in shutdown, and in that case
       // threads should have been joined already. Deleting here isn't dangerous
       // anymore because we won't spin the event loop waiting to join the
       // thread.
       SelfDestruct();
--- a/xpcom/threads/nsThread.cpp
+++ b/xpcom/threads/nsThread.cpp
@@ -1166,18 +1166,18 @@ nsThread::AddObserver(nsIThreadObserver*
 {
   if (NS_WARN_IF(!aObserver)) {
     return NS_ERROR_INVALID_ARG;
   }
   if (NS_WARN_IF(PR_GetCurrentThread() != mThread)) {
     return NS_ERROR_NOT_SAME_THREAD;
   }
 
-  NS_WARN_IF_FALSE(!mEventObservers.Contains(aObserver),
-                   "Adding an observer twice!");
+  NS_WARNING_ASSERTION(!mEventObservers.Contains(aObserver),
+                       "Adding an observer twice!");
 
   if (!mEventObservers.AppendElement(WrapNotNull(aObserver))) {
     NS_WARNING("Out of memory!");
     return NS_ERROR_OUT_OF_MEMORY;
   }
 
   return NS_OK;
 }