diff --git a/embedding/components/webbrowserpersist/src/nsWebBrowserPersist.cpp b/embedding/components/webbrowserpersist/src/nsWebBrowserPersist.cpp index d5ed34fa2d7..a789eb2a271 100644 --- a/embedding/components/webbrowserpersist/src/nsWebBrowserPersist.cpp +++ b/embedding/components/webbrowserpersist/src/nsWebBrowserPersist.cpp @@ -713,6 +713,9 @@ NS_IMETHODIMP nsWebBrowserPersist::OnStopRequest( OutputData *data = (OutputData *) mOutputMap.Get(&key); if (data) { + if (NS_SUCCEEDED(mPersistResult) && NS_FAILED(status)) + SendErrorStatusChange(PR_TRUE, status, request, data->mFile); + #if defined(XP_OS2) // delete 'data'; this will close the stream and let // us tag the file it created with its source URI @@ -773,7 +776,7 @@ NS_IMETHODIMP nsWebBrowserPersist::OnStopRequest( if (completed) { // we're all done, do our cleanup - EndDownload(NS_OK); + EndDownload(status); } if (mProgressListener)