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

Unified Diff: content/renderer/screen_orientation/screen_orientation_observer.cc

Issue 613203002: Have PlatformEventObserver implementations orderly stop on destruction. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Clean up a comment. Created 6 years, 3 months 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: content/renderer/screen_orientation/screen_orientation_observer.cc
diff --git a/content/renderer/screen_orientation/screen_orientation_observer.cc b/content/renderer/screen_orientation/screen_orientation_observer.cc
index e3fc407ed1331b8b5ef3d2017c0530b727f5673d..8cb05fe386946bf7b154cd951bc6bd7a35d12d6c 100644
--- a/content/renderer/screen_orientation/screen_orientation_observer.cc
+++ b/content/renderer/screen_orientation/screen_orientation_observer.cc
@@ -11,6 +11,10 @@ namespace content {
ScreenOrientationObserver::ScreenOrientationObserver() {
}
+ScreenOrientationObserver::~ScreenOrientationObserver() {
+ StopIfObserving();
+}
+
void ScreenOrientationObserver::Start(
blink::WebPlatformEventListener* listener) {
// This should never be called with a proper listener.

Powered by Google App Engine
This is Rietveld 408576698