Bug 972940 - Rename XPCOM_CC_ env vars to MOZ_CC_. r=smaug
authorAndrew McCreight <continuation@gmail.com>
Wed, 19 Feb 2014 13:27:14 -0800
changeset 169954 53fcde23863a2651ab205a0a236634b88d912934
parent 169953 4ca2f958008b44b0002e41452968a25a14dfb270
child 169955 efa4c77cfa5f5fdef61e3fffc1539601db2f4d53
push id270
push userpvanderbeken@mozilla.com
push dateThu, 06 Mar 2014 09:24:21 +0000
reviewerssmaug
bugs972940
milestone30.0a1
Bug 972940 - Rename XPCOM_CC_ env vars to MOZ_CC_. r=smaug
xpcom/base/nsCycleCollector.cpp
--- a/xpcom/base/nsCycleCollector.cpp
+++ b/xpcom/base/nsCycleCollector.cpp
@@ -194,30 +194,30 @@ using namespace mozilla;
 
 #define DEFAULT_SHUTDOWN_COLLECTIONS 5
 
 // One to do the freeing, then another to detect there is no more work to do.
 #define NORMAL_SHUTDOWN_COLLECTIONS 2
 
 // Cycle collector environment variables
 //
-// XPCOM_CC_LOG_ALL: If defined, always log cycle collector heaps.
+// MOZ_CC_LOG_ALL: If defined, always log cycle collector heaps.
 //
-// XPCOM_CC_LOG_SHUTDOWN: If defined, log cycle collector heaps at shutdown.
+// MOZ_CC_LOG_SHUTDOWN: If defined, log cycle collector heaps at shutdown.
 //
-// XPCOM_CC_ALL_TRACES_AT_SHUTDOWN: If defined, any cycle collector
+// MOZ_CC_ALL_TRACES_AT_SHUTDOWN: If defined, any cycle collector
 // logging done at shutdown will be WantAllTraces, which disables
 // various cycle collector optimizations to give a fuller picture of
 // the heap.
 //
-// XPCOM_CC_RUN_DURING_SHUTDOWN: In non-DEBUG or builds, if this is set,
+// MOZ_CC_RUN_DURING_SHUTDOWN: In non-DEBUG or builds, if this is set,
 // run cycle collections at shutdown.
 //
 // MOZ_CC_LOG_DIRECTORY: The directory in which logs are placed (such as
-// logs from XPCOM_CC_LOG_ALL and XPCOM_CC_LOG_SHUTDOWN, or other uses
+// logs from MOZ_CC_LOG_ALL and MOZ_CC_LOG_SHUTDOWN, or other uses
 // of nsICycleCollectorListener)
 
 MOZ_NEVER_INLINE void
 CC_AbortIfNull(void *ptr)
 {
     if (!ptr)
         MOZ_CRASH();
 }
@@ -227,19 +227,19 @@ CC_AbortIfNull(void *ptr)
 
 struct nsCycleCollectorParams
 {
     bool mLogAll;
     bool mLogShutdown;
     bool mAllTracesAtShutdown;
 
     nsCycleCollectorParams() :
-        mLogAll      (PR_GetEnv("XPCOM_CC_LOG_ALL") != nullptr),
-        mLogShutdown (PR_GetEnv("XPCOM_CC_LOG_SHUTDOWN") != nullptr),
-        mAllTracesAtShutdown (PR_GetEnv("XPCOM_CC_ALL_TRACES_AT_SHUTDOWN") != nullptr)
+        mLogAll      (PR_GetEnv("MOZ_CC_LOG_ALL") != nullptr),
+        mLogShutdown (PR_GetEnv("MOZ_CC_LOG_SHUTDOWN") != nullptr),
+        mAllTracesAtShutdown (PR_GetEnv("MOZ_CC_ALL_TRACES_AT_SHUTDOWN") != nullptr)
     {
     }
 };
 
 #ifdef COLLECT_TIME_DEBUG
 class TimeLog
 {
 public:
@@ -3368,17 +3368,17 @@ void
 nsCycleCollector::Shutdown()
 {
     CheckThreadSafety();
 
     // Always delete snow white objects.
     FreeSnowWhite(true);
 
 #ifndef DEBUG
-    if (PR_GetEnv("XPCOM_CC_RUN_DURING_SHUTDOWN"))
+    if (PR_GetEnv("MOZ_CC_RUN_DURING_SHUTDOWN"))
 #endif
     {
         ShutdownCollect();
     }
 }
 
 void
 nsCycleCollector::RemoveObjectFromGraph(void *aObj)