Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright (C) 2003, 2006, 2007 Apple Inc. All rights reserved. | 2 * Copyright (C) 2003, 2006, 2007 Apple Inc. All rights reserved. |
| 3 * Copyright (C) 2013 Google Inc. All rights reserved. | 3 * Copyright (C) 2013 Google Inc. All rights reserved. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 116 } // Note: not thread safe. | 116 } // Note: not thread safe. |
| 117 | 117 |
| 118 void init(const char* format, va_list args); | 118 void init(const char* format, va_list args); |
| 119 void writeNewlineIfNeeded(); | 119 void writeNewlineIfNeeded(); |
| 120 void indent(); | 120 void indent(); |
| 121 void print(const char* format, ...); | 121 void print(const char* format, ...); |
| 122 void printIndent(); | 122 void printIndent(); |
| 123 static ScopedLogger*& current(); | 123 static ScopedLogger*& current(); |
| 124 | 124 |
| 125 ScopedLogger* const m_parent; | 125 ScopedLogger* const m_parent; |
| 126 bool | 126 bool m_multiline; // The ')' will go on the same line if there is only one |
| 127 m_multiline; // The ')' will go on the same line if there is only one ent ry. | 127 // entry. |
|
dcheng
2016/10/01 19:58:17
Nit: move comment to previous line
Nico
2016/10/02 00:49:28
Hm, it doesn't look worse as-is and it makes it a
| |
| 128 static PrintFunctionPtr m_printFunc; | 128 static PrintFunctionPtr m_printFunc; |
| 129 }; | 129 }; |
| 130 | 130 |
| 131 #define WTF_CREATE_SCOPED_LOGGER(name, ...) \ | 131 #define WTF_CREATE_SCOPED_LOGGER(name, ...) \ |
| 132 WTF::ScopedLogger name(true, __VA_ARGS__) | 132 WTF::ScopedLogger name(true, __VA_ARGS__) |
| 133 #define WTF_CREATE_SCOPED_LOGGER_IF(name, condition, ...) \ | 133 #define WTF_CREATE_SCOPED_LOGGER_IF(name, condition, ...) \ |
| 134 WTF::ScopedLogger name(condition, __VA_ARGS__) | 134 WTF::ScopedLogger name(condition, __VA_ARGS__) |
| 135 #define WTF_APPEND_SCOPED_LOGGER(name, ...) (name.log(__VA_ARGS__)) | 135 #define WTF_APPEND_SCOPED_LOGGER(name, ...) (name.log(__VA_ARGS__)) |
| 136 | 136 |
| 137 #endif // LOG_DISABLED | 137 #endif // LOG_DISABLED |
| (...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 327 return static_cast<thisType&>(argumentName); \ | 327 return static_cast<thisType&>(argumentName); \ |
| 328 } \ | 328 } \ |
| 329 inline const thisType& to##thisType(const argumentType& argumentName) { \ | 329 inline const thisType& to##thisType(const argumentType& argumentName) { \ |
| 330 ASSERT_WITH_SECURITY_IMPLICATION(referencePredicate); \ | 330 ASSERT_WITH_SECURITY_IMPLICATION(referencePredicate); \ |
| 331 return static_cast<const thisType&>(argumentName); \ | 331 return static_cast<const thisType&>(argumentName); \ |
| 332 } \ | 332 } \ |
| 333 void to##thisType(const thisType*); \ | 333 void to##thisType(const thisType*); \ |
| 334 void to##thisType(const thisType&) | 334 void to##thisType(const thisType&) |
| 335 | 335 |
| 336 #endif // WTF_Assertions_h | 336 #endif // WTF_Assertions_h |
| OLD | NEW |