<html>
    <head>
      <base href="https://bugs.webkit.org/" />
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Use references instead of pointers in EditingStyle"
   href="https://bugs.webkit.org/show_bug.cgi?id=137918#c18">Comment # 18</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Use references instead of pointers in EditingStyle"
   href="https://bugs.webkit.org/show_bug.cgi?id=137918">bug 137918</a>
              from <span class="vcard"><a class="email" href="mailto:ossy@webkit.org" title="Csaba Osztrogon√°c <ossy@webkit.org>"> <span class="fn">Csaba Osztrogon√°c</span></a>
</span></b>
        <pre>Comment on <span class=""><a href="attachment.cgi?id=241580&action=diff" name="attach_241580" title="Patch v5">attachment 241580</a> <a href="attachment.cgi?id=241580&action=edit" title="Patch v5">[details]</a></span>
Patch v5

View in context: <a href="https://bugs.webkit.org/attachment.cgi?id=241580&action=review">https://bugs.webkit.org/attachment.cgi?id=241580&action=review</a>

<span class="quote">>> Source/WebCore/editing/EditingStyle.cpp:1559
>> +    diffTextDecorations(*mutableStyle, CSSPropertyTextDecoration, baseTextDecorationsInEffect.get());

> What guarantees mutableStyle is not null? Can EditingStyle::style ever return null?</span >

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);
( <a href="http://trac.webkit.org/browser/trunk/Source/WebCore/editing/EditingStyle.cpp#L1502">http://trac.webkit.org/browser/trunk/Source/WebCore/editing/EditingStyle.cpp#L1502</a> )</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>