зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1156101 - Mark nsGlobalWindow::mObserver as an nsRefPtr; r=baku
This commit is contained in:
Родитель
cbae9a2bae
Коммит
ffa720a08a
|
@ -1143,7 +1143,6 @@ nsGlobalWindow::nsGlobalWindow(nsGlobalWindow *aOuterWindow)
|
|||
|
||||
mObserver = new nsGlobalWindowObserver(this);
|
||||
if (mObserver) {
|
||||
NS_ADDREF(mObserver);
|
||||
nsCOMPtr<nsIObserverService> os = mozilla::services::GetObserverService();
|
||||
if (os) {
|
||||
// Watch for online/offline status changes so we can fire events. Use
|
||||
|
@ -1163,8 +1162,6 @@ nsGlobalWindow::nsGlobalWindow(nsGlobalWindow *aOuterWindow)
|
|||
// remain frozen until they get an inner window, so freeze this
|
||||
// outer window here.
|
||||
Freeze();
|
||||
|
||||
mObserver = nullptr;
|
||||
}
|
||||
|
||||
// We could have failed the first time through trying
|
||||
|
@ -1462,7 +1459,6 @@ nsGlobalWindow::CleanUp()
|
|||
// Drop its reference to this dying window, in case for some bogus reason
|
||||
// the object stays around.
|
||||
mObserver->Forget();
|
||||
NS_RELEASE(mObserver);
|
||||
}
|
||||
|
||||
if (mNavigator) {
|
||||
|
|
|
@ -1625,7 +1625,7 @@ protected:
|
|||
nsRefPtr<nsDOMWindowUtils> mWindowUtils;
|
||||
nsString mStatus;
|
||||
nsString mDefaultStatus;
|
||||
nsGlobalWindowObserver* mObserver; // Inner windows only.
|
||||
nsRefPtr<nsGlobalWindowObserver> mObserver; // Inner windows only.
|
||||
nsRefPtr<mozilla::dom::Crypto> mCrypto;
|
||||
nsRefPtr<mozilla::dom::cache::CacheStorage> mCacheStorage;
|
||||
nsRefPtr<mozilla::dom::Console> mConsole;
|
||||
|
|
Загрузка…
Ссылка в новой задаче