Bug 1336229 - Don't dispatch canceled IdleRequestExecutors

This commit is contained in:
janekptacijarabaci 2018-04-18 15:17:55 +02:00 • committed by Roy Tam
commit 7fd0085393

View file

@ -640,9 +640,11 @@ IdleRequestExecutor::SetDeadline(TimeStamp aDeadline)
void
IdleRequestExecutor::MaybeDispatch()
{
MOZ_DIAGNOSTIC_ASSERT(mWindow);
if (mDispatched) {
// If we've already dispatched the executor we don't want to do it
// again. Also, if we've called IdleRequestExecutor::Cancel mWindow
// will be null, which indicates that we shouldn't dispatch this
// executor either.
if (mDispatched || !mWindow) {
return;
}