Bug 863085, part 2 - remove NS_CycleCollectorForget2 from some XPCOM glue. r=bsmedberg
authorAndrew McCreight <amccreight@mozilla.com>
Wed, 01 May 2013 15:36:03 -0700
changeset 130558 5aceec8a122219fecb8ea8900cce27c2b5a7086c
parent 130557 210b52cdd7ebf57603f51abbb2a1d5c2e7dd5b7d
child 130559 e1fe36ce89d100ea57b31768b7d0c8b00f2a034c
push id24625
push userryanvm@gmail.com
push dateThu, 02 May 2013 17:09:02 +0000
treeherdermozilla-central@42cf263214c3 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbsmedberg
bugs863085
milestone23.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 863085, part 2 - remove NS_CycleCollectorForget2 from some XPCOM glue. r=bsmedberg
xpcom/base/nsCycleCollector.cpp
xpcom/build/FrozenFunctions.cpp
xpcom/build/nsXPCOM.h
xpcom/build/nsXPCOMPrivate.h
--- a/xpcom/base/nsCycleCollector.cpp
+++ b/xpcom/base/nsCycleCollector.cpp
@@ -2938,22 +2938,16 @@ NS_CycleCollectorSuspect2(void *n, nsCyc
         // This is our special sentinel value that tells us that we've shut
         // down this thread's CC.
         return nullptr;
     }
 
     return collector->Suspect(n, cp);
 }
 
-bool
-NS_CycleCollectorForget2(nsPurpleBufferEntry *e)
-{
-    return true;
-}
-
 uint32_t
 nsCycleCollector_suspectedCount()
 {
     nsCycleCollector *collector = sCollector.get();
 
     if (collector == (nsCycleCollector*)1) {
         // This is our special sentinel value that tells us that we've shut
         // down this thread's CC.
--- a/xpcom/build/FrozenFunctions.cpp
+++ b/xpcom/build/FrozenFunctions.cpp
@@ -86,17 +86,17 @@ static const XPCOMFunctions kFrozenFunct
     nullptr,
     &NS_StringSetIsVoid,
     &NS_StringGetIsVoid,
     &NS_CStringSetIsVoid,
     &NS_CStringGetIsVoid,
 
     // these functions were added post 1.9
     &NS_CycleCollectorSuspect2,
-    &NS_CycleCollectorForget2
+    nullptr
 };
 
 EXPORT_XPCOM_API(nsresult)
 NS_GetFrozenFunctions(XPCOMFunctions *functions, const char* /* libraryPath */)
 {
     if (!functions)
         return NS_ERROR_OUT_OF_MEMORY;
 
--- a/xpcom/build/nsXPCOM.h
+++ b/xpcom/build/nsXPCOM.h
@@ -316,31 +316,25 @@ NS_LogCOMPtrAddRef(void *aCOMPtr, nsISup
 
 XPCOM_API(void)
 NS_LogCOMPtrRelease(void *aCOMPtr, nsISupports *aObject);
 
 /**
  * The XPCOM cycle collector analyzes and breaks reference cycles between
  * participating XPCOM objects. All objects in the cycle must implement
  * nsCycleCollectionParticipant to break cycles correctly.
- *
- * The first two functions below exist only to support binary components
- * that were compiled for older XPCOM versions.
  */
 
 #ifdef __cplusplus
 
 class nsCycleCollectionParticipant;
 
 XPCOM_API(nsPurpleBufferEntry*)
 NS_CycleCollectorSuspect2(void *n, nsCycleCollectionParticipant *p);
 
-XPCOM_API(bool)
-NS_CycleCollectorForget2(nsPurpleBufferEntry *e);
-
 #endif
 
 /**
  * Categories (in the category manager service) used by XPCOM:
  */
 
 /**
  * A category which is read after component registration but before
--- a/xpcom/build/nsXPCOMPrivate.h
+++ b/xpcom/build/nsXPCOMPrivate.h
@@ -153,25 +153,25 @@ typedef struct XPCOMFunctions{
     LogCtorFunc logCtorFunc;
     LogCtorFunc logDtorFunc;
     LogCOMPtrFunc logCOMPtrAddRefFunc;
     LogCOMPtrFunc logCOMPtrReleaseFunc;
     GetXPTCallStubFunc getXPTCallStubFunc;
     DestroyXPTCallStubFunc destroyXPTCallStubFunc;
     InvokeByIndexFunc invokeByIndexFunc;
     CycleCollectorFunc cycleSuspectFunc; // obsolete: use cycleSuspect2Func
-    CycleCollectorFunc cycleForgetFunc; // obsolete: use cycleForget2Func
+    CycleCollectorFunc cycleForgetFunc; // obsolete
     StringSetIsVoidFunc stringSetIsVoid;
     StringGetIsVoidFunc stringGetIsVoid;
     CStringSetIsVoidFunc cstringSetIsVoid;
     CStringGetIsVoidFunc cstringGetIsVoid;
 
     // Added for Mozilla 1.9.1
     CycleCollectorSuspect2Func cycleSuspect2Func;
-    CycleCollectorForget2Func cycleForget2Func;
+    CycleCollectorForget2Func cycleForget2Func; // obsolete
 
 } XPCOMFunctions;
 
 typedef nsresult (*GetFrozenFunctionsFunc)(XPCOMFunctions *entryPoints, const char* libraryPath);
 XPCOM_API(nsresult)
 NS_GetFrozenFunctions(XPCOMFunctions *entryPoints, const char* libraryPath);