summaryrefslogtreecommitdiffstats
path: root/dom/base
diff options
context:
space:
mode:
authorjanekptacijarabaci <janekptacijarabaci@seznam.cz>2018-04-18 15:17:55 +0200
committerjanekptacijarabaci <janekptacijarabaci@seznam.cz>2018-04-18 15:17:55 +0200
commitdadd11df422db95e7ecfe57929dc28dfa524d5b1 (patch)
tree9dd9bdbe8e0ae305150f68d92b72592506abed4f /dom/base
parentc559e3e30f79843f0096332334c81ee0d93029f8 (diff)
downloadUXP-dadd11df422db95e7ecfe57929dc28dfa524d5b1.tar
UXP-dadd11df422db95e7ecfe57929dc28dfa524d5b1.tar.gz
UXP-dadd11df422db95e7ecfe57929dc28dfa524d5b1.tar.lz
UXP-dadd11df422db95e7ecfe57929dc28dfa524d5b1.tar.xz
UXP-dadd11df422db95e7ecfe57929dc28dfa524d5b1.zip
Bug 1336229 - Don't dispatch canceled IdleRequestExecutors
Diffstat (limited to 'dom/base')
-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;
}