Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1102)

Side by Side Diff: third_party/WebKit/Source/platform/wtf/Assertions.cpp

Issue 2968713002: Remove all uses of LOG_DISABLED in blink (Closed)
Patch Set: Created 3 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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) 2007-2009 Torch Mobile, Inc. 3 * Copyright (C) 2007-2009 Torch Mobile, Inc.
4 * Copyright (C) 2011 University of Szeged. All rights reserved. 4 * Copyright (C) 2011 University of Szeged. All rights reserved.
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions 7 * modification, are permitted provided that the following conditions
8 * are met: 8 * are met:
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 formatWithNewline[formatLength] = '\n'; 121 formatWithNewline[formatLength] = '\n';
122 formatWithNewline[formatLength + 1] = 0; 122 formatWithNewline[formatLength + 1] = 0;
123 123
124 vprintf_stderr_common(formatWithNewline.get(), args); 124 vprintf_stderr_common(formatWithNewline.get(), args);
125 } 125 }
126 126
127 #if COMPILER(GCC) 127 #if COMPILER(GCC)
128 #pragma GCC diagnostic pop 128 #pragma GCC diagnostic pop
129 #endif 129 #endif
130 130
131 #if !LOG_DISABLED 131 #if DCHECK_IS_ON()
132 namespace WTF { 132 namespace WTF {
133 133
134 ScopedLogger::ScopedLogger(bool condition, const char* format, ...) 134 ScopedLogger::ScopedLogger(bool condition, const char* format, ...)
135 : parent_(condition ? Current() : 0), multiline_(false) { 135 : parent_(condition ? Current() : 0), multiline_(false) {
136 if (!condition) 136 if (!condition)
137 return; 137 return;
138 138
139 va_list args; 139 va_list args;
140 va_start(args, format); 140 va_start(args, format);
141 Init(format, args); 141 Init(format, args);
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 209
210 ScopedLogger*& ScopedLogger::Current() { 210 ScopedLogger*& ScopedLogger::Current() {
211 DEFINE_THREAD_SAFE_STATIC_LOCAL(ThreadSpecific<ScopedLogger*>, ref, ()); 211 DEFINE_THREAD_SAFE_STATIC_LOCAL(ThreadSpecific<ScopedLogger*>, ref, ());
212 return *ref; 212 return *ref;
213 } 213 }
214 214
215 ScopedLogger::PrintFunctionPtr ScopedLogger::print_func_ = 215 ScopedLogger::PrintFunctionPtr ScopedLogger::print_func_ =
216 vprintf_stderr_common; 216 vprintf_stderr_common;
217 217
218 } // namespace WTF 218 } // namespace WTF
219 #endif // !LOG_DISABLED 219 #endif // DCHECK_IS_ON
220 220
221 void WTFLogAlways(const char* format, ...) { 221 void WTFLogAlways(const char* format, ...) {
222 va_list args; 222 va_list args;
223 va_start(args, format); 223 va_start(args, format);
224 vprintf_stderr_with_trailing_newline(format, args); 224 vprintf_stderr_with_trailing_newline(format, args);
225 va_end(args); 225 va_end(args);
226 } 226 }
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/platform/wtf/Assertions.h ('k') | third_party/WebKit/Source/platform/wtf/AssertionsTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698