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

Unified Diff: ui/keyboard/content/keyboard_ui_content.cc

Issue 2322513002: Check for null return from GetNativeView(). (Closed)
Patch Set: Continue instead of return, remove extra early out. 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: ui/keyboard/content/keyboard_ui_content.cc
diff --git a/ui/keyboard/content/keyboard_ui_content.cc b/ui/keyboard/content/keyboard_ui_content.cc
index 1b75b6afbb4e0019e2e9abb647a15bcb98f2d10f..d08fd23cd9f656e4fd93989fa29981fb4e65cfa7 100644
--- a/ui/keyboard/content/keyboard_ui_content.cc
+++ b/ui/keyboard/content/keyboard_ui_content.cc
@@ -238,6 +238,12 @@ void KeyboardUIContent::InitInsets(const gfx::Rect& new_bounds) {
// the render process crashed.
if (view) {
aura::Window* window = view->GetNativeView();
+ // Added while we determine if RenderWidgetHostViewChildFrame can be
+ // changed to always return a non-null value: https://crbug.com/644726 .
+ // If we cannot guarantee a non-null value, then this may need to stay.
+ if (!window)
+ continue;
+
if (ShouldWindowOverscroll(window)) {
gfx::Rect window_bounds = window->GetBoundsInScreen();
gfx::Rect intersect = gfx::IntersectRects(window_bounds,
« 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