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

Unified Diff: chrome/browser/ui/ash/chrome_keyboard_ui.cc

Issue 2322513002: Check for null return from GetNativeView(). (Closed)
Patch Set: Created 4 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
« 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: chrome/browser/ui/ash/chrome_keyboard_ui.cc
diff --git a/chrome/browser/ui/ash/chrome_keyboard_ui.cc b/chrome/browser/ui/ash/chrome_keyboard_ui.cc
index 1128f6ae93c9cc5ca2ebbdbd89e3a4e859ce571d..d7aafc7821e8eb4744bdaec8dfbda98a1f0f0f66 100644
--- a/chrome/browser/ui/ash/chrome_keyboard_ui.cc
+++ b/chrome/browser/ui/ash/chrome_keyboard_ui.cc
@@ -183,6 +183,12 @@ void ChromeKeyboardUI::ShowKeyboardContainer(aura::Window* container) {
}
bool ChromeKeyboardUI::ShouldWindowOverscroll(aura::Window* window) const {
+ // Added while we determine if RenderWidgetHostViewChildFrame can be changed
+ // to always return a non-null value: https://crbug.com/644726 .
+ // If we cannot always return a non-null value, then this may need to stay.
+ if (!window)
+ return true;
Charlie Reis 2016/09/07 17:23:58 I would suggest putting the null check in Keyboard
wjmaclean 2016/09/07 17:41:05 Done. I also added a check in UpdateInsetsForWind
+
aura::Window* root_window = window->GetRootWindow();
if (!root_window)
return true;
« 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