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

Issue 1068743002: Fix two race conditions in ImageDecoder. (Closed)

Created:
5 years, 8 months ago by Anand Mistry (off Chromium)
Modified:
5 years, 8 months ago
Reviewers:
Lei Zhang, Theresa
CC:
chromium-reviews, chrome-apps-syd-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Fix two race conditions in ImageDecoder. The two races are: 1. Call Cancel() immediately after calling Start(). 2. OnImageDecoded() or OnDecodeImageFailed() can be called after the request is cancelled, and the ImageRequest object potentially deleted. BUG=474590

Patch Set 1 #

Total comments: 1

Patch Set 2 : Remove thread restrictions. #

Patch Set 3 : Remove unused WeakPtr<>. #

Total comments: 12

Patch Set 4 : Address comments. #

Total comments: 13

Patch Set 5 : Review comments. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+169 lines, -44 lines) Patch
M chrome/browser/image_decoder.h View 1 2 3 4 3 chunks +21 lines, -6 lines 0 comments Download
M chrome/browser/image_decoder.cc View 1 2 3 4 6 chunks +148 lines, -38 lines 0 comments Download

Messages

Total messages: 19 (1 generated)
Anand Mistry (off Chromium)
5 years, 8 months ago (2015-04-07 07:59:21 UTC) #2
Lei Zhang
https://codereview.chromium.org/1068743002/diff/1/chrome/browser/image_decoder.cc File chrome/browser/image_decoder.cc (right): https://codereview.chromium.org/1068743002/diff/1/chrome/browser/image_decoder.cc#newcode135 chrome/browser/image_decoder.cc:135: DCHECK(image_request->task_runner()->RunsTasksOnCurrentThread()); The header file makes it sound as though ...
5 years, 8 months ago (2015-04-07 22:29:21 UTC) #3
chromium-reviews
On Wednesday, 8 April 2015, <thestig@chromium.org> wrote: > > https://codereview.chromium.org/1068743002/diff/1/chrome/ > browser/image_decoder.cc > File chrome/browser/image_decoder.cc ...
5 years, 8 months ago (2015-04-07 22:52:06 UTC) #4
Lei Zhang
On 2015/04/07 22:52:06, chromium-reviews wrote: > On Wednesday, 8 April 2015, <mailto:thestig@chromium.org> wrote: > > ...
5 years, 8 months ago (2015-04-07 23:10:31 UTC) #5
Anand Mistry (off Chromium)
On 2015/04/07 23:10:31, Lei Zhang wrote: > On 2015/04/07 22:52:06, chromium-reviews wrote: > > On ...
5 years, 8 months ago (2015-04-07 23:34:01 UTC) #6
Anand Mistry (off Chromium)
PTAL. Fixed the threading restriction, test failures, and really fix race #2.
5 years, 8 months ago (2015-04-08 00:43:52 UTC) #7
Lei Zhang
https://codereview.chromium.org/1068743002/diff/40001/chrome/browser/image_decoder.cc File chrome/browser/image_decoder.cc (right): https://codereview.chromium.org/1068743002/diff/40001/chrome/browser/image_decoder.cc#newcode48 chrome/browser/image_decoder.cc:48: ImageDecoder* decoder_; Isn't there just a single ImageDecoder that ...
5 years, 8 months ago (2015-04-08 01:30:10 UTC) #8
Anand Mistry (off Chromium)
https://codereview.chromium.org/1068743002/diff/40001/chrome/browser/image_decoder.cc File chrome/browser/image_decoder.cc (right): https://codereview.chromium.org/1068743002/diff/40001/chrome/browser/image_decoder.cc#newcode48 chrome/browser/image_decoder.cc:48: ImageDecoder* decoder_; On 2015/04/08 01:30:10, Lei Zhang wrote: > ...
5 years, 8 months ago (2015-04-08 03:13:46 UTC) #9
Anand Mistry (off Chromium)
Ping! Turns out, I am in a bit of a rush (last minute thing). I'll ...
5 years, 8 months ago (2015-04-13 06:45:11 UTC) #10
Theresa
Sorry for the delay, I was unexpectedly OOO most of last week. https://codereview.chromium.org/1068743002/diff/60001/chrome/browser/image_decoder.cc File chrome/browser/image_decoder.cc ...
5 years, 8 months ago (2015-04-13 18:19:31 UTC) #11
Anand Mistry (off Chromium)
https://codereview.chromium.org/1068743002/diff/60001/chrome/browser/image_decoder.cc File chrome/browser/image_decoder.cc (right): https://codereview.chromium.org/1068743002/diff/60001/chrome/browser/image_decoder.cc#newcode43 chrome/browser/image_decoder.cc:43: // Runs on the requests's task runner. On 2015/04/13 ...
5 years, 8 months ago (2015-04-14 00:52:13 UTC) #12
Theresa
lgtm (I'm not a committer yet or an OWNER of anything, so Lei still needs ...
5 years, 8 months ago (2015-04-14 01:20:47 UTC) #13
Anand Mistry (off Chromium)
It's now too late for me to make any changes to this, or merge it ...
5 years, 8 months ago (2015-04-15 07:26:20 UTC) #14
Theresa
On 2015/04/15 07:26:20, Anand Mistry wrote: > It's now too late for me to make ...
5 years, 8 months ago (2015-04-15 15:27:59 UTC) #15
Theresa
ping?
5 years, 8 months ago (2015-04-16 13:41:42 UTC) #16
benwells
On 2015/04/16 13:41:42, twellington wrote: > ping? Are you pinging thestig or amistry? amistry is ...
5 years, 8 months ago (2015-04-16 21:59:10 UTC) #17
Theresa
On 2015/04/16 21:59:10, benwells wrote: > On 2015/04/16 13:41:42, twellington wrote: > > ping? > ...
5 years, 8 months ago (2015-04-16 22:00:15 UTC) #18
Lei Zhang
5 years, 8 months ago (2015-04-22 21:13:12 UTC) #19
https://codereview.chromium.org/1067593005/ landed instead. Thanks for getting
the ball rolling though.

Powered by Google App Engine
This is Rietveld 408576698