зеркало из 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)
|
NS_IMETHODIMP ns4xPluginInstance :: Initialize(nsIPluginInstancePeer* peer)
|
||||||
{
|
{
|
||||||
PRUint16 count;
|
PRUint16 count = 0;
|
||||||
const char* const* names;
|
const char* const* names = nsnull;
|
||||||
const char* const* values;
|
const char* const* values = nsnull;
|
||||||
|
|
||||||
NS_ASSERTION(peer != NULL, "null peer");
|
NS_ASSERTION(peer != NULL, "null peer");
|
||||||
|
|
||||||
|
@ -102,14 +102,15 @@ NS_IMETHODIMP ns4xPluginInstance :: Initialize(nsIPluginInstancePeer* peer)
|
||||||
NS_ADDREF(fPeer);
|
NS_ADDREF(fPeer);
|
||||||
|
|
||||||
nsresult error;
|
nsresult error;
|
||||||
nsIPluginTagInfo *taginfo;
|
nsIPluginTagInfo *taginfo = nsnull;
|
||||||
|
|
||||||
error = fPeer->QueryInterface(kIPluginTagInfoIID, (void **)&taginfo);
|
error = fPeer->QueryInterface(kIPluginTagInfoIID, (void **)&taginfo);
|
||||||
|
|
||||||
if (NS_OK == error)
|
if (NS_OK == error)
|
||||||
{
|
{
|
||||||
if ((error = taginfo->GetAttributes(count, names, values)) != NS_OK)
|
taginfo->GetAttributes(count, names, values);
|
||||||
return error;
|
NS_IF_RELEASE(taginfo);
|
||||||
|
}
|
||||||
|
|
||||||
if (fCallbacks->newp == NULL)
|
if (fCallbacks->newp == NULL)
|
||||||
return NS_ERROR_FAILURE; // XXX right error?
|
return NS_ERROR_FAILURE; // XXX right error?
|
||||||
|
@ -133,9 +134,6 @@ NS_IMETHODIMP ns4xPluginInstance :: Initialize(nsIPluginInstancePeer* peer)
|
||||||
(char**)values,
|
(char**)values,
|
||||||
NULL); // saved data
|
NULL); // saved data
|
||||||
|
|
||||||
NS_RELEASE(taginfo);
|
|
||||||
}
|
|
||||||
|
|
||||||
return error;
|
return error;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -91,9 +91,9 @@ NS_IMETHODIMP ns4xPluginInstance :: QueryInterface(const nsIID& iid, void** inst
|
||||||
|
|
||||||
NS_IMETHODIMP ns4xPluginInstance :: Initialize(nsIPluginInstancePeer* peer)
|
NS_IMETHODIMP ns4xPluginInstance :: Initialize(nsIPluginInstancePeer* peer)
|
||||||
{
|
{
|
||||||
PRUint16 count;
|
PRUint16 count = 0;
|
||||||
const char* const* names;
|
const char* const* names = nsnull;
|
||||||
const char* const* values;
|
const char* const* values = nsnull;
|
||||||
|
|
||||||
NS_ASSERTION(peer != NULL, "null peer");
|
NS_ASSERTION(peer != NULL, "null peer");
|
||||||
|
|
||||||
|
@ -102,14 +102,15 @@ NS_IMETHODIMP ns4xPluginInstance :: Initialize(nsIPluginInstancePeer* peer)
|
||||||
NS_ADDREF(fPeer);
|
NS_ADDREF(fPeer);
|
||||||
|
|
||||||
nsresult error;
|
nsresult error;
|
||||||
nsIPluginTagInfo *taginfo;
|
nsIPluginTagInfo *taginfo = nsnull;
|
||||||
|
|
||||||
error = fPeer->QueryInterface(kIPluginTagInfoIID, (void **)&taginfo);
|
error = fPeer->QueryInterface(kIPluginTagInfoIID, (void **)&taginfo);
|
||||||
|
|
||||||
if (NS_OK == error)
|
if (NS_OK == error)
|
||||||
{
|
{
|
||||||
if ((error = taginfo->GetAttributes(count, names, values)) != NS_OK)
|
taginfo->GetAttributes(count, names, values);
|
||||||
return error;
|
NS_IF_RELEASE(taginfo);
|
||||||
|
}
|
||||||
|
|
||||||
if (fCallbacks->newp == NULL)
|
if (fCallbacks->newp == NULL)
|
||||||
return NS_ERROR_FAILURE; // XXX right error?
|
return NS_ERROR_FAILURE; // XXX right error?
|
||||||
|
@ -133,9 +134,6 @@ NS_IMETHODIMP ns4xPluginInstance :: Initialize(nsIPluginInstancePeer* peer)
|
||||||
(char**)values,
|
(char**)values,
|
||||||
NULL); // saved data
|
NULL); // saved data
|
||||||
|
|
||||||
NS_RELEASE(taginfo);
|
|
||||||
}
|
|
||||||
|
|
||||||
return error;
|
return error;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче