From aa28523a553f5e2553c781081eb21715aedb7eaf Mon Sep 17 00:00:00 2001 From: "Matt A. Tobin" Date: Thu, 31 Jan 2019 07:35:32 -0500 Subject: Only state the stop notification for JSDownloads in nsWebBrowserPersist::EndDownload --- embedding/components/webbrowserpersist/nsWebBrowserPersist.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/embedding/components/webbrowserpersist/nsWebBrowserPersist.cpp b/embedding/components/webbrowserpersist/nsWebBrowserPersist.cpp index 437d21997..a31414e7f 100644 --- a/embedding/components/webbrowserpersist/nsWebBrowserPersist.cpp +++ b/embedding/components/webbrowserpersist/nsWebBrowserPersist.cpp @@ -2351,16 +2351,18 @@ nsWebBrowserPersist::EndDownload(nsresult aResult) { mPersistResult = aResult; } - // mCompleted needs to be set before issuing the stop notification. // (Bug 1224437) mCompleted = true; + +#ifdef MOZ_JSDOWNLOADS // State stop notification if (mProgressListener) { mProgressListener->OnStateChange(nullptr, nullptr, nsIWebProgressListener::STATE_STOP | nsIWebProgressListener::STATE_IS_NETWORK, mPersistResult); } +#endif // Do file cleanup if required if (NS_FAILED(aResult) && (mPersistFlags & PERSIST_FLAGS_CLEANUP_ON_FAILURE)) -- cgit v1.2.3