WebKit Bugzilla
Attachment 362647 Details for
Bug 194920
: Fix WTFLogVerbose variadic parameters forwarding
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-194920-20190221232545.patch (text/plain), 2.97 KB, created by
Xabier RodrÃguez Calvar
on 2019-02-21 14:25:46 PST
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Xabier RodrÃguez Calvar
Created:
2019-02-21 14:25:46 PST
Size:
2.97 KB
patch
obsolete
>Subversion Revision: 241900 >diff --git a/Source/WTF/ChangeLog b/Source/WTF/ChangeLog >index 2ce7a542e9f26824c7617430febbd6dca492aad5..4352870644b554dca08c4e600d0ccdb08c9c1f67 100644 >--- a/Source/WTF/ChangeLog >+++ b/Source/WTF/ChangeLog >@@ -1,3 +1,21 @@ >+2019-02-21 Xabier Rodriguez Calvar <calvaris@igalia.com> >+ >+ Fix WTFLogVerbose variadic parameters forwarding >+ https://bugs.webkit.org/show_bug.cgi?id=194920 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ WTFLogVerbose was passing the va_list to WTFLog but this function >+ also used variadic parameters and this is not allowed in C (that >+ part of the code is extern "C"). >+ >+ * wtf/Assertions.cpp: >+ (WTF::WTFLogVaList): Created to take a va_list argument instead of >+ variadic parameters. >+ (WTF::WTFLog): Kept with variadic parameters, which are >+ transformed to va_list and passed to WTFLogVaList. >+ (WTF::WTFLogVerbose): Use WTFLogVaList instead of WTFLog. >+ > 2019-02-21 Antoine Quint <graouts@apple.com> > > Move UIWebTouchEventsGestureRecognizer.activeTouchesByIdentifier to SPI >diff --git a/Source/WTF/wtf/Assertions.cpp b/Source/WTF/wtf/Assertions.cpp >index a6e79b3a37ddabcf485d9a3650bca4e8a7bbd02f..25f2691e35054c7efe252e7fd641924c8b2641a2 100644 >--- a/Source/WTF/wtf/Assertions.cpp >+++ b/Source/WTF/wtf/Assertions.cpp >@@ -380,30 +380,22 @@ void WTFLogWithLevel(WTFLogChannel* channel, WTFLogLevel level, const char* form > va_end(args); > } > >-void WTFLog(WTFLogChannel* channel, const char* format, ...) >+static void WTFLogVaList(WTFLogChannel* channel, const char* format, va_list args) > { > if (channel->state == WTFLogChannelOff) > return; > > if (channel->state == WTFLogChannelOn) { >- va_list args; >- va_start(args, format); > vprintf_stderr_with_trailing_newline(format, args); >- va_end(args); > return; > } > > ASSERT(channel->state == WTFLogChannelOnWithAccumulation); > >- va_list args; >- va_start(args, format); >- > ALLOW_NONLITERAL_FORMAT_BEGIN > String loggingString = String::format(format, args); > ALLOW_NONLITERAL_FORMAT_END > >- va_end(args); >- > if (!loggingString.endsWith('\n')) > loggingString.append('\n'); > >@@ -412,6 +404,16 @@ void WTFLog(WTFLogChannel* channel, const char* format, ...) > logToStderr(loggingString.utf8().data()); > } > >+void WTFLog(WTFLogChannel* channel, const char* format, ...) >+{ >+ va_list args; >+ va_start(args, format); >+ >+ WTFLogVaList(channel, format, args); >+ >+ va_end(args); >+} >+ > void WTFLogVerbose(const char* file, int line, const char* function, WTFLogChannel* channel, const char* format, ...) > { > if (channel->state != WTFLogChannelOn) >@@ -421,7 +423,7 @@ void WTFLogVerbose(const char* file, int line, const char* function, WTFLogChann > va_start(args, format); > > ALLOW_NONLITERAL_FORMAT_BEGIN >- WTFLog(channel, format, args); >+ WTFLogVaList(channel, format, args); > ALLOW_NONLITERAL_FORMAT_END > > va_end(args);
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 194920
:
362647
|
362675
|
362962