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

Unified Diff: chrome/browser/ui/views/frame/opaque_browser_frame_view.cc

Issue 287243002: Add sanity check to troubleshoot crbug.com/374273 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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/views/frame/opaque_browser_frame_view.cc
diff --git a/chrome/browser/ui/views/frame/opaque_browser_frame_view.cc b/chrome/browser/ui/views/frame/opaque_browser_frame_view.cc
index 6a6fb5c934cda2acb93970fd0523a2f35cb18b26..37f1484cd7d321c908ed2cd119bfbf3bb7fd84ef 100644
--- a/chrome/browser/ui/views/frame/opaque_browser_frame_view.cc
+++ b/chrome/browser/ui/views/frame/opaque_browser_frame_view.cc
@@ -756,8 +756,14 @@ void OpaqueBrowserFrameView::PaintRestoredClientEdge(gfx::Canvas* canvas) {
// client edge filled rects start there or at the bottom of the toolbar,
// whichever is shorter.
gfx::Rect toolbar_bounds(browser_view()->GetToolbarBounds());
- image_top += toolbar_bounds.y() +
- tp->GetImageSkiaNamed(IDR_CONTENT_TOP_LEFT_CORNER)->height();
+
+ gfx::ImageSkia* content_top_left_corner =
+ tp->GetImageSkiaNamed(IDR_CONTENT_TOP_LEFT_CORNER);
+ // TODO(oshima): Sanity checks for crbug.com/374273. Remove when it's fixed.
+ CHECK(content_top_left_corner);
+ CHECK(!content_top_left_corner->isNull());
+
+ image_top += toolbar_bounds.y() + content_top_left_corner->height();
client_area_top = std::min(image_top,
client_area_top + toolbar_bounds.bottom() - kClientEdgeThickness);
} else if (!browser_view()->IsTabStripVisible()) {
« 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