Commit 299f85ef authored by Philip Rogers's avatar Philip Rogers Committed by Chromium LUCI CQ

Make PaintInfo stack allocated

For the transition to garbage collected LayoutObjects,
non-stack-allocated objects need to opt in to tracing [1]. PaintInfo
should be stack allocated and this patch marks it as such. To do this,
DirectionFlippingScope needed to be marked as stack allocated as well.
With this patch, PaintInfo should work as-is during the transition to
garbage collected LayoutObjects.

[1] https://chromium.googlesource.com/chromium/src/+/master/third_party/blink/renderer/platform/heap/BlinkGCAPIReference.md#stack_allocated

Bug: 1030176
Change-Id: Ifddaaf53eedb9f36bfb050cbb1c3edd84daa3780
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2633642Reviewed-by: default avatarYuki Yamada <yukiy@chromium.org>
Commit-Queue: Philip Rogers <pdr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#844635}
parent 96c6bfab
...@@ -53,7 +53,7 @@ namespace blink { ...@@ -53,7 +53,7 @@ namespace blink {
class LayoutBoxModelObject; class LayoutBoxModelObject;
struct CORE_EXPORT PaintInfo { struct CORE_EXPORT PaintInfo {
USING_FAST_MALLOC(PaintInfo); STACK_ALLOCATED();
public: public:
PaintInfo(GraphicsContext& context, PaintInfo(GraphicsContext& context,
......
...@@ -72,6 +72,8 @@ WebThemeEngine::State GetWebThemeState(const Element& element) { ...@@ -72,6 +72,8 @@ WebThemeEngine::State GetWebThemeState(const Element& element) {
} }
class DirectionFlippingScope { class DirectionFlippingScope {
STACK_ALLOCATED();
public: public:
DirectionFlippingScope(const LayoutObject&, const PaintInfo&, const IntRect&); DirectionFlippingScope(const LayoutObject&, const PaintInfo&, const IntRect&);
~DirectionFlippingScope(); ~DirectionFlippingScope();
......
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