Bug 138329

Summary: Clarify RenderListMarker ownership model.
Product: WebKit Reporter: Andreas Kling <kling>
Component: Layout and RenderingAssignee: Andreas Kling <kling>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, esprehn+autocc, glenn, kondapallykalyan
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch none

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]
Patch
Comment 2 Antti Koivisto 2014-11-03 15:47:50 PST
Comment on attachment 240878 [details]
Patch

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]
Patch

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.