Bug 794510: Part 4 - Use PR_NewLogModule instead of PR_LOG_DEFINE; r=ehsan,wtc
authorIsaac Aggrey <isaac.aggrey@gmail.com>
Sat, 13 Oct 2012 15:56:35 -0500
changeset 110684 01e26f56f07862129f9ec10ac1027b274bc4a8e2
parent 110683 93dc400ae049812e01e13e54144f64e8edcacc45
child 110685 396742c90b0a00d4ffeeeb728c9dd0808a608c7a
push id93
push usernmatsakis@mozilla.com
push dateWed, 31 Oct 2012 21:26:57 +0000
reviewersehsan, wtc
bugs794510
milestone19.0a1
Bug 794510: Part 4 - Use PR_NewLogModule instead of PR_LOG_DEFINE; r=ehsan,wtc
docshell/shistory/src/nsSHistory.cpp
dom/camera/DOMCameraManager.cpp
hal/Hal.cpp
--- a/docshell/shistory/src/nsSHistory.cpp
+++ b/docshell/shistory/src/nsSHistory.cpp
@@ -55,17 +55,17 @@ static PRCList gSHistoryList;
 // Max viewers allowed total, across all SHistory objects - negative default
 // means we will calculate how many viewers to cache based on total memory
 int32_t nsSHistory::sHistoryMaxTotalViewers = -1;
 
 // A counter that is used to be able to know the order in which
 // entries were touched, so that we can evict older entries first.
 static uint32_t gTouchCounter = 0;
 
-static PRLogModuleInfo* gLogModule = PR_LOG_DEFINE("nsSHistory");
+static PRLogModuleInfo* gLogModule = PR_NewLogModule("nsSHistory");
 #define LOG(format) PR_LOG(gLogModule, PR_LOG_DEBUG, format)
 
 // This macro makes it easier to print a log message which includes a URI's
 // spec.  Example use:
 //
 //  nsIURI *uri = [...];
 //  LOG_SPEC(("The URI is %s.", _spec), uri);
 //
--- a/dom/camera/DOMCameraManager.cpp
+++ b/dom/camera/DOMCameraManager.cpp
@@ -39,17 +39,17 @@ NS_IMPL_CYCLE_COLLECTING_ADDREF(nsDOMCam
 NS_IMPL_CYCLE_COLLECTING_RELEASE(nsDOMCameraManager)
 
 /**
  * Global camera logging object
  *
  * Set the NSPR_LOG_MODULES environment variable to enable logging
  * in a debug build, e.g. NSPR_LOG_MODULES=Camera:5
  */
-PRLogModuleInfo* gCameraLog = PR_LOG_DEFINE("Camera");
+PRLogModuleInfo* gCameraLog = PR_NewLogModule("Camera");
 
 /**
  * nsDOMCameraManager::GetListOfCameras
  * is implementation-specific, and can be found in (e.g.)
  * GonkCameraManager.cpp and FallbackCameraManager.cpp.
  */
 
 WindowTable nsDOMCameraManager::sActiveWindows;
--- a/hal/Hal.cpp
+++ b/hal/Hal.cpp
@@ -50,17 +50,17 @@ using namespace mozilla::services;
     } else {                                      \
       return hal_impl::_call;                     \
     }                                             \
   } while (0)
 
 namespace mozilla {
 namespace hal {
 
-PRLogModuleInfo *sHalLog = PR_LOG_DEFINE("hal");
+PRLogModuleInfo *sHalLog = PR_NewLogModule("hal");
 
 namespace {
 
 void
 AssertMainThread()
 {
   MOZ_ASSERT(NS_IsMainThread());
 }