Loading xpcom/base/nsCycleCollector.cpp +10 −8 Original line number Diff line number Diff line Loading @@ -995,8 +995,10 @@ enum ccType { // Top level structure for the cycle collector. //////////////////////////////////////////////////////////////////////// class nsCycleCollector class nsCycleCollector : public nsISupports { NS_DECL_ISUPPORTS bool mCollectionInProgress; // mScanInProgress should be false when we're collecting white objects. bool mScanInProgress; Loading Loading @@ -1027,7 +1029,7 @@ class nsCycleCollector public: nsCycleCollector(); ~nsCycleCollector(); virtual ~nsCycleCollector(); void RegisterJSRuntime(CycleCollectedJSRuntime *aJSRuntime); void ForgetJSRuntime(); Loading Loading @@ -1079,6 +1081,8 @@ private: void CleanupAfterCollection(); }; NS_IMPL_ISUPPORTS1(nsCycleCollector, nsISupports) /** * GraphWalker is templatized over a Visitor class that must provide * the following two methods: Loading Loading @@ -1116,7 +1120,7 @@ public: //////////////////////////////////////////////////////////////////////// struct CollectorData { nsCycleCollector* mCollector; nsRefPtr<nsCycleCollector> mCollector; CycleCollectedJSRuntime* mRuntime; }; Loading Loading @@ -3101,12 +3105,11 @@ nsCycleCollector_startup() MOZ_CRASH(); } nsAutoPtr<nsCycleCollector> collector(new nsCycleCollector()); nsAutoPtr<CollectorData> data(new CollectorData); CollectorData* data = new CollectorData; data->mCollector = new nsCycleCollector(); data->mRuntime = nullptr; data->mCollector = collector.forget(); sCollectorData.set(data.forget()); sCollectorData.set(data); } void Loading Loading @@ -3210,7 +3213,6 @@ nsCycleCollector_shutdown() MOZ_ASSERT(data->mCollector); PROFILER_LABEL("CC", "nsCycleCollector_shutdown"); data->mCollector->Shutdown(); delete data->mCollector; data->mCollector = nullptr; if (!data->mRuntime) { delete data; Loading Loading
xpcom/base/nsCycleCollector.cpp +10 −8 Original line number Diff line number Diff line Loading @@ -995,8 +995,10 @@ enum ccType { // Top level structure for the cycle collector. //////////////////////////////////////////////////////////////////////// class nsCycleCollector class nsCycleCollector : public nsISupports { NS_DECL_ISUPPORTS bool mCollectionInProgress; // mScanInProgress should be false when we're collecting white objects. bool mScanInProgress; Loading Loading @@ -1027,7 +1029,7 @@ class nsCycleCollector public: nsCycleCollector(); ~nsCycleCollector(); virtual ~nsCycleCollector(); void RegisterJSRuntime(CycleCollectedJSRuntime *aJSRuntime); void ForgetJSRuntime(); Loading Loading @@ -1079,6 +1081,8 @@ private: void CleanupAfterCollection(); }; NS_IMPL_ISUPPORTS1(nsCycleCollector, nsISupports) /** * GraphWalker is templatized over a Visitor class that must provide * the following two methods: Loading Loading @@ -1116,7 +1120,7 @@ public: //////////////////////////////////////////////////////////////////////// struct CollectorData { nsCycleCollector* mCollector; nsRefPtr<nsCycleCollector> mCollector; CycleCollectedJSRuntime* mRuntime; }; Loading Loading @@ -3101,12 +3105,11 @@ nsCycleCollector_startup() MOZ_CRASH(); } nsAutoPtr<nsCycleCollector> collector(new nsCycleCollector()); nsAutoPtr<CollectorData> data(new CollectorData); CollectorData* data = new CollectorData; data->mCollector = new nsCycleCollector(); data->mRuntime = nullptr; data->mCollector = collector.forget(); sCollectorData.set(data.forget()); sCollectorData.set(data); } void Loading Loading @@ -3210,7 +3213,6 @@ nsCycleCollector_shutdown() MOZ_ASSERT(data->mCollector); PROFILER_LABEL("CC", "nsCycleCollector_shutdown"); data->mCollector->Shutdown(); delete data->mCollector; data->mCollector = nullptr; if (!data->mRuntime) { delete data; Loading