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

Unified Diff: third_party/WebKit/Source/modules/screen_orientation/ScreenOrientationController.cpp

Issue 2272043003: frame()->host() may be null in ScreenOrientationController::pageVisibilityChanged (Closed)
Patch Set: Created 4 years, 4 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
« no previous file with comments | « no previous file | 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/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;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698