Bug 1457813 - Part 4: Remove NS_PRECONDITION definition. r?froydnj
MozReview-Commit-ID: 1QAsgoWpXDn
--- a/editor/libeditor/HTMLEditUtils.cpp
+++ b/editor/libeditor/HTMLEditUtils.cpp
@@ -8,17 +8,17 @@
#include "TextEditUtils.h" // for TextEditUtils
#include "mozilla/ArrayUtils.h" // for ArrayLength
#include "mozilla/Assertions.h" // for MOZ_ASSERT, etc.
#include "mozilla/EditorBase.h" // for EditorBase
#include "mozilla/dom/Element.h" // for Element, nsINode
#include "nsAString.h" // for nsAString::IsEmpty
#include "nsCOMPtr.h" // for nsCOMPtr, operator==, etc.
#include "nsCaseTreatment.h"
-#include "nsDebug.h" // for NS_PRECONDITION, etc.
+#include "nsDebug.h" // for NS_ASSERTION, etc.
#include "nsError.h" // for NS_SUCCEEDED
#include "nsGkAtoms.h" // for nsGkAtoms, nsGkAtoms::a, etc.
#include "nsHTMLTags.h"
#include "nsAtom.h" // for nsAtom
#include "nsIDOMNode.h" // for nsIDOMNode
#include "nsNameSpaceManager.h" // for kNameSpaceID_None
#include "nsLiteralString.h" // for NS_LITERAL_STRING
#include "nsString.h" // for nsAutoString
--- a/tools/coverity/model.cpp
+++ b/tools/coverity/model.cpp
@@ -45,18 +45,16 @@ MOZ_ReportCrash(const char* aStr, const
#define MOZ_ASSERT(expr) assert(!!(expr))
#define NS_ASSERTION(expr, msg) assert(!!(expr))
#define PORT_Assert(expr) assert(!!(expr))
#define PR_ASSERT(expr) assert(!!(expr))
-#define NS_PRECONDITION(expr, msg) assert(!!(expr))
-
// Kills Structurally dead code (UNREACHABLE)
#define NS_IMPL_CYCLE_COLLECTION_CAN_SKIP_THIS_BEGIN(_class) \
NS_IMETHODIMP_(bool) \
NS_CYCLE_COLLECTION_CLASSNAME(_class)::CanSkipThisReal(void* p) \
{ \
__coverity_panic__(); \
_class* tmp = DowncastCCParticipant<_class>(p);
--- a/xpcom/base/nsDebug.h
+++ b/xpcom/base/nsDebug.h
@@ -101,21 +101,16 @@ inline void MOZ_PretendNoReturn()
MOZ_PretendNoReturn(); \
} \
} while(0)
#else
#define NS_ASSERTION(expr, str) do { /* nothing */ } while(0)
#endif
/**
- * NS_PRECONDITION is a synonym for NS_ASSERTION.
- */
-#define NS_PRECONDITION(expr, str) NS_ASSERTION(expr, str)
-
-/**
* This macros triggers a program failure if executed. It indicates that
* an attempt was made to execute a codepath which should not be reachable.
*/
#ifdef DEBUG
#define NS_NOTREACHED(str) \
do { \
NS_DebugBreak(NS_DEBUG_ASSERTION, str, "Not Reached", __FILE__, __LINE__); \
MOZ_PretendNoReturn(); \