The return of NS_ABORT_IF_FALSE
Thursday, July 17th, 2008After five years in hiding, NS_ABORT_IF_FALSE has returned. Please use it instead of NS_ASSERTION in situations where failure is likely to lead to memory corruption. By aborting rather than asserting, you ensure that debug-build users focus on the cause of the corruption rather than whatever random crash results from the corruption. This leads to happier debugging and better bug reports.
Of course, sometimes it's better to prevent the memory corruption entirely, e.g. by adding a run-time check or by making all builds abort (not just debug builds).