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

Unified Diff: chrome/browser/renderer_host/resource_message_filter.cc

Issue 42356: Linux: fix crash when renderer asks for the location of a NULL window (Closed)
Patch Set: Created 11 years, 9 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/renderer_host/resource_message_filter.cc
diff --git a/chrome/browser/renderer_host/resource_message_filter.cc b/chrome/browser/renderer_host/resource_message_filter.cc
index e3b18876b0fad7a4d330a0d3fbc1fb64f41a8352..9184e7055f3f1d1417199fa744cc892ef73fbbfc 100644
--- a/chrome/browser/renderer_host/resource_message_filter.cc
+++ b/chrome/browser/renderer_host/resource_message_filter.cc
@@ -567,6 +567,11 @@ void ResourceMessageFilter::OnGetWindowRect(gfx::NativeViewId window_id,
// Returns the rectangle of the window in which this WebWidget is embedded.
void ResourceMessageFilter::OnGetRootWindowRect(gfx::NativeViewId window_id,
gfx::Rect* rect) {
+ if (!window_id) {
+ *rect = gfx::Rect(0, 0, 0, 0);
Avi (use Gerrit) 2009/03/18 21:09:33 1. The default constructor for gfx::Rect will do t
+ return;
+ }
+
// Windows uses GetAncestor(window, GA_ROOT) here which probably means
// we want the top level window.
GdkWindow* window =
« 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