зеркало из https://github.com/mozilla/pjs.git
we no longer consider failures from GetAttributes() or even expect the
plugin host to implement it.
This commit is contained in:
Родитель
2cff76a750
Коммит
774736760d
|
@ -91,9 +91,9 @@ NS_IMETHODIMP ns4xPluginInstance :: QueryInterface(const nsIID& iid, void** inst
|
|||
|
||||
NS_IMETHODIMP ns4xPluginInstance :: Initialize(nsIPluginInstancePeer* peer)
|
||||
{
|
||||
PRUint16 count;
|
||||
const char* const* names;
|
||||
const char* const* values;
|
||||
PRUint16 count = 0;
|
||||
const char* const* names = nsnull;
|
||||
const char* const* values = nsnull;
|
||||
|
||||
NS_ASSERTION(peer != NULL, "null peer");
|
||||
|
||||
|
@ -102,14 +102,15 @@ NS_IMETHODIMP ns4xPluginInstance :: Initialize(nsIPluginInstancePeer* peer)
|
|||
NS_ADDREF(fPeer);
|
||||
|
||||
nsresult error;
|
||||
nsIPluginTagInfo *taginfo;
|
||||
nsIPluginTagInfo *taginfo = nsnull;
|
||||
|
||||
error = fPeer->QueryInterface(kIPluginTagInfoIID, (void **)&taginfo);
|
||||
|
||||
if (NS_OK == error)
|
||||
{
|
||||
if ((error = taginfo->GetAttributes(count, names, values)) != NS_OK)
|
||||
return error;
|
||||
taginfo->GetAttributes(count, names, values);
|
||||
NS_IF_RELEASE(taginfo);
|
||||
}
|
||||
|
||||
if (fCallbacks->newp == NULL)
|
||||
return NS_ERROR_FAILURE; // XXX right error?
|
||||
|
@ -133,9 +134,6 @@ NS_IMETHODIMP ns4xPluginInstance :: Initialize(nsIPluginInstancePeer* peer)
|
|||
(char**)values,
|
||||
NULL); // saved data
|
||||
|
||||
NS_RELEASE(taginfo);
|
||||
}
|
||||
|
||||
return error;
|
||||
}
|
||||
|
||||
|
|
|
@ -91,9 +91,9 @@ NS_IMETHODIMP ns4xPluginInstance :: QueryInterface(const nsIID& iid, void** inst
|
|||
|
||||
NS_IMETHODIMP ns4xPluginInstance :: Initialize(nsIPluginInstancePeer* peer)
|
||||
{
|
||||
PRUint16 count;
|
||||
const char* const* names;
|
||||
const char* const* values;
|
||||
PRUint16 count = 0;
|
||||
const char* const* names = nsnull;
|
||||
const char* const* values = nsnull;
|
||||
|
||||
NS_ASSERTION(peer != NULL, "null peer");
|
||||
|
||||
|
@ -102,14 +102,15 @@ NS_IMETHODIMP ns4xPluginInstance :: Initialize(nsIPluginInstancePeer* peer)
|
|||
NS_ADDREF(fPeer);
|
||||
|
||||
nsresult error;
|
||||
nsIPluginTagInfo *taginfo;
|
||||
nsIPluginTagInfo *taginfo = nsnull;
|
||||
|
||||
error = fPeer->QueryInterface(kIPluginTagInfoIID, (void **)&taginfo);
|
||||
|
||||
if (NS_OK == error)
|
||||
{
|
||||
if ((error = taginfo->GetAttributes(count, names, values)) != NS_OK)
|
||||
return error;
|
||||
taginfo->GetAttributes(count, names, values);
|
||||
NS_IF_RELEASE(taginfo);
|
||||
}
|
||||
|
||||
if (fCallbacks->newp == NULL)
|
||||
return NS_ERROR_FAILURE; // XXX right error?
|
||||
|
@ -133,9 +134,6 @@ NS_IMETHODIMP ns4xPluginInstance :: Initialize(nsIPluginInstancePeer* peer)
|
|||
(char**)values,
|
||||
NULL); // saved data
|
||||
|
||||
NS_RELEASE(taginfo);
|
||||
}
|
||||
|
||||
return error;
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче