зеркало из https://github.com/mozilla/gecko-dev.git
Bug 484729. Fix NPN_Write. r=joshmoz;sr=jst
This commit is contained in:
Родитель
a29677e267
Коммит
8b1fe484d5
|
@ -111,8 +111,6 @@ mOwner(owner)
|
|||
if (NS_FAILED(rv))
|
||||
return;
|
||||
|
||||
mOutputStream->Close();
|
||||
|
||||
// construct the URL we'll use later in calls to GetURL()
|
||||
NS_GetURLSpecFromFile(mTempFile, mFileURL);
|
||||
|
||||
|
@ -138,8 +136,7 @@ NS_IMETHODIMP
|
|||
nsPluginStreamToFile::Write(const char* aBuf, PRUint32 aCount,
|
||||
PRUint32 *aWriteCount)
|
||||
{
|
||||
PRUint32 actualCount;
|
||||
mOutputStream->Write(aBuf, aCount, &actualCount);
|
||||
mOutputStream->Write(aBuf, aCount, aWriteCount);
|
||||
mOutputStream->Flush();
|
||||
mOwner->GetURL(mFileURL.get(), mTarget, nsnull, 0, nsnull, 0);
|
||||
|
||||
|
@ -172,6 +169,7 @@ nsPluginStreamToFile::IsNonBlocking(PRBool *aNonBlocking)
|
|||
NS_IMETHODIMP
|
||||
nsPluginStreamToFile::Close(void)
|
||||
{
|
||||
mOutputStream->Close();
|
||||
mOwner->GetURL(mFileURL.get(), mTarget, nsnull, 0, nsnull, 0);
|
||||
return NS_OK;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче