blob: 81357b67ec14389204d3cda41bcb1168d41f6798 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
commit d4db948c9381
Author: Andreas Farre <farre@mozilla.com>
Date: Tue Dec 5 04:54:00 2017 -0500
Bug 1421009 - Don't schedule idle callback if window is shutting down. r=bkelly, a=gchang
---
dom/base/nsGlobalWindow.cpp | 4 ++++
1 file changed, 4 insertions(+)
diff --git dom/base/nsGlobalWindow.cpp dom/base/nsGlobalWindow.cpp
index 40b0847e9b1c..bbbc94095896 100644
--- dom/base/nsGlobalWindow.cpp
+++ dom/base/nsGlobalWindow.cpp
@@ -913,6 +913,10 @@ nsGlobalWindow::RequestIdleCallback(JSContext* aCx,
MOZ_RELEASE_ASSERT(IsInnerWindow());
AssertIsOnMainThread();
+ if (mInnerObjectsFreed) {
+ return 0;
+ }
+
uint32_t handle = mIdleRequestCallbackCounter++;
RefPtr<IdleRequest> request =
|