Fixed nsIPluginInputStream::Close method to not crash.

git-svn-id: svn://10.0.0.236/trunk@11816 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
warren%netscape.com
1998-10-02 22:28:51 +00:00
parent 451e941a23
commit f0ffc7b067
5 changed files with 39 additions and 8 deletions

View File

@@ -964,6 +964,11 @@ NS_METHOD
SimplePluginStreamListener::OnDataAvailable(const char* url, nsIPluginInputStream* input,
PRUint32 offset, PRUint32 length)
{
if (strcmp(url, "http://warp/java/oji/") == 0 && offset != 0) {
// Try closing the stream prematurely
input->Close();
return NS_OK;
}
char* buffer = new char[length];
if (buffer) {
PRInt32 amountRead = 0;