1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef PPAPI_CPP_LOGGING_H_
6 #define PPAPI_CPP_LOGGING_H_
9 /// This file defines two macro asserts.
13 /// This macro asserts that 'a' evaluates to true. In debug mode, this macro
14 /// will crash the program if the assertion evaluates to false. It (typically)
15 /// has no effect in release mode.
16 #define PP_DCHECK(a) assert(a)
18 /// This macro asserts false in debug builds. It's used in code paths that you
19 /// don't expect to execute.
21 /// <strong>Example:</strong>
25 /// // Pointer wasn't valid! This shouldn't happen.
29 /// // Do stuff to the pointer, since you know it's valid.
30 /// pointer->DoSomething();
32 #define PP_NOTREACHED() assert(false)
34 #endif // PPAPI_CPP_LOGGING_H_