Fix incorrect use of dont_QueryInterface() in PreHandleEvent() that was leaking.

This commit is contained in:
waterson%netscape.com 1999-11-29 22:47:39 +00:00
parent dbb4e575f9
commit 79556e2008
2 changed files with 2 additions and 2 deletions

View File

@ -230,7 +230,7 @@ nsEventStateManager::PreHandleEvent(nsIPresContext* aPresContext,
if (mDocument) {
mCurrentTarget = nsnull;
nsCOMPtr<nsIScriptContextOwner> contextOwner = dont_QueryInterface(mDocument->GetScriptContextOwner());
nsCOMPtr<nsIScriptContextOwner> contextOwner = getter_AddRefs(mDocument->GetScriptContextOwner());
if(!contextOwner) break;
nsCOMPtr<nsIScriptGlobalObject> globalObject;

View File

@ -230,7 +230,7 @@ nsEventStateManager::PreHandleEvent(nsIPresContext* aPresContext,
if (mDocument) {
mCurrentTarget = nsnull;
nsCOMPtr<nsIScriptContextOwner> contextOwner = dont_QueryInterface(mDocument->GetScriptContextOwner());
nsCOMPtr<nsIScriptContextOwner> contextOwner = getter_AddRefs(mDocument->GetScriptContextOwner());
if(!contextOwner) break;
nsCOMPtr<nsIScriptGlobalObject> globalObject;