Bug 1312527 - Promote docshell private browsing assertions to diagnostic asserts; r=baku
authorEhsan Akhgari <ehsan@mozilla.com>
Mon, 24 Oct 2016 15:28:21 -0400
changeset 319391 229dc3c9fb3622e1eb2ef1794081cd17a5cfeb0a
parent 319390 91152c0137119ef16426b8c2297dc030bd73c64e
child 319392 a5f3e15356a89e450eaaa66fbafda36ed3b48a37
push id20743
push userphilringnalda@gmail.com
push dateWed, 26 Oct 2016 05:13:15 +0000
treeherderfx-team@f9f3cc95d728 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbaku
bugs1312527
milestone52.0a1
Bug 1312527 - Promote docshell private browsing assertions to diagnostic asserts; r=baku This will allow us to catch these assertions failing in non-debug builds on our pre-release channels.
docshell/base/nsDocShell.cpp
--- a/docshell/base/nsDocShell.cpp
+++ b/docshell/base/nsDocShell.cpp
@@ -3736,19 +3736,19 @@ nsDocShell::FindItemWithName(const char1
 }
 
 void
 nsDocShell::AssertOriginAttributesMatchPrivateBrowsing() {
   // Chrome docshells must not have a private browsing OriginAttribute
   // Content docshells must maintain the equality:
   // mOriginAttributes.mPrivateBrowsingId == mPrivateBrowsingId
   if (mItemType == typeChrome) {
-    MOZ_ASSERT(mOriginAttributes.mPrivateBrowsingId == 0);
+    MOZ_DIAGNOSTIC_ASSERT(mOriginAttributes.mPrivateBrowsingId == 0);
   } else {
-    MOZ_ASSERT(mOriginAttributes.mPrivateBrowsingId == mPrivateBrowsingId);
+    MOZ_DIAGNOSTIC_ASSERT(mOriginAttributes.mPrivateBrowsingId == mPrivateBrowsingId);
   }
 }
 
 nsresult
 nsDocShell::DoFindItemWithName(const char16_t* aName,
                                nsISupports* aRequestor,
                                nsIDocShellTreeItem* aOriginalRequestor,
                                nsIDocShellTreeItem** aResult)