Commit a179cedc authored by Anton Bikineev's avatar Anton Bikineev Committed by Commit Bot

blink: Fix warnings on calling non-virtual destructors

Calling destructors explicitly in FinalizerTrait revealed some warnings
clang emits when the non-virtual destructor gets called on a polymorphic
type. Many of the changed classes inherit from abstract NameClient, but
making the destructor of NameClient virtual would be suboptimal as it
would increase the number of finalizers.

Bug: 990913
Change-Id: I06bffd838ac4917920caa7ecb6db6b8610b32685
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1736890
Commit-Queue: Anton Bikineev <bikineev@chromium.org>
Reviewed-by: default avatarKentaro Hara <haraken@chromium.org>
Cr-Commit-Position: refs/heads/master@{#684261}
parent 0a3d0d35
......@@ -43,13 +43,14 @@ namespace blink {
class StyleSheet;
class CORE_EXPORT StyleSheetCollection
: public GarbageCollected<StyleSheetCollection>,
: public GarbageCollectedFinalized<StyleSheetCollection>,
public NameClient {
public:
friend class ActiveDocumentStyleSheetCollector;
friend class ImportedDocumentStyleSheetCollector;
StyleSheetCollection();
virtual ~StyleSheetCollection() = default;
const ActiveStyleSheetVector& ActiveAuthorStyleSheets() const {
return active_author_style_sheets_;
......
......@@ -13,8 +13,8 @@ namespace blink {
class HTMLPortalElement;
class DocumentPortals : public GarbageCollected<DocumentPortals>,
public Supplement<Document> {
class DocumentPortals final : public GarbageCollected<DocumentPortals>,
public Supplement<Document> {
USING_GARBAGE_COLLECTED_MIXIN(DocumentPortals);
public:
......
......@@ -14,7 +14,7 @@ namespace blink {
class IntersectionObservation;
class IntersectionObserver;
class ElementIntersectionObserverData
class ElementIntersectionObserverData final
: public GarbageCollected<ElementIntersectionObserverData>,
public NameClient {
public:
......
......@@ -14,7 +14,7 @@ namespace blink {
class ModuleTreeLinker;
// ModuleTreeLinkerRegistry keeps active ModuleTreeLinkers alive.
class CORE_EXPORT ModuleTreeLinkerRegistry
class CORE_EXPORT ModuleTreeLinkerRegistry final
: public GarbageCollected<ModuleTreeLinkerRegistry>,
public NameClient {
public:
......
......@@ -12,8 +12,8 @@ namespace blink {
class GeoNotifier;
class GeolocationWatchers : public GarbageCollected<GeolocationWatchers>,
public NameClient {
class GeolocationWatchers final : public GarbageCollected<GeolocationWatchers>,
public NameClient {
public:
GeolocationWatchers() = default;
void Trace(blink::Visitor*);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment