Bug 1280513 part.2 WinMouseScrollHandler should use LazyLogModule instead of PR_NewLogModule() r?m_kato draft
authorMasayuki Nakano <masayuki@d-toybox.com>
Fri, 17 Jun 2016 03:10:06 +0900
changeset 379722 0f565f687fe44411f4afacf5c0c59c982921779d
parent 379721 c1989d4584badb03749a4841339dfc25b3d99d21
child 523549 9fa964d22e5a9497da5a9b9d4ec2f408769aa4c8
push id21031
push usermasayuki@d-toybox.com
push dateThu, 16 Jun 2016 18:16:43 +0000
reviewersm_kato
bugs1280513
milestone50.0a1
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
widget/windows/WinMouseScrollHandler.cpp
--- 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;