Bug 1280513 part.2 WinMouseScrollHandler should use LazyLogModule instead of PR_NewLogModule() r?m_kato
For making WinMouseScrollHandler MOZ_LOG* environment variables aware, WinMouseScrollHandler should use LazyLogModule.
MozReview-Commit-ID: ERurkwVX2Fb
--- a/widget/windows/WinMouseScrollHandler.cpp
+++ b/widget/windows/WinMouseScrollHandler.cpp
@@ -22,17 +22,17 @@
#include "mozilla/Preferences.h"
#include "mozilla/WindowsVersion.h"
#include <psapi.h>
namespace mozilla {
namespace widget {
-PRLogModuleInfo* gMouseScrollLog = nullptr;
+LazyLogModule gMouseScrollLog("MouseScrollHandlerWidgets");
static const char* GetBoolName(bool aBool)
{
return aBool ? "TRUE" : "FALSE";
}
MouseScrollHandler* MouseScrollHandler::sInstance = nullptr;
@@ -76,19 +76,16 @@ MouseScrollHandler::GetCurrentMessagePos
// Get rid of the GetMessagePos() API.
#define GetMessagePos()
/* static */
void
MouseScrollHandler::Initialize()
{
- if (!gMouseScrollLog) {
- gMouseScrollLog = PR_NewLogModule("MouseScrollHandlerWidgets");
- }
Device::Init();
}
/* static */
void
MouseScrollHandler::Shutdown()
{
delete sInstance;