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 Review-Url: https://codereview.chromium.org/2185453004 Cr-Commit-Position: refs/heads/master@{#407765}
Showing
Please register or sign in to comment