mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-12 12:55:46 +00:00
fix for nsCOMPtr: no direct construction/assignment from raw COM interface pointers
This commit is contained in:
parent
1e2152d706
commit
df0dcc6d34
@ -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;
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user