Chromium Code Reviews

Unified Diff: content/renderer/device_sensors/device_sensor_event_pump.h

Issue 613203002: Have PlatformEventObserver implementations orderly stop on destruction. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Index: content/renderer/device_sensors/device_sensor_event_pump.h
diff --git a/content/renderer/device_sensors/device_sensor_event_pump.h b/content/renderer/device_sensors/device_sensor_event_pump.h
index c77db34c42a15d2f0c8426a3979cf9e86d420d2e..e109c113ed24c0a7b185183f98153d3bdb7131b3 100644
--- a/content/renderer/device_sensors/device_sensor_event_pump.h
+++ b/content/renderer/device_sensors/device_sensor_event_pump.h
@@ -56,6 +56,7 @@ class CONTENT_EXPORT DeviceSensorEventPump
state_(STOPPED) {}
virtual ~DeviceSensorEventPump() {
+ PlatformEventObserver<ListenerType>::StopIfObserving();
}
// The pump is a tri-state automaton with allowed transitions as follows:

Powered by Google App Engine