зеркало из https://github.com/mozilla/gecko-dev.git
Fixed bug with StreamAsFileOnly.
This commit is contained in:
Родитель
5e125b10fc
Коммит
7a89e2b8dc
|
@ -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);
|
||||
|
|
Загрузка…
Ссылка в новой задаче