| Summary: | RenderMultiColumnSpannerPlaceholder leaks seen on leaks bot | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Joseph Pecoraro <joepeck> |
| Component: | WebCore Misc. | Assignee: | Nobody <webkit-unassigned> |
| Status: | NEW --- | ||
| Severity: | Normal | CC: | ap, darin, ddkilzer, hyatt, joepeck, kling, zalan |
| Priority: | P2 | ||
| Version: | 528+ (Nightly build) | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| See Also: |
https://bugs.webkit.org/show_bug.cgi?id=140899 https://bugs.webkit.org/show_bug.cgi?id=137273 |
||
|
Description
Joseph Pecoraro
2015-02-14 18:25:38 PST
I'm unfamiliar with the render tree code. It doesn't appear to use any of our common smart pointers. What should the lifetime be / Who should delete this object? This is an intentional (for now) leak, see <http://trac.webkit.org/changeset/175641>. That said, it certainly needs to be fixed eventually. In the meanwhile, we should add the leak to Tools/Scripts/webkitpy/port/leakdetector.py Are you sure this is intentional? The ChangeLog talks about leaking the placeholder, not the RenderStyle it uses.
Am I missing something?
diff --git a/Source/WebCore/rendering/RenderMultiColumnSpannerPlaceholder.cpp b/Source/WebCore/rendering/RenderMultiColumnSpannerPlaceholder.cpp
index 6d7e9f1..f871aa2 100644
--- a/Source/WebCore/rendering/RenderMultiColumnSpannerPlaceholder.cpp
+++ b/Source/WebCore/rendering/RenderMultiColumnSpannerPlaceholder.cpp
@@ -36,9 +36,9 @@ namespace WebCore {
RenderMultiColumnSpannerPlaceholder* RenderMultiColumnSpannerPlaceholder::createAnonymous(RenderMultiColumnFlowThread* flowThread, RenderBox* spanner, RenderStyle* parentStyle)
{
- RefPtr<RenderStyle> newStyle(RenderStyle::createAnonymousStyleWithDisplay(parentStyle, BLOCK));
+ auto newStyle = RenderStyle::createAnonymousStyleWithDisplay(parentStyle, BLOCK);
newStyle->setClear(CBOTH); // We don't want floats in the row preceding the spanner to continue on the other side.
- auto placeholder = new RenderMultiColumnSpannerPlaceholder(flowThread, spanner, *newStyle);
+ auto placeholder = new RenderMultiColumnSpannerPlaceholder(flowThread, spanner, WTF::move(newStyle));
placeholder->initializeStyle();
return placeholder;
}
(In reply to comment #4) > Are you sure this is intentional? The ChangeLog talks about leaking the > placeholder, not the RenderStyle it uses. > > Am I missing something? I am missing something! Both the RenderMultiColumnSpannerPlaceholder and the RenderStyle are leaked, which is expected based on the comment. |