mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1237831 - Use a non-format argument in LogMessageToConsole. r=jst
This commit is contained in:
parent
d861892e23
commit
a9dafba702
@ -11,7 +11,6 @@
|
||||
#include <algorithm>
|
||||
#include <math.h>
|
||||
|
||||
#include "prprf.h"
|
||||
#include "DecoderTraits.h"
|
||||
#include "harfbuzz/hb.h"
|
||||
#include "imgICache.h"
|
||||
@ -3525,7 +3524,7 @@ nsContentUtils::ReportToConsoleNonLocalized(const nsAString& aErrorText,
|
||||
}
|
||||
|
||||
void
|
||||
nsContentUtils::LogMessageToConsole(const char* aMsg, ...)
|
||||
nsContentUtils::LogMessageToConsole(const char* aMsg)
|
||||
{
|
||||
if (!sConsoleService) { // only need to bother null-checking here
|
||||
CallGetService(NS_CONSOLESERVICE_CONTRACTID, &sConsoleService);
|
||||
@ -3533,17 +3532,7 @@ nsContentUtils::LogMessageToConsole(const char* aMsg, ...)
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
va_list args;
|
||||
va_start(args, aMsg);
|
||||
char* formatted = PR_vsmprintf(aMsg, args);
|
||||
va_end(args);
|
||||
if (!formatted) {
|
||||
return;
|
||||
}
|
||||
|
||||
sConsoleService->LogStringMessage(NS_ConvertUTF8toUTF16(formatted).get());
|
||||
PR_smprintf_free(formatted);
|
||||
sConsoleService->LogStringMessage(NS_ConvertUTF8toUTF16(aMsg).get());
|
||||
}
|
||||
|
||||
bool
|
||||
|
@ -893,8 +893,8 @@ public:
|
||||
uint32_t aLineNumber = 0,
|
||||
uint32_t aColumnNumber = 0);
|
||||
|
||||
static void LogMessageToConsole(const char* aMsg, ...);
|
||||
|
||||
static void LogMessageToConsole(const char* aMsg);
|
||||
|
||||
/**
|
||||
* Get the localized string named |aKey| in properties file |aFile|.
|
||||
*/
|
||||
|
@ -310,8 +310,8 @@ ServiceWorkerRegistrar::ReadData()
|
||||
}
|
||||
|
||||
if (!IsSupportedVersion(version)) {
|
||||
nsContentUtils::LogMessageToConsole(
|
||||
"Unsupported service worker registrar version: %s", version.get());
|
||||
nsContentUtils::LogMessageToConsole(nsPrintfCString(
|
||||
"Unsupported service worker registrar version: %s", version.get()).get());
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user