Commit ddda3c58 authored by Gyuyoung Kim's avatar Gyuyoung Kim Committed by Commit Bot

Reland "Remove WTFLogAlways in blink"

This is a reland of 935a591a.

Original change's description:

>Remove WTFLogAlways in blink

>As a step not to use utilities in Assertions.h, this CL removes both WTFLogAlways() and its all
>of uses in the blink. Additionally vprintf_stderr_with_trailing_newline() is also removed because
>it has been only using by WTFLogAlways().

Bug: 638849
Change-Id: I7120ca5b70a115bb1c45db57f077254eef57b140
Reviewed-on: https://chromium-review.googlesource.com/792550
Commit-Queue: Gyuyoung Kim <gyuyoung.kim@lge.com>
Commit-Queue: Xianzhu Wang <wangxianzhu@chromium.org>
Reviewed-by: default avatarKentaro Hara <haraken@chromium.org>
Reviewed-by: default avatarXianzhu Wang <wangxianzhu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#519538}
parent 40176a79
......@@ -96,30 +96,6 @@ void vprintf_stderr_common(const char* format, va_list args) {
#pragma GCC diagnostic ignored "-Wformat-nonliteral"
#endif
static void vprintf_stderr_with_trailing_newline(const char* format,
va_list args) {
size_t formatLength = strlen(format);
if (formatLength && format[formatLength - 1] == '\n') {
vprintf_stderr_common(format, args);
return;
}
std::unique_ptr<char[]> formatWithNewline =
WrapArrayUnique(new char[formatLength + 2]);
memcpy(formatWithNewline.get(), format, formatLength);
formatWithNewline[formatLength] = '\n';
formatWithNewline[formatLength + 1] = 0;
vprintf_stderr_common(formatWithNewline.get(), args);
}
#if defined(COMPILER_GCC)
#pragma GCC diagnostic pop
#endif
void WTFLogAlways(const char* format, ...) {
va_list args;
va_start(args, format);
vprintf_stderr_with_trailing_newline(format, args);
va_end(args);
}
......@@ -36,10 +36,6 @@
// New code shouldn't use this function. This function will be deprecated.
void vprintf_stderr_common(const char* format, va_list args);
// WTFLogAlways() is deprecated. crbug.com/638849
WTF_EXPORT PRINTF_FORMAT(1, 2) // NOLINT
void WTFLogAlways(const char* format, ...);
#define DCHECK_AT(assertion, file, line) \
LAZY_STREAM(logging::LogMessage(file, line, #assertion).stream(), \
DCHECK_IS_ON() ? !(assertion) : false)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment