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

Issue 2185453004: Fix a memory leak in BrowsingDataFilterBuilder (Closed)

Created:
4 years, 4 months ago by msramek
Modified:
4 years, 4 months ago
Reviewers:
vabr (Chromium)
CC:
chromium-reviews, markusheintz_, msramek+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Fix a memory leak in BrowsingDataFilterBuilder BrowsingDataFilterBuilder is an abstract class that has a non-virtual destructor. This is a mistake - since the class and its subclasses are non-copyable, they're typically handled by pointers; calling delete on such a pointer will only call the base class destructor, not those of the subclasses, and thus leak any attributes of the subclasses. This was spotted by ASan in the context of the CL implementing the task scheduler for BrowsingDataRemover. When a task was finished processing, its destructor did not correctly destroy the contained BrowsingDataFilterBuilder. BUG=630327 Committed: https://crrev.com/09df8fd82d462a314bde355b8aba7a221f1f3bbc Cr-Commit-Position: refs/heads/master@{#407765}

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+3 lines, -3 lines) Patch
M chrome/browser/browsing_data/browsing_data_filter_builder.h View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/browsing_data/origin_filter_builder.h View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/browsing_data/registrable_domain_filter_builder.h View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 11 (6 generated)
msramek
Hi Václav, Can I ask you for a quick context-free review? Thanks, Martin
4 years, 4 months ago (2016-07-26 09:58:14 UTC) #4
vabr (Chromium)
LGTM, nice catch! Vaclav
4 years, 4 months ago (2016-07-26 10:05:02 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2185453004/1
4 years, 4 months ago (2016-07-26 10:43:02 UTC) #8
commit-bot: I haz the power
Committed patchset #1 (id:1)
4 years, 4 months ago (2016-07-26 11:10:33 UTC) #9
commit-bot: I haz the power
4 years, 4 months ago (2016-07-26 11:12:41 UTC) #11
Message was sent while issue was closed.
Patchset 1 (id:??) landed as
https://crrev.com/09df8fd82d462a314bde355b8aba7a221f1f3bbc
Cr-Commit-Position: refs/heads/master@{#407765}

Powered by Google App Engine
This is Rietveld 408576698