Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1481)

Unified Diff: third_party/WebKit/Source/core/css/MediaQueryList.cpp

Issue 2571193002: Signal no pending activity in destructed contexts. (Closed)
Patch Set: Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/css/MediaQueryList.cpp
diff --git a/third_party/WebKit/Source/core/css/MediaQueryList.cpp b/third_party/WebKit/Source/core/css/MediaQueryList.cpp
index b036426edd1a264976acb1852b406a8a88bfc62e..3f1ee61405e20e7a545c2d92984f8020c130cbf8 100644
--- a/third_party/WebKit/Source/core/css/MediaQueryList.cpp
+++ b/third_party/WebKit/Source/core/css/MediaQueryList.cpp
@@ -83,7 +83,8 @@ void MediaQueryList::removeListener(MediaQueryListListener* listener) {
}
bool MediaQueryList::hasPendingActivity() const {
- return m_listeners.size() || hasEventListeners(EventTypeNames::change);
+ return getExecutionContext() &&
+ (m_listeners.size() || hasEventListeners(EventTypeNames::change));
}
void MediaQueryList::contextDestroyed() {
« no previous file with comments | « third_party/WebKit/Source/core/css/FontFace.cpp ('k') | third_party/WebKit/Source/modules/battery/BatteryManager.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698