зеркало из https://github.com/mozilla/gecko-dev.git
backing out changeset b8d97566aa8a (bug 621386) for causing xpcshell orange. a=backout
This commit is contained in:
Родитель
863e2174c4
Коммит
3d97b38039
|
@ -165,7 +165,8 @@ ContentParent::ActorDestroy(ActorDestroyReason why)
|
|||
kungFuDeathGrip(static_cast<nsIThreadObserver*>(this));
|
||||
nsCOMPtr<nsIObserverService>
|
||||
obs(do_GetService("@mozilla.org/observer-service;1"));
|
||||
Cleanup();
|
||||
if (obs)
|
||||
obs->RemoveObserver(static_cast<nsIObserver*>(this), "xpcom-shutdown");
|
||||
nsCOMPtr<nsIThreadInternal>
|
||||
threadInt(do_QueryInterface(NS_GetCurrentThread()));
|
||||
if (threadInt)
|
||||
|
@ -340,36 +341,23 @@ NS_IMPL_THREADSAFE_ISUPPORTS3(ContentParent,
|
|||
nsIThreadObserver,
|
||||
nsIDOMGeoPositionCallback)
|
||||
|
||||
void
|
||||
ContentParent::Cleanup()
|
||||
{
|
||||
// remove the global remote preferences observers
|
||||
nsCOMPtr<nsIPrefBranch2> prefs
|
||||
(do_GetService(NS_PREFSERVICE_CONTRACTID));
|
||||
if (prefs) {
|
||||
prefs->RemoveObserver("", this);
|
||||
}
|
||||
|
||||
nsCOMPtr<nsIObserverService>
|
||||
obs(do_GetService("@mozilla.org/observer-service;1"));
|
||||
if (obs) {
|
||||
obs->RemoveObserver(static_cast<nsIObserver*>(this), "xpcom-shutdown");
|
||||
obs->RemoveObserver(static_cast<nsIObserver*>(this), "memory-pressure");
|
||||
obs->RemoveObserver(static_cast<nsIObserver*>(this),
|
||||
NS_IPC_IOSERVICE_SET_OFFLINE_TOPIC);
|
||||
}
|
||||
|
||||
RecvRemoveGeolocationListener();
|
||||
RecvRemoveAccelerometerListener();
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
ContentParent::Observe(nsISupports* aSubject,
|
||||
const char* aTopic,
|
||||
const PRUnichar* aData)
|
||||
{
|
||||
if (!strcmp(aTopic, "xpcom-shutdown") && mSubprocess) {
|
||||
Cleanup();
|
||||
// remove the global remote preferences observers
|
||||
nsCOMPtr<nsIPrefBranch2> prefs
|
||||
(do_GetService(NS_PREFSERVICE_CONTRACTID));
|
||||
if (prefs) {
|
||||
if (gSingleton) {
|
||||
prefs->RemoveObserver("", this);
|
||||
}
|
||||
}
|
||||
|
||||
RecvRemoveGeolocationListener();
|
||||
|
||||
Close();
|
||||
NS_ASSERTION(!mSubprocess, "Close should have nulled mSubprocess");
|
||||
}
|
||||
|
|
|
@ -105,8 +105,6 @@ protected:
|
|||
private:
|
||||
static ContentParent* gSingleton;
|
||||
|
||||
void Cleanup();
|
||||
|
||||
// Hide the raw constructor methods since we don't want client code
|
||||
// using them.
|
||||
using PContentParent::SendPBrowserConstructor;
|
||||
|
|
Загрузка…
Ссылка в новой задаче