bug 307879 destroy the stream in the nullplugin

r=jst sr=darin a=asa


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_8_BRANCH@180362 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
cbiesinger%web.de
2005-09-16 11:44:12 +00:00
parent 075ba85492
commit 387d766b78
2 changed files with 20 additions and 22 deletions

View File

@@ -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() */
}

View File

@@ -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() */
}