gecko-dev/toolkit/components/statusfilter
Barret Rennie 5449ef6058 Bug 1510569 - Ensure we still have a listener after calling delayed progress listeners in nsBrowserStatusFilter r=Ehsan
The nsBrowserStatusFilter flushes pending status and progress updates when an
OnStateChange event for a STATE_STOP state is triggered. This may run its
OnProgressChange and OnStatusChange listeners, which may in turn run arbitrary
JavaScript or even remove the web progress listener from the filter. When this
happens, we will continue to call the OnStateChange event handler on a listener
that is now a nullptr, causing a crash.

We now explicitly check that we still have a web progress listener before
continuing and have renamed the ProcessTimeout function to a more descriptive
name (CallDelayedProgressListeners) that indicates what it actually does.

Differential Revision: https://phabricator.services.mozilla.com/D28123

--HG--
extra : moz-landing-system : lando
2019-04-18 21:11:38 +00:00
..
moz.build Bug 1510569 - Export nsBrowserStatusFilter.h r=kmag 2019-04-03 17:28:56 +00:00
nsBrowserStatusFilter.cpp Bug 1510569 - Ensure we still have a listener after calling delayed progress listeners in nsBrowserStatusFilter r=Ehsan 2019-04-18 21:11:38 +00:00
nsBrowserStatusFilter.h Bug 1510569 - Ensure we still have a listener after calling delayed progress listeners in nsBrowserStatusFilter r=Ehsan 2019-04-18 21:11:38 +00:00