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

Unified Diff: third_party/WebKit/Source/modules/sensor/Sensor.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
« no previous file with comments | « third_party/WebKit/Source/modules/presentation/PresentationRequest.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/modules/sensor/Sensor.cpp
diff --git a/third_party/WebKit/Source/modules/sensor/Sensor.cpp b/third_party/WebKit/Source/modules/sensor/Sensor.cpp
index 57faf7541adba4fe11261d42f7eace3eb949678f..d617472e497c613704a35f8395e23f5def62b549 100644
--- a/third_party/WebKit/Source/modules/sensor/Sensor.cpp
+++ b/third_party/WebKit/Source/modules/sensor/Sensor.cpp
@@ -132,7 +132,7 @@ bool Sensor::hasPendingActivity() const {
if (m_state == Sensor::SensorState::Idle ||
m_state == Sensor::SensorState::Errored)
return false;
- return hasEventListeners();
+ return getExecutionContext() && hasEventListeners();
}
auto Sensor::createSensorConfig() -> SensorConfigurationPtr {
« no previous file with comments | « third_party/WebKit/Source/modules/presentation/PresentationRequest.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698