fix for nsCOMPtr: no direct construction/assignment from raw COM interface pointers

This commit is contained in:
scc%netscape.com 1999-03-02 23:00:09 +00:00
parent 1e2152d706
commit df0dcc6d34
2 changed files with 4 additions and 4 deletions

View File

@ -231,7 +231,7 @@ nsBrowserAppCore::SetContentWindow(nsIDOMWindow* aWin)
mContentWindow = aWin;
NS_ADDREF(aWin);
mContentScriptContext = GetScriptContext(aWin);
nsCOMPtr<nsIScriptGlobalObject> globalObj( mContentWindow );
nsCOMPtr<nsIScriptGlobalObject> globalObj( do_QueryInterface(mContentWindow) );
if (!globalObj) {
return NS_ERROR_FAILURE;
}
@ -258,7 +258,7 @@ nsBrowserAppCore::SetWebShellWindow(nsIDOMWindow* aWin)
if (!mContentWindow) {
return NS_ERROR_FAILURE;
}
nsCOMPtr<nsIScriptGlobalObject> globalObj( aWin );
nsCOMPtr<nsIScriptGlobalObject> globalObj( do_QueryInterface(aWin) );
if (!globalObj) {
return NS_ERROR_FAILURE;
}

View File

@ -327,7 +327,7 @@ nsEditorAppCore::SetContentWindow(nsIDOMWindow* aWin)
mContentWindow = aWin;
NS_ADDREF(aWin);
mContentScriptContext = GetScriptContext(aWin);
nsCOMPtr<nsIScriptGlobalObject> globalObj( mContentWindow );
nsCOMPtr<nsIScriptGlobalObject> globalObj( do_QueryInterface(mContentWindow) );
if (!globalObj) {
return NS_ERROR_FAILURE;
}
@ -349,7 +349,7 @@ nsEditorAppCore::SetWebShellWindow(nsIDOMWindow* aWin)
if (!mContentWindow) {
return NS_ERROR_FAILURE;
}
nsCOMPtr<nsIScriptGlobalObject> globalObj( aWin );
nsCOMPtr<nsIScriptGlobalObject> globalObj( do_QueryInterface(aWin) );
if (!globalObj) {
return NS_ERROR_FAILURE;
}