summaryrefslogtreecommitdiffstats
path: root/dom
diff options
context:
space:
mode:
Diffstat (limited to 'dom')
-rw-r--r--dom/base/nsGlobalWindow.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/dom/base/nsGlobalWindow.cpp b/dom/base/nsGlobalWindow.cpp
index 6a49f440f..b8cb1facb 100644
--- a/dom/base/nsGlobalWindow.cpp
+++ b/dom/base/nsGlobalWindow.cpp
@@ -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;
}