diff --git a/embedding/browser/activex/src/plugin/LegacyPlugin.cpp b/embedding/browser/activex/src/plugin/LegacyPlugin.cpp index d83847877236..64efedc705a7 100644 --- a/embedding/browser/activex/src/plugin/LegacyPlugin.cpp +++ b/embedding/browser/activex/src/plugin/LegacyPlugin.cpp @@ -710,7 +710,8 @@ NewControl(const char *pluginType, if (argv[i]) { nsCOMPtr element; - NPN_GetValue(pData->pPluginInstance, NPNVDOMElement, (void *) &element); + NPN_GetValue(pData->pPluginInstance, NPNVDOMElement, + NS_STATIC_CAST(nsIDOMElement **, getter_AddRefs(element))); if (element) { nsCOMPtr tagAsNode (do_QueryInterface(element)); diff --git a/embedding/browser/activex/src/plugin/XPCBrowser.cpp b/embedding/browser/activex/src/plugin/XPCBrowser.cpp index f1c608ee1f81..e42b1eb98e74 100644 --- a/embedding/browser/activex/src/plugin/XPCBrowser.cpp +++ b/embedding/browser/activex/src/plugin/XPCBrowser.cpp @@ -64,7 +64,8 @@ HRESULT IEBrowser::Init(PluginInstanceData *pData) { mData = pData; // Get the location URL - NPN_GetValue(mData->pPluginInstance, NPNVDOMWindow, (void *) &mDOMWindow); + NPN_GetValue(mData->pPluginInstance, NPNVDOMWindow, + NS_STATIC_CAST(nsIDOMWindow **,getter_AddRefs(mDOMWindow))); if (mDOMWindow) { mWebNavigation = do_GetInterface(mDOMWindow); diff --git a/embedding/browser/activex/src/plugin/XPCDocument.cpp b/embedding/browser/activex/src/plugin/XPCDocument.cpp index bf3c579d39ba..e8afc2618022 100644 --- a/embedding/browser/activex/src/plugin/XPCDocument.cpp +++ b/embedding/browser/activex/src/plugin/XPCDocument.cpp @@ -743,14 +743,16 @@ public: nsCOMPtr element; // Get the DOM document - NPN_GetValue(mData->pPluginInstance, NPNVDOMElement, (void *) &element); + NPN_GetValue(mData->pPluginInstance, NPNVDOMElement, + NS_STATIC_CAST(nsIDOMElement **, getter_AddRefs(element))); if (element) { element->GetOwnerDocument(getter_AddRefs(mDOMDocument)); } // Get the DOM window - NPN_GetValue(mData->pPluginInstance, NPNVDOMWindow, (void *) &mDOMWindow); + NPN_GetValue(mData->pPluginInstance, NPNVDOMWindow, + NS_STATIC_CAST(nsIDOMWindow **, getter_AddRefs(mDOMWindow))); if (mDOMWindow) { nsCOMPtr windowInternal = do_QueryInterface(mDOMWindow); diff --git a/embedding/browser/activex/src/plugin/XPConnect.cpp b/embedding/browser/activex/src/plugin/XPConnect.cpp index 03d3edebbb2c..536848fd9cb5 100644 --- a/embedding/browser/activex/src/plugin/XPConnect.cpp +++ b/embedding/browser/activex/src/plugin/XPConnect.cpp @@ -376,7 +376,8 @@ nsScriptablePeer::ConvertVariants(VARIANT *aIn, nsIVariant **aOut) if (pManager) { rv = pManager->CreateInstanceByContractID("@mozilla.org/variant;1", - nsnull, NS_GET_IID(nsIWritableVariant), (void **) &v); + nsnull, NS_GET_IID(nsIWritableVariant), + getter_AddRefs(v)); pManager->Release(); } } @@ -740,10 +741,11 @@ nsEventSink::InternalInvoke(DISPID dispIdMember, REFIID riid, LCID lcid, WORD wF pFuncDesc = NULL; nsCOMPtr element; - NPN_GetValue(mPlugin->pPluginInstance, NPNVDOMElement, (void *) &element); + NPN_GetValue(mPlugin->pPluginInstance, NPNVDOMElement, + NS_STATIC_CAST(nsIDOMElement **, getter_AddRefs(element))); if (!element) { - NS_ASSERTION(element, "can't get the object element"); + NS_ERROR("can't get the object element"); return S_OK; } nsAutoString id; @@ -758,7 +760,8 @@ nsEventSink::InternalInvoke(DISPID dispIdMember, REFIID riid, LCID lcid, WORD wF // Fire the script event handler... nsCOMPtr window; - NPN_GetValue(mPlugin->pPluginInstance, NPNVDOMWindow, (void *)&window); + NPN_GetValue(mPlugin->pPluginInstance, NPNVDOMWindow, + NS_STATIC_CAST(nsIDOMWindow **, getter_AddRefs(window))); nsCOMPtr eventManager(do_GetInterface(window)); if (!eventManager) return S_OK; diff --git a/modules/plugin/base/src/nsPluginHostImpl.cpp b/modules/plugin/base/src/nsPluginHostImpl.cpp index a6d4cdc9604e..892c248c8cce 100644 --- a/modules/plugin/base/src/nsPluginHostImpl.cpp +++ b/modules/plugin/base/src/nsPluginHostImpl.cpp @@ -6590,7 +6590,7 @@ nsPluginByteRangeStreamListener::OnStartRequest(nsIRequest *request, nsISupports //get nsPluginStreamListenerPeer* ptr from finalStreamListener nsPluginStreamListenerPeer *pslp = NS_REINTERPRET_CAST(nsPluginStreamListenerPeer*, - *(NS_REINTERPRET_CAST(void**, &finalStreamListener))); + finalStreamListener.get()); rv = pslp->ServeStreamAsFile(request, ctxt); return rv; }