mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-09 03:15:11 +00:00
Bug 1336229 - Don't dispatch canceled IdleRequestExecutors. r=bkelly
IdleRequestExecutor::MaybeDispatch needs to handle the case when mWindow is null, due to IdleRequestExecutor::Cancel setting mWindow to nullptr. MozReview-Commit-ID: F2Up5mItkqN
This commit is contained in:
parent
4562413d8c
commit
a9d97e3d92
@ -612,9 +612,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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user