Bug 528025. Hold a strong ref from the view manager to the device context. r=roc/bz

This commit is contained in:
Oleg Romashin 2009-11-18 13:38:16 +13:00
parent 904b1ef2fb
commit 2237966136
2 changed files with 1 additions and 3 deletions

View File

@ -219,7 +219,6 @@ nsViewManager::~nsViewManager()
NS_IF_RELEASE(gCleanupContext);
}
NS_IF_RELEASE(mContext);
mObserver = nsnull;
}
@ -260,7 +259,6 @@ NS_IMETHODIMP nsViewManager::Init(nsIDeviceContext* aContext)
return NS_ERROR_ALREADY_INITIALIZED;
}
mContext = aContext;
NS_ADDREF(mContext);
mRefreshEnabled = PR_TRUE;

View File

@ -367,7 +367,7 @@ public: // NOT in nsIViewManager, so private to the view module
// pending updates.
void PostPendingUpdate() { RootViewManager()->mHasPendingUpdates = PR_TRUE; }
private:
nsIDeviceContext *mContext;
nsCOMPtr<nsIDeviceContext> mContext;
nsIViewObserver *mObserver;
nsIScrollableView *mRootScrollable;
nsIntPoint mMouseLocation; // device units, relative to mRootView