Bug 138329 - Clarify RenderListMarker ownership model.
Summary: Clarify RenderListMarker ownership model.
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Andreas Kling
Depends on:
Reported: 2014-11-03 15:40 PST by Andreas Kling
Modified: 2014-11-03 18:35 PST (History)
4 users (show)

See Also:

Patch (8.71 KB, patch)
2014-11-03 15:43 PST, Andreas Kling
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas Kling 2014-11-03 15:40:58 PST
A RenderListMarker is either in-tree and owned by the tree, or out-of-tree
and owned by a RenderListItem.

This patch changes RenderListItem::m_marker to be a raw pointer, and removes
the special handling of list markers in RenderElement child teardown.

We also remove the willBeDestroyed() hook. It was used to clear out the
m_marker pointer, but this is now done in the regular ~RenderListItem()
destructor with an assertion for marker sanity. m_marker is automatically
nulled out by a didDestroyListMarker() callback on RenderListItem.
Comment 1 Andreas Kling 2014-11-03 15:43:00 PST
Created attachment 240878 [details]
Comment 2 Antti Koivisto 2014-11-03 15:47:50 PST
Comment on attachment 240878 [details]

View in context: https://bugs.webkit.org/attachment.cgi?id=240878&action=review

> Source/WebCore/rendering/RenderListItem.h:89
> -    RenderPtr<RenderListMarker> m_marker;
> +    RenderListMarker* m_marker;

Weak pointers would be cool.
Comment 3 WebKit Commit Bot 2014-11-03 18:35:45 PST
Comment on attachment 240878 [details]

Clearing flags on attachment: 240878

Committed r175505: <http://trac.webkit.org/changeset/175505>
Comment 4 WebKit Commit Bot 2014-11-03 18:35:49 PST
All reviewed patches have been landed.  Closing bug.