mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1229804: Use the correct string length in Windows sandbox logging. r=tabraldes
This commit is contained in:
parent
9fd7a64540
commit
744f82da14
@ -61,12 +61,12 @@ LogBlocked(const char* aFunctionName, const wchar_t* aContext)
|
||||
|
||||
void
|
||||
LogBlocked(const char* aFunctionName, const wchar_t* aContext,
|
||||
uint16_t aLength)
|
||||
uint16_t aLengthInBytes)
|
||||
{
|
||||
if (sLogFunction) {
|
||||
// Skip an extra frame to allow for this function.
|
||||
LogBlocked(aFunctionName,
|
||||
base::WideToUTF8(std::wstring(aContext, aLength)).c_str(),
|
||||
base::WideToUTF8(std::wstring(aContext, aLengthInBytes / sizeof(wchar_t))).c_str(),
|
||||
/* aFramesToSkip */ 3);
|
||||
}
|
||||
}
|
||||
@ -90,11 +90,11 @@ LogAllowed(const char* aFunctionName, const wchar_t* aContext)
|
||||
|
||||
void
|
||||
LogAllowed(const char* aFunctionName, const wchar_t* aContext,
|
||||
uint16_t aLength)
|
||||
uint16_t aLengthInBytes)
|
||||
{
|
||||
if (sLogFunction) {
|
||||
LogAllowed(aFunctionName,
|
||||
base::WideToUTF8(std::wstring(aContext, aLength)).c_str());
|
||||
base::WideToUTF8(std::wstring(aContext, aLengthInBytes / sizeof(wchar_t))).c_str());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -43,7 +43,7 @@ void LogBlocked(const char* aFunctionName, const char* aContext = nullptr,
|
||||
// Convenience functions to convert to char*.
|
||||
void LogBlocked(const char* aFunctionName, const wchar_t* aContext);
|
||||
void LogBlocked(const char* aFunctionName, const wchar_t* aContext,
|
||||
uint16_t aLength);
|
||||
uint16_t aLengthInBytes);
|
||||
|
||||
// Log a "ALLOWED" msg to the browser console and, if DEBUG build, stderr.
|
||||
void LogAllowed(const char* aFunctionName, const char* aContext = nullptr);
|
||||
@ -51,7 +51,7 @@ void LogAllowed(const char* aFunctionName, const char* aContext = nullptr);
|
||||
// Convenience functions to convert to char*.
|
||||
void LogAllowed(const char* aFunctionName, const wchar_t* aContext);
|
||||
void LogAllowed(const char* aFunctionName, const wchar_t* aContext,
|
||||
uint16_t aLength);
|
||||
uint16_t aLengthInBytes);
|
||||
|
||||
|
||||
} // sandboxing
|
||||
|
Loading…
Reference in New Issue
Block a user