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

Unified Diff: chrome/browser/renderer_host/resource_message_filter_mac.mm

Issue 47002: Handle null window references.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
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
Index: chrome/browser/renderer_host/resource_message_filter_mac.mm
===================================================================
--- chrome/browser/renderer_host/resource_message_filter_mac.mm (revision 12186)
+++ chrome/browser/renderer_host/resource_message_filter_mac.mm (working copy)
@@ -19,12 +19,13 @@
}
+// We get null window_ids passed into the two functions below; please see
+// http://crbug.com/9060 for more details.
+
void ResourceMessageFilter::OnGetWindowRect(gfx::NativeViewId window_id,
gfx::Rect* rect) {
NSView* view = gfx::NativeViewFromId(window_id);
- DCHECK(view);
-
- if (!view) { // paranoia
+ if (!view) {
*rect = gfx::Rect();
return;
}
@@ -38,9 +39,7 @@
void ResourceMessageFilter::OnGetRootWindowRect(gfx::NativeViewId window_id,
gfx::Rect* rect) {
NSView* view = gfx::NativeViewFromId(window_id);
- DCHECK(view);
-
- if (!view) { // paranoia
+ if (!view) {
*rect = gfx::Rect();
return;
}

Powered by Google App Engine
This is Rietveld 408576698