From 2af06bedb1cd43986221ac2c90afa721bc936547 Mon Sep 17 00:00:00 2001 From: "asqueella@gmail.com" Date: Mon, 23 Jul 2007 16:34:20 -0700 Subject: [PATCH] Bug 383716 - nsWebBrowserPersist::OnStopRequest doesn't check |status| for failure p=Edward Lee (Mardak) r=biesi, sr=bz --- .../components/webbrowserpersist/src/nsWebBrowserPersist.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/embedding/components/webbrowserpersist/src/nsWebBrowserPersist.cpp b/embedding/components/webbrowserpersist/src/nsWebBrowserPersist.cpp index d5ed34fa2d70..a789eb2a271a 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)