Merge mozilla-central and tracemonkey.
This commit is contained in:
@@ -49,6 +49,7 @@
|
||||
|
||||
#include "jscntxt.h"
|
||||
|
||||
#include "nsPluginHost.h"
|
||||
#include "nsNPAPIPlugin.h"
|
||||
#include "nsNPAPIPluginInstance.h"
|
||||
#include "nsNPAPIPluginStreamListener.h"
|
||||
@@ -581,9 +582,11 @@ MakeNewNPAPIStreamInternal(NPP npp, const char *relativeURL, const char *target,
|
||||
if (!inst || !inst->IsRunning())
|
||||
return NPERR_INVALID_INSTANCE_ERROR;
|
||||
|
||||
nsCOMPtr<nsIPluginHost> pluginHost = do_GetService(MOZ_PLUGIN_HOST_CONTRACTID);
|
||||
NS_ASSERTION(pluginHost, "failed to get plugin host");
|
||||
if (!pluginHost) return NPERR_GENERIC_ERROR;
|
||||
nsCOMPtr<nsIPluginHost> pluginHostCOM = do_GetService(MOZ_PLUGIN_HOST_CONTRACTID);
|
||||
nsPluginHost *pluginHost = static_cast<nsPluginHost*>(pluginHostCOM.get());
|
||||
if (!pluginHost) {
|
||||
return NPERR_GENERIC_ERROR;
|
||||
}
|
||||
|
||||
nsCOMPtr<nsIPluginStreamListener> listener;
|
||||
// Set aCallNotify here to false. If pluginHost->GetURL or PostURL fail,
|
||||
@@ -2410,9 +2413,11 @@ _useragent(NPP npp)
|
||||
}
|
||||
NPN_PLUGIN_LOG(PLUGIN_LOG_NORMAL, ("NPN_UserAgent: npp=%p\n", (void*)npp));
|
||||
|
||||
nsCOMPtr<nsIPluginHost> pluginHost(do_GetService(MOZ_PLUGIN_HOST_CONTRACTID));
|
||||
if (!pluginHost)
|
||||
nsCOMPtr<nsIPluginHost> pluginHostCOM(do_GetService(MOZ_PLUGIN_HOST_CONTRACTID));
|
||||
nsPluginHost *pluginHost = static_cast<nsPluginHost*>(pluginHostCOM.get());
|
||||
if (!pluginHost) {
|
||||
return nsnull;
|
||||
}
|
||||
|
||||
const char *retstr;
|
||||
nsresult rv = pluginHost->UserAgent(&retstr);
|
||||
@@ -2501,8 +2506,8 @@ _getvalueforurl(NPP instance, NPNURLVariable variable, const char *url,
|
||||
switch (variable) {
|
||||
case NPNURLVProxy:
|
||||
{
|
||||
nsCOMPtr<nsIPluginHost> pluginHost(do_GetService(MOZ_PLUGIN_HOST_CONTRACTID));
|
||||
|
||||
nsCOMPtr<nsIPluginHost> pluginHostCOM(do_GetService(MOZ_PLUGIN_HOST_CONTRACTID));
|
||||
nsPluginHost *pluginHost = static_cast<nsPluginHost*>(pluginHostCOM.get());
|
||||
if (pluginHost && NS_SUCCEEDED(pluginHost->FindProxyForURL(url, value))) {
|
||||
*len = *value ? PL_strlen(*value) : 0;
|
||||
return NPERR_NO_ERROR;
|
||||
|
||||
Reference in New Issue
Block a user