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

Issue 11592012: Fix NULL pointer usage, it is P1 crash bug. (Closed)

Created:
8 years ago by felipeg
Modified:
8 years ago
CC:
chromium-reviews, joi+watch-content_chromium.org, darin-cc_chromium.org, jam
Visibility:
Public.

Description

Fix NULL pointer usage, it is P1 crash bug. Just after DownloadControllerAndroidImpl::CreateGETDownload() being called and just before DownloadControllerAndroidImpl::PrepareDownloadInfo() being run, the Loader object that holds the request pointer could have been removed from the pending_loaders_ map (in resource_dispatcher_host_impl.cc) because of a request cancel. If that happens, the request pointer will be correctly NULL, but we don't check that. This scenario is not a race condition since all the three methods are called in the IO thread, but the order of the calling each of the 3 methods can lead to this problem. BUG=165784 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=173504

Patch Set 1 #

Total comments: 4

Patch Set 2 : #

Patch Set 3 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+16 lines, -3 lines) Patch
M content/browser/android/download_controller_android_impl.cc View 1 2 3 chunks +16 lines, -3 lines 0 comments Download

Messages

Total messages: 7 (0 generated)
felipeg
8 years ago (2012-12-17 15:09:26 UTC) #1
Philippe
lgtm (although I'm not a OWNER). https://chromiumcodereview.appspot.com/11592012/diff/1/content/browser/android/download_controller_android_impl.cc File content/browser/android/download_controller_android_impl.cc (right): https://chromiumcodereview.appspot.com/11592012/diff/1/content/browser/android/download_controller_android_impl.cc#newcode109 content/browser/android/download_controller_android_impl.cc:109: DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); It's good ...
8 years ago (2012-12-17 15:20:05 UTC) #2
felipeg
https://chromiumcodereview.appspot.com/11592012/diff/1/content/browser/android/download_controller_android_impl.cc File content/browser/android/download_controller_android_impl.cc (right): https://chromiumcodereview.appspot.com/11592012/diff/1/content/browser/android/download_controller_android_impl.cc#newcode109 content/browser/android/download_controller_android_impl.cc:109: DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); On 2012/12/17 15:20:06, Philippe wrote: > It's good ...
8 years ago (2012-12-17 15:21:33 UTC) #3
joth
lgtm (also not an owner) On 17 December 2012 07:21, <felipeg@chromium.org> wrote: > > https://chromiumcodereview.**appspot.com/11592012/diff/1/** ...
8 years ago (2012-12-17 16:15:35 UTC) #4
Jay Civelli
lgtm
8 years ago (2012-12-17 16:24:01 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/felipeg@chromium.org/11592012/1002
8 years ago (2012-12-17 16:38:33 UTC) #6
commit-bot: I haz the power
8 years ago (2012-12-17 19:11:37 UTC) #7
Message was sent while issue was closed.
Change committed as 173504

Powered by Google App Engine
This is Rietveld 408576698