Bug 484729. Fix NPN_Write. r=joshmoz;sr=jst

This commit is contained in:
Jonathan Griffin 2009-09-29 16:52:29 -07:00
Родитель a29677e267
Коммит 8b1fe484d5
1 изменённых файлов: 2 добавлений и 4 удалений

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

@ -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;
}