Bug 744088 - remove nsCycleCollector_getRuntime. r=smaug
authorAndrew McCreight <amccreight@mozilla.com>
Wed, 11 Apr 2012 16:50:03 -0700
changeset 94797 d9964e231f469686a109f1da0a30a107c79e2ace
parent 94796 2ffcf18c125335335eced33bfaa24b9778b88042
child 94798 20218c1c79e0337a954adc6c68496e4f7d45c30d
push id886
push userlsblakk@mozilla.com
push dateMon, 04 Jun 2012 19:57:52 +0000
treeherdermozilla-beta@bbd8d5efd6d1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssmaug
bugs744088
milestone14.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 744088 - remove nsCycleCollector_getRuntime. r=smaug
xpcom/base/nsCycleCollector.cpp
xpcom/base/nsCycleCollector.h
--- a/xpcom/base/nsCycleCollector.cpp
+++ b/xpcom/base/nsCycleCollector.cpp
@@ -1132,17 +1132,16 @@ struct nsCycleCollector
 
     nsPurpleBuffer mPurpleBuf;
 
     CC_BeforeUnlinkCallback mBeforeUnlinkCB;
     CC_ForgetSkippableCallback mForgetSkippableCB;
 
     void RegisterRuntime(PRUint32 langID, 
                          nsCycleCollectionLanguageRuntime *rt);
-    nsCycleCollectionLanguageRuntime * GetRuntime(PRUint32 langID);
     void ForgetRuntime(PRUint32 langID);
 
     void SelectPurple(GCGraphBuilder &builder);
     void MarkRoots(GCGraphBuilder &builder);
     void ScanRoots();
     void ScanWeakMaps();
 
     void ForgetSkippable(bool removeChildlessNodes);
@@ -2718,25 +2717,16 @@ nsCycleCollector::RegisterRuntime(PRUint
         Fault("unknown language runtime in registration");
 
     if (mRuntimes[langID])
         Fault("multiple registrations of language runtime", rt);
 
     mRuntimes[langID] = rt;
 }
 
-nsCycleCollectionLanguageRuntime *
-nsCycleCollector::GetRuntime(PRUint32 langID)
-{
-    if (langID > nsIProgrammingLanguage::MAX)
-        return nsnull;
-
-    return mRuntimes[langID];
-}
-
 void 
 nsCycleCollector::ForgetRuntime(PRUint32 langID)
 {
     if (mParams.mDoNothing)
         return;
 
     if (langID > nsIProgrammingLanguage::MAX)
         Fault("unknown language runtime in deregistration");
@@ -3801,24 +3791,16 @@ nsCycleCollector_registerRuntime(PRUint3
     if (sCollector)
         sCollector->RegisterRuntime(langID, rt);
     if (regMemReport) {
         regMemReport = false;
         NS_RegisterMemoryReporter(new NS_MEMORY_REPORTER_NAME(CycleCollector));
     }
 }
 
-nsCycleCollectionLanguageRuntime *
-nsCycleCollector_getRuntime(PRUint32 langID)
-{
-    if (sCollector)
-        sCollector->GetRuntime(langID);
-    return nsnull;
-}
-
 void 
 nsCycleCollector_forgetRuntime(PRUint32 langID)
 {
     if (sCollector)
         sCollector->ForgetRuntime(langID);
 }
 
 
--- a/xpcom/base/nsCycleCollector.h
+++ b/xpcom/base/nsCycleCollector.h
@@ -129,17 +129,16 @@ struct nsCycleCollectionJSRuntime : publ
 #ifdef DEBUG
 void nsCycleCollector_DEBUG_shouldBeFreed(nsISupports *n);
 void nsCycleCollector_DEBUG_wasFreed(nsISupports *n);
 #endif
 
 // Helpers for interacting with language-identified scripts
 
 void nsCycleCollector_registerRuntime(PRUint32 langID, nsCycleCollectionLanguageRuntime *rt);
-nsCycleCollectionLanguageRuntime * nsCycleCollector_getRuntime(PRUint32 langID);
 void nsCycleCollector_forgetRuntime(PRUint32 langID);
 
 #define NS_CYCLE_COLLECTOR_LOGGER_CID \
 { 0x58be81b4, 0x39d2, 0x437c, \
 { 0x94, 0xea, 0xae, 0xde, 0x2c, 0x62, 0x08, 0xd3 } }
 
 extern nsresult
 nsCycleCollectorLoggerConstructor(nsISupports* outer,