mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1207864 - Fix nsWebBrowserPersist's onStateChange callback in error cases. r=billm
This commit is contained in:
parent
7cac9618ac
commit
e6bd64c9bc
@ -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