Skip to content

Commit

Permalink
Add heap identifier macros to WebCore/animation
Browse files Browse the repository at this point in the history
https://bugs.webkit.org/show_bug.cgi?id=260547
rdar://114281522

Reviewed by Brent Fulgham.

Replace WTF_MAKE_FAST_ALLOCATED with
WTF_MAKE_FAST_ALLOCATED_WITH_HEAP_IDENTIFIER for more fine-grained
diagnostics when building with MallocHeapBreakdown enabled.

* Source/WebCore/animation/AcceleratedTimeline.cpp:
* Source/WebCore/animation/AcceleratedTimeline.h:
* Source/WebCore/animation/CSSPropertyAnimation.cpp:
* Source/WebCore/animation/DocumentTimelinesController.cpp:
* Source/WebCore/animation/DocumentTimelinesController.h:
* Source/WebCore/animation/ElementAnimationRareData.cpp:
* Source/WebCore/animation/ElementAnimationRareData.h:
* Source/WebCore/animation/FrameRateAligner.cpp:
* Source/WebCore/animation/FrameRateAligner.h:
* Source/WebCore/animation/KeyframeEffectStack.cpp:
* Source/WebCore/animation/KeyframeEffectStack.h:

Canonical link: https://commits.webkit.org/267159@main
  • Loading branch information
rreno committed Aug 22, 2023
1 parent 0317cc8 commit c923b30
Show file tree
Hide file tree
Showing 11 changed files with 186 additions and 61 deletions.
1 change: 1 addition & 0 deletions Source/WebCore/animation/AcceleratedTimeline.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
#include <wtf/MonotonicTime.h>

namespace WebCore {
DEFINE_ALLOCATOR_WITH_HEAP_IDENTIFIER(AcceleratedTimeline);

AcceleratedTimeline::AcceleratedTimeline(Document& document)
{
Expand Down
3 changes: 2 additions & 1 deletion Source/WebCore/animation/AcceleratedTimeline.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,9 @@ class Document;
class Element;
struct Styleable;

DECLARE_ALLOCATOR_WITH_HEAP_IDENTIFIER(AcceleratedTimeline);
class AcceleratedTimeline {
WTF_MAKE_FAST_ALLOCATED;
WTF_MAKE_FAST_ALLOCATED_WITH_HEAP_IDENTIFIER(AcceleratedTimeline);
public:
AcceleratedTimeline(Document&);

Expand Down
227 changes: 171 additions & 56 deletions Source/WebCore/animation/CSSPropertyAnimation.cpp

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions Source/WebCore/animation/DocumentTimelinesController.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
#include <wtf/text/TextStream.h>

namespace WebCore {
DEFINE_ALLOCATOR_WITH_HEAP_IDENTIFIER(DocumentTimelinesController);

DocumentTimelinesController::DocumentTimelinesController(Document& document)
: m_document(document)
Expand Down
3 changes: 2 additions & 1 deletion Source/WebCore/animation/DocumentTimelinesController.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,9 @@ class Document;
class DocumentTimeline;
class WebAnimation;

DECLARE_ALLOCATOR_WITH_HEAP_IDENTIFIER(DocumentTimelinesController);
class DocumentTimelinesController {
WTF_MAKE_FAST_ALLOCATED;
WTF_MAKE_FAST_ALLOCATED_WITH_HEAP_IDENTIFIER(DocumentTimelinesController);
public:
explicit DocumentTimelinesController(Document&);
~DocumentTimelinesController();
Expand Down
1 change: 1 addition & 0 deletions Source/WebCore/animation/ElementAnimationRareData.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
#include "RenderStyle.h"

namespace WebCore {
DEFINE_ALLOCATOR_WITH_HEAP_IDENTIFIER(ElementAnimationRareData);

ElementAnimationRareData::ElementAnimationRareData(PseudoId pseudoId)
: m_pseudoId(pseudoId)
Expand Down
3 changes: 2 additions & 1 deletion Source/WebCore/animation/ElementAnimationRareData.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,10 @@ class CSSTransition;
class RenderStyle;
class WebAnimation;

DECLARE_ALLOCATOR_WITH_HEAP_IDENTIFIER(ElementAnimationRareData);
class ElementAnimationRareData {
WTF_MAKE_FAST_ALLOCATED_WITH_HEAP_IDENTIFIER(ElementAnimationRareData);
WTF_MAKE_NONCOPYABLE(ElementAnimationRareData);
WTF_MAKE_FAST_ALLOCATED;
public:
explicit ElementAnimationRareData(PseudoId);
~ElementAnimationRareData();
Expand Down
1 change: 1 addition & 0 deletions Source/WebCore/animation/FrameRateAligner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
#include "FrameRateAligner.h"

namespace WebCore {
DEFINE_ALLOCATOR_WITH_HEAP_IDENTIFIER(FrameRateAligner);

FrameRateAligner::FrameRateAligner() = default;

Expand Down
3 changes: 2 additions & 1 deletion Source/WebCore/animation/FrameRateAligner.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,9 @@

namespace WebCore {

DECLARE_ALLOCATOR_WITH_HEAP_IDENTIFIER(FrameRateAligner);
class FrameRateAligner {
WTF_MAKE_FAST_ALLOCATED;
WTF_MAKE_FAST_ALLOCATED_WITH_HEAP_IDENTIFIER(FrameRateAligner);
public:
FrameRateAligner();
~FrameRateAligner();
Expand Down
1 change: 1 addition & 0 deletions Source/WebCore/animation/KeyframeEffectStack.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
#include <wtf/PointerComparison.h>

namespace WebCore {
DEFINE_ALLOCATOR_WITH_HEAP_IDENTIFIER(KeyframeEffectStack);

KeyframeEffectStack::KeyframeEffectStack()
{
Expand Down
3 changes: 2 additions & 1 deletion Source/WebCore/animation/KeyframeEffectStack.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,9 @@ namespace Style {
struct ResolutionContext;
}

DECLARE_ALLOCATOR_WITH_HEAP_IDENTIFIER(KeyframeEffectStack);
class KeyframeEffectStack {
WTF_MAKE_FAST_ALLOCATED;
WTF_MAKE_FAST_ALLOCATED_WITH_HEAP_IDENTIFIER(KeyframeEffectStack);
public:
explicit KeyframeEffectStack();
~KeyframeEffectStack();
Expand Down

0 comments on commit c923b30

Please sign in to comment.