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

Issue 10828374: Always call WasShown() before trying to paint. (Closed)

Created:
8 years, 4 months ago by sreeram
Modified:
8 years, 4 months ago
Reviewers:
sky
CC:
chromium-reviews, sreeram, gideonwald, dominich, David Black, Jered, Shishir
Visibility:
Public.

Description

Always call WasShown() before trying to paint. See the bug link for details on the crash that this CL is attempting to fix. Although I haven't been able to reproduce the crash locally, my intuition is that, when we call window->ShowInstant(), sometimes it tries to paint, and since the RenderWidgetHostView hasn't yet been told that it's being shown, it fails the DCHECK(). So, reorder the calls so that WasShown() is always called before any change to the Instant overlay layout (ShowInstant/HideInstant). BUG=143207 R=sky@chromium.org TEST=Watch try bots/waterfall; Instant shouldn't fire this DCHECK(). Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=152348

Patch Set 1 #

Total comments: 5
Unified diffs Side-by-side diffs Delta from patch set Stats (+5 lines, -5 lines) Patch
M chrome/browser/instant/instant_browsertest.cc View 1 chunk +1 line, -2 lines 0 comments Download
M chrome/browser/ui/browser_instant_controller.cc View 3 chunks +4 lines, -3 lines 5 comments Download

Messages

Total messages: 6 (0 generated)
sreeram
Please review.
8 years, 4 months ago (2012-08-17 19:47:19 UTC) #1
sreeram
@sky, please review.
8 years, 4 months ago (2012-08-20 15:46:06 UTC) #2
sky
http://codereview.chromium.org/10828374/diff/1/chrome/browser/ui/browser_instant_controller.cc File chrome/browser/ui/browser_instant_controller.cc (right): http://codereview.chromium.org/10828374/diff/1/chrome/browser/ui/browser_instant_controller.cc#newcode81 chrome/browser/ui/browser_instant_controller.cc:81: preview->web_contents()->WasShown(); Any reason you're not putting this in InstantController? ...
8 years, 4 months ago (2012-08-20 16:29:31 UTC) #3
sreeram_google.com
http://codereview.chromium.org/10828374/diff/1/chrome/browser/ui/browser_instant_controller.cc File chrome/browser/ui/browser_instant_controller.cc (right): http://codereview.chromium.org/10828374/diff/1/chrome/browser/ui/browser_instant_controller.cc#newcode81 chrome/browser/ui/browser_instant_controller.cc:81: preview->web_contents()->WasShown(); On 2012/08/20 16:29:31, sky wrote: > Any reason ...
8 years, 4 months ago (2012-08-20 16:36:44 UTC) #4
sreeram
http://codereview.chromium.org/10828374/diff/1/chrome/browser/ui/browser_instant_controller.cc File chrome/browser/ui/browser_instant_controller.cc (right): http://codereview.chromium.org/10828374/diff/1/chrome/browser/ui/browser_instant_controller.cc#newcode81 chrome/browser/ui/browser_instant_controller.cc:81: preview->web_contents()->WasShown(); On 2012/08/20 16:36:45, sreeram_google.com wrote: > On 2012/08/20 ...
8 years, 4 months ago (2012-08-20 16:46:25 UTC) #5
sky
8 years, 4 months ago (2012-08-20 17:16:24 UTC) #6
LGTM

Powered by Google App Engine
This is Rietveld 408576698