| 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 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 | 70 |
| 71 namespace WebKit { | 71 namespace WebKit { |
| 72 | 72 |
| 73 // UTF-16 character type | 73 // UTF-16 character type |
| 74 #if defined(WIN32) | 74 #if defined(WIN32) |
| 75 typedef wchar_t WebUChar; | 75 typedef wchar_t WebUChar; |
| 76 #else | 76 #else |
| 77 typedef unsigned short WebUChar; | 77 typedef unsigned short WebUChar; |
| 78 #endif | 78 #endif |
| 79 | 79 |
| 80 // Latin-1 character type |
| 81 typedef unsigned char WebLChar; |
| 82 |
| 80 // ----------------------------------------------------------------------------- | 83 // ----------------------------------------------------------------------------- |
| 81 // Assertions | 84 // Assertions |
| 82 | 85 |
| 83 WEBKIT_EXPORT void failedAssertion(const char* file, int line, const char* funct
ion, const char* assertion); | 86 WEBKIT_EXPORT void failedAssertion(const char* file, int line, const char* funct
ion, const char* assertion); |
| 84 | 87 |
| 85 } // namespace WebKit | 88 } // namespace WebKit |
| 86 | 89 |
| 87 // Ideally, only use inside the public directory but outside of WEBKIT_IMPLEMENT
ATION blocks. (Otherwise use WTF's ASSERT.) | 90 // Ideally, only use inside the public directory but outside of WEBKIT_IMPLEMENT
ATION blocks. (Otherwise use WTF's ASSERT.) |
| 88 #if defined(NDEBUG) | 91 #if defined(NDEBUG) |
| 89 #define WEBKIT_ASSERT(assertion) ((void)0) | 92 #define WEBKIT_ASSERT(assertion) ((void)0) |
| 90 #else | 93 #else |
| 91 #define WEBKIT_ASSERT(assertion) do { \ | 94 #define WEBKIT_ASSERT(assertion) do { \ |
| 92 if (!(assertion)) \ | 95 if (!(assertion)) \ |
| 93 failedAssertion(__FILE__, __LINE__, __FUNCTION__, #assertion); \ | 96 failedAssertion(__FILE__, __LINE__, __FUNCTION__, #assertion); \ |
| 94 } while (0) | 97 } while (0) |
| 95 #endif | 98 #endif |
| 96 | 99 |
| 97 #define WEBKIT_ASSERT_NOT_REACHED() WEBKIT_ASSERT(0) | 100 #define WEBKIT_ASSERT_NOT_REACHED() WEBKIT_ASSERT(0) |
| 98 | 101 |
| 99 #endif | 102 #endif |
| OLD | NEW |