| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2010 Google Inc. All rights reserved. | 2 * Copyright (C) 2010 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 86 // UTF-16 character type | 86 // UTF-16 character type |
| 87 #if defined(WIN32) | 87 #if defined(WIN32) |
| 88 typedef wchar_t WebUChar; | 88 typedef wchar_t WebUChar; |
| 89 #else | 89 #else |
| 90 typedef unsigned short WebUChar; | 90 typedef unsigned short WebUChar; |
| 91 #endif | 91 #endif |
| 92 | 92 |
| 93 // Latin-1 character type | 93 // Latin-1 character type |
| 94 typedef unsigned char WebLChar; | 94 typedef unsigned char WebLChar; |
| 95 | 95 |
| 96 // ----------------------------------------------------------------------------- | |
| 97 // Assertions | |
| 98 | |
| 99 BLINK_COMMON_EXPORT void failedAssertion(const char* file, int line, const char*
function, const char* assertion); | |
| 100 | |
| 101 } // namespace blink | 96 } // namespace blink |
| 102 | 97 |
| 103 // Ideally, only use inside the public directory but outside of INSIDE_BLINK blo
cks. (Otherwise use WTF's ASSERT.) | |
| 104 #if defined(NDEBUG) | |
| 105 #define BLINK_ASSERT(assertion) ((void)0) | |
| 106 #else | |
| 107 #define BLINK_ASSERT(assertion) do { \ | |
| 108 if (!(assertion)) \ | |
| 109 failedAssertion(__FILE__, __LINE__, __FUNCTION__, #assertion); \ | |
| 110 } while (0) | |
| 111 #endif | 98 #endif |
| 112 | |
| 113 #define BLINK_ASSERT_NOT_REACHED() BLINK_ASSERT(0) | |
| 114 | |
| 115 #endif | |
| OLD | NEW |