зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1477767 - disconnect request when XPCOM is going to shutdown. r=cpearce
The reason we hit this assertion is that we still connected to Then() and waited for its result when the resolve or reject runnable which dispatched by ThenValue can't be executed because the target thread had been shutdown. Therefore, when XPCOM is going to shutdown, we should disconnect the Then() because it might not have a chance to execute its resolve/reject method. Differential Revision: https://phabricator.services.mozilla.com/D5893 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
60ca3b7481
Коммит
1506a7fce4
|
@ -6798,6 +6798,9 @@ void
|
|||
HTMLMediaElement::NotifyShutdownEvent()
|
||||
{
|
||||
mShuttingDown = true;
|
||||
// Since target thread had been shutdown, it's no chance to execute the Then()
|
||||
// afterward. Therefore, we should disconnect the request.
|
||||
mAutoplayPermissionRequest.DisconnectIfExists();
|
||||
ResetState();
|
||||
AddRemoveSelfReference();
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче