Fixed bug with StreamAsFileOnly.

This commit is contained in:
amusil%netscape.com 1999-04-06 01:53:37 +00:00
Родитель 5e125b10fc
Коммит 7a89e2b8dc
2 изменённых файлов: 28 добавлений и 8 удалений

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

@ -868,6 +868,14 @@ NS_IMETHODIMP nsPluginStreamListenerPeer :: OnDataAvailable(nsIURL* aURL, nsIInp
aURL->GetSpec(&url);
rv = mPStreamListener->OnDataAvailable((nsIPluginStreamInfo*)mPluginStreamInfo, aIStream, aLength);
}
else
{
// if we don't read from the stream, OnStopBinding will never be called
char* buffer = new char[aLength];
PRUint32 amountRead;
rv = aIStream->Read(buffer, aLength, &amountRead);
delete [] buffer;
}
return rv;
}
@ -1343,6 +1351,8 @@ NS_IMETHODIMP nsPluginHostImpl :: InstantiateEmbededPlugin(const char *aMimeType
aOwner->CreateWidget();
instance->SetWindow(window);
// don't make an initial steam if it's a java applet
if(!aMimeType || PL_strcasecmp(aMimeType, "application/x-java-vm"))
rv = NewEmbededPluginStream(aURL, nsnull, instance);
NS_RELEASE(instance);

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

@ -868,6 +868,14 @@ NS_IMETHODIMP nsPluginStreamListenerPeer :: OnDataAvailable(nsIURL* aURL, nsIInp
aURL->GetSpec(&url);
rv = mPStreamListener->OnDataAvailable((nsIPluginStreamInfo*)mPluginStreamInfo, aIStream, aLength);
}
else
{
// if we don't read from the stream, OnStopBinding will never be called
char* buffer = new char[aLength];
PRUint32 amountRead;
rv = aIStream->Read(buffer, aLength, &amountRead);
delete [] buffer;
}
return rv;
}
@ -1343,6 +1351,8 @@ NS_IMETHODIMP nsPluginHostImpl :: InstantiateEmbededPlugin(const char *aMimeType
aOwner->CreateWidget();
instance->SetWindow(window);
// don't make an initial steam if it's a java applet
if(!aMimeType || PL_strcasecmp(aMimeType, "application/x-java-vm"))
rv = NewEmbededPluginStream(aURL, nsnull, instance);
NS_RELEASE(instance);