gecko-dev/dom/webbrowserpersist
Gijs Kruitbosch 90b9ab56dc Bug 1663499 - fix ending webbrowserpersist downloading so it only happens once, r=valentin
This fixes a few causes of firing EndDownload twice:

1. firing it from OnDataAvailable if the download was already canceled when the
   method was initially invoked, rather than if we are ourselves wanting to
   cancel the download because we encountered issues inside OnDataAvailable.
2. firing it from FinishDownload, dispatched from SerializeNextFile, after the
   download has already been ended elsewhere.
3. calling Cancel() multiple times.

It also adds some code to avoid the re-entrancy on the Promise code that the
bug was originally filed for, and a diagnostic assert to check if there are any
other cases of repeated EndDownload calling that we've missed.

As a driveby, it adds a few thread assertions to help with code clarity.

Differential Revision: https://phabricator.services.mozilla.com/D90186
2020-09-15 07:17:00 +00:00
..
PWebBrowserPersistDocument.ipdl Bug 1662131 - Fix history getters for web browser persist. r=peterv 2020-09-08 13:06:29 +00:00
PWebBrowserPersistResources.ipdl Bug 1576188 - Handle save-as for cross process iframes. r=peterv 2020-04-27 05:41:40 +00:00
PWebBrowserPersistSerialize.ipdl
WebBrowserPersistDocumentChild.cpp Bug 1662131 - Fix history getters for web browser persist. r=peterv 2020-09-08 13:06:29 +00:00
WebBrowserPersistDocumentChild.h
WebBrowserPersistDocumentParent.cpp
WebBrowserPersistDocumentParent.h
WebBrowserPersistLocalDocument.cpp Bug 1662131 - Fix history getters for web browser persist. r=peterv 2020-09-08 13:06:29 +00:00
WebBrowserPersistLocalDocument.h
WebBrowserPersistRemoteDocument.cpp Bug 1662131 - Fix history getters for web browser persist. r=peterv 2020-09-08 13:06:29 +00:00
WebBrowserPersistRemoteDocument.h
WebBrowserPersistResourcesChild.cpp Bug 1576188 - Handle save-as for cross process iframes. r=peterv 2020-04-27 05:41:40 +00:00
WebBrowserPersistResourcesChild.h
WebBrowserPersistResourcesParent.cpp Bug 1576188 - Handle save-as for cross process iframes. r=peterv 2020-04-27 05:41:40 +00:00
WebBrowserPersistResourcesParent.h Bug 1576188 - Handle save-as for cross process iframes. r=peterv 2020-04-27 05:41:40 +00:00
WebBrowserPersistSerializeChild.cpp
WebBrowserPersistSerializeChild.h
WebBrowserPersistSerializeParent.cpp
WebBrowserPersistSerializeParent.h
moz.build
nsIWebBrowserPersist.idl
nsIWebBrowserPersistDocument.idl Bug 1576188 - Handle save-as for cross process iframes. r=peterv 2020-04-27 05:41:40 +00:00
nsWebBrowserPersist.cpp Bug 1663499 - fix ending webbrowserpersist downloading so it only happens once, r=valentin 2020-09-15 07:17:00 +00:00
nsWebBrowserPersist.h Bug 1663499 - fix ending webbrowserpersist downloading so it only happens once, r=valentin 2020-09-15 07:17:00 +00:00