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

Unified Diff: content/browser/renderer_host/render_view_host_impl.cc

Issue 1446323002: Early out in OnFocusedNodeChanged if there's no view. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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: content/browser/renderer_host/render_view_host_impl.cc
diff --git a/content/browser/renderer_host/render_view_host_impl.cc b/content/browser/renderer_host/render_view_host_impl.cc
index f4cca0dacdef83470656382dceb41b294557c8f8..9d36a649ca4f8479aa6527ce4aa0300478fc7caa 100644
--- a/content/browser/renderer_host/render_view_host_impl.cc
+++ b/content/browser/renderer_host/render_view_host_impl.cc
@@ -1206,6 +1206,10 @@ void RenderViewHostImpl::OnFocusedNodeChanged(
}
#endif
+ // None of the rest makes sense without a view.
+ if (!GetWidget()->GetView())
+ return;
+
// Convert node_bounds to screen coordinates.
gfx::Rect view_bounds_in_screen = GetWidget()->GetView()->GetViewBounds();
gfx::Point origin = node_bounds_in_viewport.origin();
« 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