mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-28 15:23:51 +00:00
Bug 1207864 - Fix nsWebBrowserPersist's onStateChange callback in error cases. r=billm
This commit is contained in:
parent
2f682a1b2b
commit
7938778ece
@ -2299,6 +2299,12 @@ nsWebBrowserPersist::FinishDownload()
|
||||
void
|
||||
nsWebBrowserPersist::EndDownload(nsresult aResult)
|
||||
{
|
||||
// Store the error code in the result if it is an error
|
||||
if (NS_SUCCEEDED(mPersistResult) && NS_FAILED(aResult))
|
||||
{
|
||||
mPersistResult = aResult;
|
||||
}
|
||||
|
||||
// State stop notification
|
||||
if (mProgressListener) {
|
||||
mProgressListener->OnStateChange(nullptr, nullptr,
|
||||
@ -2306,12 +2312,6 @@ nsWebBrowserPersist::EndDownload(nsresult aResult)
|
||||
| nsIWebProgressListener::STATE_IS_NETWORK, mPersistResult);
|
||||
}
|
||||
|
||||
// Store the error code in the result if it is an error
|
||||
if (NS_SUCCEEDED(mPersistResult) && NS_FAILED(aResult))
|
||||
{
|
||||
mPersistResult = aResult;
|
||||
}
|
||||
|
||||
// Do file cleanup if required
|
||||
if (NS_FAILED(aResult) && (mPersistFlags & PERSIST_FLAGS_CLEANUP_ON_FAILURE))
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user