[webkit-reviews] review granted: [Bug 180627] FloatingObjects/FloatingObject classes should not hold references to renderers : [Attachment 328925] Patch
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Mon Dec 11 08:34:16 PST 2017
Antti Koivisto <koivisto at iki.fi> has granted zalan <zalan at apple.com>'s request
for review:
Bug 180627: FloatingObjects/FloatingObject classes should not hold references
to renderers
https://bugs.webkit.org/show_bug.cgi?id=180627
Attachment 328925: Patch
https://bugs.webkit.org/attachment.cgi?id=328925&action=review
--- Comment #5 from Antti Koivisto <koivisto at iki.fi> ---
Comment on attachment 328925
--> https://bugs.webkit.org/attachment.cgi?id=328925
Patch
View in context: https://bugs.webkit.org/attachment.cgi?id=328925&action=review
> Source/WebCore/ChangeLog:3
> + FloatingObjects/FloatingObject classes should not hold references to
renderers
A weak reference is still a reference. This should probably be retitled.
> Source/WebCore/rendering/FloatingObjects.h:50
> - RenderBox& renderer() const { return m_renderer; }
> + RenderBox* renderer() const { return m_renderer.get(); }
I think you should still be returning a reference as this is semantically still
never supposed to return a null. Call sites don't test for a null renderer
either. You'll get the same (safe) nullptr dereference crash either way.
More information about the webkit-reviews
mailing list