Changeset 295661 in webkit for trunk/Source/JavaScriptCore/tools/Integrity.h
- Timestamp:
- Jun 18, 2022, 9:13:05 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/tools/Integrity.h
r294287 r295661 49 49 typedef struct OpaqueJSValue* JSObjectRef; 50 50 51 namespace WTF { 52 class PrintStream; 53 } 54 51 55 namespace JSC { 52 56 … … 178 182 179 183 #define IA_LOG(assertion, format, ...) do { \ 180 WTFLogAlways("Integrity ERROR: %s @ %s:%d\n", #assertion, __FILE__, __LINE__); \ 181 WTFLogAlways(" " format, ##__VA_ARGS__); \ 184 Integrity::logLnF("ERROR: %s @ %s:%d", #assertion, __FILE__, __LINE__); \ 182 185 } while (false) 183 186 … … 185 188 if (UNLIKELY(!(assertion))) { \ 186 189 IA_LOG(assertion, __VA_ARGS__); \ 187 WTFReportBacktraceWithPrefix (" "); \190 WTFReportBacktraceWithPrefixAndPrintStream(Integrity::logFile(), " "); \ 188 191 action; \ 189 192 } \ … … 192 195 #define IA_ASSERT(assertion, ...) \ 193 196 IA_ASSERT_WITH_ACTION(assertion, { \ 194 RELEASE_ASSERT((assertion) , ##__VA_ARGS__); \195 } , ## __VA_ARGS__)197 RELEASE_ASSERT((assertion)); \ 198 }) 196 199 197 200 #else // not (COMPILER(MSVC) || !VA_OPT_SUPPORTED) 198 201 199 202 #define IA_LOG(assertion, format, ...) do { \ 200 WTFLogAlways("Integrity ERROR: %s @ %s:%d\n", #assertion, __FILE__, __LINE__); \201 WTFLogAlways(" " format __VA_OPT__(,) __VA_ARGS__); \203 Integrity::logLnF("ERROR: %s @ %s:%d", #assertion, __FILE__, __LINE__); \ 204 Integrity::logLnF(" " format __VA_OPT__(,) __VA_ARGS__); \ 202 205 } while (false) 203 206 … … 205 208 if (UNLIKELY(!(assertion))) { \ 206 209 IA_LOG(assertion, __VA_ARGS__); \ 207 WTFReportBacktraceWithPrefix (" "); \210 WTFReportBacktraceWithPrefixAndPrintStream(Integrity::logFile(), " "); \ 208 211 action; \ 209 212 } \ … … 217 220 #endif // COMPILER(MSVC) || !VA_OPT_SUPPORTED 218 221 222 JS_EXPORT_PRIVATE WTF::PrintStream& logFile(); 223 JS_EXPORT_PRIVATE void logF(const char* format, ...) WTF_ATTRIBUTE_PRINTF(1, 2); 224 JS_EXPORT_PRIVATE void logLnF(const char* format, ...) WTF_ATTRIBUTE_PRINTF(1, 2); 225 219 226 } // namespace Integrity 220 227
Note:
See TracChangeset
for help on using the changeset viewer.