Bug 1457813 - Part 3: Remove NS_PRECONDITION definition. r=froydnj

Use fatal MOZ_ASSERT or non-fatal NS_ASSERTION instead.

MozReview-Commit-ID: 1QAsgoWpXDn

--HG--
extra : source : 9ca972b6b3e7d3b576e20a0bf412df51d82aad9f
extra : intermediate-source : a909a9d7bc9a53095e963a4bea45f4fc4aa85b72
This commit is contained in:
Chris Peterson 2018-04-27 21:42:24 -07:00
Родитель 71422dcaa9
Коммит 5a63a12794
3 изменённых файлов: 1 добавлений и 8 удалений

Просмотреть файл

@ -13,7 +13,7 @@
#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"

Просмотреть файл

@ -50,8 +50,6 @@ MOZ_ReportCrash(const char* aStr, const char* aFilename, int aLine)
#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) \

Просмотреть файл

@ -105,11 +105,6 @@ inline void MOZ_PretendNoReturn()
#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.