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

Issue 6298004: Fix a possible crash in the ClientSideDetectionService. (Closed)

Created:
9 years, 11 months ago by Brian Ryner
Modified:
9 years, 7 months ago
Reviewers:
eroman, noelutz, lzheng
CC:
chromium-reviews, chrome-anti-phishing_googlegroups.com
Visibility:
Public.

Description

Fix a possible crash in the ClientSideDetectionService. This fixes a problem where if the model fetch is still running when the ClientSideDetectionService is destroyed, the URLFetcher is not deleted. This could potentially cause the OnURLFetchComplete callback to be called on a deleted ClientSideDetectionService object. Now the model fetcher will always be deleted, and we will also make sure to destroy the ClientSideDetectionService before tearing down the IO thread (since the URLFetcher dtor can post messages there). BUG=none TEST=none Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=71901

Patch Set 1 #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+14 lines, -15 lines) Patch
M chrome/browser/browser_process_impl.cc View 1 chunk +7 lines, -5 lines 0 comments Download
M chrome/browser/safe_browsing/client_side_detection_service.h View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/safe_browsing/client_side_detection_service.cc View 4 chunks +6 lines, -9 lines 3 comments Download

Messages

Total messages: 8 (0 generated)
Brian Ryner
9 years, 11 months ago (2011-01-19 02:13:28 UTC) #1
noelutz
Nice catch! Thanks for fixing this. noe. http://codereview.chromium.org/6298004/diff/1/chrome/browser/safe_browsing/client_side_detection_service.cc File chrome/browser/safe_browsing/client_side_detection_service.cc (right): http://codereview.chromium.org/6298004/diff/1/chrome/browser/safe_browsing/client_side_detection_service.cc#newcode111 chrome/browser/safe_browsing/client_side_detection_service.cc:111: HandlePhishingVerdict(source, url, ...
9 years, 11 months ago (2011-01-19 17:14:25 UTC) #2
Brian Ryner
I'd thought about that, but since it's not really necessary to delete model_fetcher_ until the ...
9 years, 11 months ago (2011-01-19 20:11:15 UTC) #3
noelutz
LGTM, noe.
9 years, 11 months ago (2011-01-19 20:16:59 UTC) #4
Brian Ryner
Lei is out this week; Eric do you want to take a look?
9 years, 11 months ago (2011-01-19 22:49:38 UTC) #5
eroman
http://codereview.chromium.org/6298004/diff/1/chrome/browser/safe_browsing/client_side_detection_service.cc File chrome/browser/safe_browsing/client_side_detection_service.cc (right): http://codereview.chromium.org/6298004/diff/1/chrome/browser/safe_browsing/client_side_detection_service.cc#newcode303 chrome/browser/safe_browsing/client_side_detection_service.cc:303: delete source; Isn't this a double-free? You changed model_fetcher_ ...
9 years, 11 months ago (2011-01-20 00:12:21 UTC) #6
Brian Ryner
http://codereview.chromium.org/6298004/diff/1/chrome/browser/safe_browsing/client_side_detection_service.cc File chrome/browser/safe_browsing/client_side_detection_service.cc (right): http://codereview.chromium.org/6298004/diff/1/chrome/browser/safe_browsing/client_side_detection_service.cc#newcode303 chrome/browser/safe_browsing/client_side_detection_service.cc:303: delete source; On 2011/01/20 00:12:21, eroman wrote: > Isn't ...
9 years, 11 months ago (2011-01-20 00:20:36 UTC) #7
eroman
9 years, 11 months ago (2011-01-20 00:58:17 UTC) #8
indeed you are right, I read that too hastily.

LGTM

Powered by Google App Engine
This is Rietveld 408576698