bug 307879 destroy the stream in the nullplugin

r=jst sr=darin
This commit is contained in:
cbiesinger%web.de 2005-09-15 16:06:31 +00:00
Родитель dbdece5cf4
Коммит 277901a6fb
2 изменённых файлов: 20 добавлений и 22 удалений

Просмотреть файл

@ -268,11 +268,11 @@ NPP_NewStream(NPP instance,
int32
NPP_WriteReady(NPP instance, NPStream *stream)
{
/***** Insert NPP_WriteReady code here *****\
PluginInstance* This;
if (instance != NULL)
This = (PluginInstance*) instance->pdata;
\*******************************************/
if (instance == NULL)
return NPERR_INVALID_INSTANCE_ERROR;
/* We don't want any data, kill the stream */
NPN_DestroyStream(instance, stream, NPRES_DONE);
/* Number of bytes ready to accept in NPP_Write() */
return -1L; /* don't accept any bytes in NPP_Write() */
@ -282,14 +282,13 @@ NPP_WriteReady(NPP instance, NPStream *stream)
int32
NPP_Write(NPP instance, NPStream *stream, int32 offset, int32 len, void *buffer)
{
/***** Insert NPP_Write code here *****\
PluginInstance* This;
if (instance == NULL)
return NPERR_INVALID_INSTANCE_ERROR;
if (instance != NULL)
This = (PluginInstance*) instance->pdata;
\**************************************/
/* We don't want any data, kill the stream */
NPN_DestroyStream(instance, stream, NPRES_DONE);
return -1; /* tell the browser to abort the stream, don't need it */
return -1L; /* don't accept any bytes in NPP_Write() */
}

Просмотреть файл

@ -257,11 +257,11 @@ NPP_NewStream(NPP instance,
int32
NPP_WriteReady(NPP instance, NPStream *stream)
{
/***** Insert NPP_WriteReady code here *****\
PluginInstance* This;
if (instance != NULL)
This = (PluginInstance*) instance->pdata;
\*******************************************/
if (instance == NULL)
return NPERR_INVALID_INSTANCE_ERROR;
/* We don't want any data, kill the stream */
NPN_DestroyStream(instance, stream, NPRES_DONE);
/* Number of bytes ready to accept in NPP_Write() */
return -1L; /* don't accept any bytes in NPP_Write() */
@ -271,14 +271,13 @@ NPP_WriteReady(NPP instance, NPStream *stream)
int32
NPP_Write(NPP instance, NPStream *stream, int32 offset, int32 len, void *buffer)
{
/***** Insert NPP_Write code here *****\
PluginInstance* This;
if (instance == NULL)
return NPERR_INVALID_INSTANCE_ERROR;
if (instance != NULL)
This = (PluginInstance*) instance->pdata;
\**************************************/
/* We don't want any data, kill the stream */
NPN_DestroyStream(instance, stream, NPRES_DONE);
return -1; /* tell the browser to abort the stream, don't need it */
return -1L; /* don't accept any bytes in NPP_Write() */
}