backed out c6691cff88a4 (bug 1044598 pt 3) for lots of leaks on this CLOSED TREE

This commit is contained in:
Andrew McCreight 2014-07-28 17:14:05 -07:00
parent 8a18972a02
commit 804444884c

View File

@ -454,8 +454,7 @@ private:
// shutdown notification and stop Read Thread.
nsContentUtils::RegisterShutdownObserver(this);
nsRefPtr<Session> thisSession(this);
nsRefPtr<nsIRunnable> event = new ExtractRunnable(thisSession.forget());
nsRefPtr<nsIRunnable> event = new ExtractRunnable(this);
if (NS_FAILED(mReadThread->Dispatch(event, NS_DISPATCH_NORMAL))) {
NS_WARNING("Failed to dispatch ExtractRunnable at beginning");
}
@ -473,8 +472,7 @@ private:
MOZ_ASSERT(false, "NS_DispatchToMainThread PushBlobRunnable failed");
}
// Destroy this session object in main thread.
nsRefPtr<Session> thisSession(this);
if (NS_FAILED(NS_DispatchToMainThread(new DestroyRunnable(thisSession.forget())))) {
if (NS_FAILED(NS_DispatchToMainThread(new DestroyRunnable(this)))) {
MOZ_ASSERT(false, "NS_DispatchToMainThread DestroyRunnable failed");
}
}