[Webkit-unassigned] [Bug 205217] Nullptr crash if SVG element if element parent becomes document node
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Fri Dec 13 13:55:03 PST 2019
https://bugs.webkit.org/show_bug.cgi?id=205217
Darin Adler <darin at apple.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |darin at apple.com
Attachment #385640|review? |review+
Flags| |
--- Comment #2 from Darin Adler <darin at apple.com> ---
Comment on attachment 385640
--> https://bugs.webkit.org/attachment.cgi?id=385640
Patch
View in context: https://bugs.webkit.org/attachment.cgi?id=385640&action=review
> Source/WebCore/rendering/svg/RenderSVGText.cpp:375
> - } else if (m_needsTextMetricsUpdate || SVGRenderSupport::findTreeRootObject(*this)->isLayoutSizeChanged()) {
> + } else if (m_needsTextMetricsUpdate || (SVGRenderSupport::findTreeRootObject(*this) && SVGRenderSupport::findTreeRootObject(*this)->isLayoutSizeChanged())) {
The word "find" in the function name here is supposed to be a hint that the operation is nontrivial, so I suggest we restructure slightly so we can use a local variable and don’t need to call the function twice. Or rename the function if "find" is a guaranteed-inexpensive operation.
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20191213/086e3287/attachment.htm>
More information about the webkit-unassigned
mailing list