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

Issue 7919023: Fix a leak in MalwareDetailsTest.HTTPCache (Closed)

Created:
9 years, 3 months ago by rlarocque
Modified:
9 years, 3 months ago
CC:
chromium-reviews, Timur Iskhodzhanov, Alexander Potapenko, pam+watch_chromium.org, stuartmorgan+watch_chromium.org, Paweł Hajdan Jr.
Visibility:
Public.

Description

Fix a leak in MalwareDetailsTest.HTTPCache The TestURLRequestContextGetter ensures that it is deleted by the IO thread. If the IO thread doesn't exist when it is deleted, then the object is leaked. This change stops the IO thread a bit later in the teardown, which ensure that it is around long enough to handle TestURLRequestContextGetter's deletion. It looks like willchan had fixed this error for a while with r85378. At that time, the profile may have been the only object to hold a reference to the TestURLRequestContextGetter. In the current codebase, however, my debugger tells me there are two other outstanding references to it, so clearing the profile's reference is not enough to ensure the object is deleted. I'm hoping this fix will be less likely to break as the code changes. This fixes issue 79933, but not the suppressions named after it. One of those suppressions seems to share a root cause with issue 80654, so it has been renamed accordingly. The other is so broad that it's not safe to delete it at this time, because it's likely to be suppressing other bugs, too. BUG=79933, 80654 TEST=MalwareDetailsTest.HTTPCache Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=101875

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+21 lines, -21 lines) Patch
M chrome/browser/safe_browsing/malware_details_unittest.cc View 1 chunk +1 line, -1 line 0 comments Download
M tools/valgrind/memcheck/suppressions.txt View 2 chunks +20 lines, -20 lines 0 comments Download

Messages

Total messages: 4 (0 generated)
panayiotis
lgtm
9 years, 3 months ago (2011-09-16 22:49:47 UTC) #1
rlarocque
This small change should fix a leak in MalwareDetailsTest.HTTPCache. panayiotis: As the original test author, ...
9 years, 3 months ago (2011-09-16 22:50:47 UTC) #2
willchan no longer on Chromium
lgtm
9 years, 3 months ago (2011-09-19 18:38:28 UTC) #3
commit-bot: I haz the power
9 years, 3 months ago (2011-09-20 00:41:06 UTC) #4
Change committed as 101875

Powered by Google App Engine
This is Rietveld 408576698