Index: third_party/WebKit/Source/core/html/shadow/MediaControlsOrientationLockDelegate.cpp |
diff --git a/third_party/WebKit/Source/core/html/shadow/MediaControlsOrientationLockDelegate.cpp b/third_party/WebKit/Source/core/html/shadow/MediaControlsOrientationLockDelegate.cpp |
index f29c4c5e96961e78a9d3f10d87f856742bdb2348..71d89b35e4e776ac71a0738f96e19a9387791acd 100644 |
--- a/third_party/WebKit/Source/core/html/shadow/MediaControlsOrientationLockDelegate.cpp |
+++ b/third_party/WebKit/Source/core/html/shadow/MediaControlsOrientationLockDelegate.cpp |
@@ -69,6 +69,8 @@ MediaControlsOrientationLockDelegate::MediaControlsOrientationLockDelegate( |
} |
void MediaControlsOrientationLockDelegate::attach() { |
+ DCHECK(videoElement().isConnected()); |
+ |
document().addEventListener(EventTypeNames::fullscreenchange, this, true); |
videoElement().addEventListener(EventTypeNames::webkitfullscreenchange, this, |
true); |
@@ -76,6 +78,8 @@ void MediaControlsOrientationLockDelegate::attach() { |
} |
void MediaControlsOrientationLockDelegate::detach() { |
+ DCHECK(!videoElement().isConnected()); |
+ |
document().removeEventListener(EventTypeNames::fullscreenchange, this, true); |
videoElement().removeEventListener(EventTypeNames::webkitfullscreenchange, |
this, true); |