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

Andreas Kling
Reported 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.
Attachments
Patch (8.71 KB, patch)
2014-11-03 15:43 PST, Andreas Kling
no flags
Andreas Kling
Comment 1 2014-11-03 15:43:00 PST
Antti Koivisto
Comment 2 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.
WebKit Commit Bot
Comment 3 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>
WebKit Commit Bot
Comment 4 2014-11-03 18:35:49 PST
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.