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

Issue 159711: LocationBarView::PageActionImageView::LoadImageTask::Run() may pass a NULL im... (Closed)

Created:
11 years, 4 months ago by Miranda Callahan
Modified:
9 years, 7 months ago
Reviewers:
Finnur, Glen Murphy
CC:
chromium-reviews_googlegroups.com, Ben Goodger (Google)
Visibility:
Public.

Description

LocationBarView::PageActionImageView::LoadImageTask::Run() may pass a NULL image pointer through to OnImageLoaded; make sure that the pointer is not dereferenced in these cases. BUG= http://crbug.com/18140 TEST= none. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=22213 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=22254 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=22267

Patch Set 1 #

Patch Set 2 : '' #

Total comments: 1

Patch Set 3 : Add NOTREACHED() to fix. #

Patch Set 4 : '' #

Patch Set 5 : Made the NOTREACHED more helpful. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1 line, -1 line) Patch
M chrome/browser/views/location_bar_view.cc View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 9 (0 generated)
Miranda Callahan
I wish I could repro this bug. It's pretty clear that the problem is a ...
11 years, 4 months ago (2009-07-31 21:42:18 UTC) #1
Glen Murphy
> Please look carefully at this change -- even though it's > one line, I ...
11 years, 4 months ago (2009-07-31 22:36:06 UTC) #2
Miranda Callahan
> Assuming it was tested by taking out the if to sees what happens if ...
11 years, 4 months ago (2009-07-31 22:53:28 UTC) #3
Glen Murphy
Finnur's not here, and I think Anthony wanted this change pretty quickly. Let finnur review ...
11 years, 4 months ago (2009-07-31 22:55:28 UTC) #4
Miranda Callahan
Sure thing -- committing underway. On 2009/07/31 22:55:28, Glen Murphy wrote: > Finnur's not here, ...
11 years, 4 months ago (2009-07-31 22:57:45 UTC) #5
Finnur
LGTM, one nit. http://codereview.chromium.org/159711/diff/5/6 File chrome/browser/views/location_bar_view.cc (right): http://codereview.chromium.org/159711/diff/5/6#newcode1156 Line 1156: void OnImageLoaded(SkBitmap* image, int index) ...
11 years, 4 months ago (2009-08-01 00:48:47 UTC) #6
Miranda Callahan
Hi, Finnur -- added the NOTREACHED. I had been trying to repro with a nonexistent ...
11 years, 4 months ago (2009-08-02 19:01:11 UTC) #7
Finnur
Glad to hear it (I thought I had tested non-existing files, but apparently I failed ...
11 years, 4 months ago (2009-08-02 21:11:03 UTC) #8
Miranda Callahan
11 years, 4 months ago (2009-08-03 15:34:41 UTC) #9
That makes sense -- done and committed.

On 2009/08/02 21:11:03, Finnur wrote:
> Glad to hear it (I thought I had tested non-existing files, but apparently I
> failed to test images that fail to decode) :)
> 
> Anyway -- The NOTREACHED helps, but I think we should be more descriptive when
> it hits. I think the syntax is something like this:
> 
> NOTREACHED() << "Image failed to decode";
> 
> (Don't quote me on that though) :)
> 
> 
> On 2009/08/02 19:01:11, Miranda Callahan wrote:
> > Hi, Finnur --
> > 
> > added the NOTREACHED.  I had been trying to repro with a nonexistent image,
> > which didn't work -- using an image that fails to decode did the trick. 
This
> > fix indeed seems to stop the crasher.  Thanks!
> > 
> > On 2009/08/01 00:48:47, Finnur wrote:
> > > LGTM, one nit.
> > > 
> > > http://codereview.chromium.org/159711/diff/5/6
> > > File chrome/browser/views/location_bar_view.cc (right):
> > > 
> > > http://codereview.chromium.org/159711/diff/5/6#newcode1156
> > > Line 1156: void OnImageLoaded(SkBitmap* image, int index) {
> > > This is fine; thanks Miranda. I think it should be easy to repro this by
> > > specifying an image that fails to decode or maybe even one that doesn't
> exist
> > > (?).
> > > 
> > > I'd like to see a NOTREACHED inside the if you just added, though.

Powered by Google App Engine
This is Rietveld 408576698