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 { ...@@ -43,13 +43,14 @@ namespace blink {
class StyleSheet; class StyleSheet;
class CORE_EXPORT StyleSheetCollection class CORE_EXPORT StyleSheetCollection
: public GarbageCollected<StyleSheetCollection>, : public GarbageCollectedFinalized<StyleSheetCollection>,
public NameClient { public NameClient {
public: public:
friend class ActiveDocumentStyleSheetCollector; friend class ActiveDocumentStyleSheetCollector;
friend class ImportedDocumentStyleSheetCollector; friend class ImportedDocumentStyleSheetCollector;
StyleSheetCollection(); StyleSheetCollection();
virtual ~StyleSheetCollection() = default;
const ActiveStyleSheetVector& ActiveAuthorStyleSheets() const { const ActiveStyleSheetVector& ActiveAuthorStyleSheets() const {
return active_author_style_sheets_; return active_author_style_sheets_;
......
...@@ -13,8 +13,8 @@ namespace blink { ...@@ -13,8 +13,8 @@ namespace blink {
class HTMLPortalElement; class HTMLPortalElement;
class DocumentPortals : public GarbageCollected<DocumentPortals>, class DocumentPortals final : public GarbageCollected<DocumentPortals>,
public Supplement<Document> { public Supplement<Document> {
USING_GARBAGE_COLLECTED_MIXIN(DocumentPortals); USING_GARBAGE_COLLECTED_MIXIN(DocumentPortals);
public: public:
......
...@@ -14,7 +14,7 @@ namespace blink { ...@@ -14,7 +14,7 @@ namespace blink {
class IntersectionObservation; class IntersectionObservation;
class IntersectionObserver; class IntersectionObserver;
class ElementIntersectionObserverData class ElementIntersectionObserverData final
: public GarbageCollected<ElementIntersectionObserverData>, : public GarbageCollected<ElementIntersectionObserverData>,
public NameClient { public NameClient {
public: public:
......
...@@ -14,7 +14,7 @@ namespace blink { ...@@ -14,7 +14,7 @@ namespace blink {
class ModuleTreeLinker; class ModuleTreeLinker;
// ModuleTreeLinkerRegistry keeps active ModuleTreeLinkers alive. // ModuleTreeLinkerRegistry keeps active ModuleTreeLinkers alive.
class CORE_EXPORT ModuleTreeLinkerRegistry class CORE_EXPORT ModuleTreeLinkerRegistry final
: public GarbageCollected<ModuleTreeLinkerRegistry>, : public GarbageCollected<ModuleTreeLinkerRegistry>,
public NameClient { public NameClient {
public: public:
......
...@@ -12,8 +12,8 @@ namespace blink { ...@@ -12,8 +12,8 @@ namespace blink {
class GeoNotifier; class GeoNotifier;
class GeolocationWatchers : public GarbageCollected<GeolocationWatchers>, class GeolocationWatchers final : public GarbageCollected<GeolocationWatchers>,
public NameClient { public NameClient {
public: public:
GeolocationWatchers() = default; GeolocationWatchers() = default;
void Trace(blink::Visitor*); 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