Index: third_party/WebKit/Source/modules/screen_orientation/ScreenOrientationController.cpp |
diff --git a/third_party/WebKit/Source/modules/screen_orientation/ScreenOrientationController.cpp b/third_party/WebKit/Source/modules/screen_orientation/ScreenOrientationController.cpp |
index 4fbe3257e9f57bba77746d3630823ff0e6cfcc88..150135369a44af01d60d46081065e50b0187ce7b 100644 |
--- a/third_party/WebKit/Source/modules/screen_orientation/ScreenOrientationController.cpp |
+++ b/third_party/WebKit/Source/modules/screen_orientation/ScreenOrientationController.cpp |
@@ -93,7 +93,7 @@ void ScreenOrientationController::updateOrientation() |
bool ScreenOrientationController::isActiveAndVisible() const |
{ |
- return m_orientation && frame() && page() && page()->isPageVisible(); |
+ return m_orientation && m_client && frame() && page() && page()->isPageVisible(); |
} |
void ScreenOrientationController::pageVisibilityChanged() |
@@ -103,6 +103,9 @@ void ScreenOrientationController::pageVisibilityChanged() |
if (!isActiveAndVisible()) |
return; |
+ DCHECK(frame()); |
+ DCHECK(frame()->host()); |
+ |
// The orientation type and angle are tied in a way that if the angle has |
// changed, the type must have changed. |
unsigned short currentAngle = frame()->host()->chromeClient().screenInfo().orientationAngle; |