[Webkit-unassigned] [Bug 137918] Use references instead of pointers in EditingStyle

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Nov 14 18:03:43 PST 2014


https://bugs.webkit.org/show_bug.cgi?id=137918

--- Comment #18 from Csaba Osztrogon√°c <ossy at webkit.org> ---
Comment on attachment 241580
  --> https://bugs.webkit.org/attachment.cgi?id=241580
Patch v5

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

>> Source/WebCore/editing/EditingStyle.cpp:1559
>> +    diffTextDecorations(*mutableStyle, CSSPropertyTextDecoration, baseTextDecorationsInEffect.get());
> 
> What guarantees mutableStyle is not null? Can EditingStyle::style ever return null?

Theoretically (without knowing the exact logic) it can, it simply returns m_mutableStyle.get().

But assuming if it can return nullptr, it isn't safe before this change, because diffTextDecorations()
uses it without nullptr check: RefPtr<CSSValue> textDecoration = style->getPropertyCSSValue(propertID);
( http://trac.webkit.org/browser/trunk/Source/WebCore/editing/EditingStyle.cpp#L1502 )

-- 
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/20141115/015781a9/attachment-0002.html>


More information about the webkit-unassigned mailing list