<html>
    <head>
      <base href="https://bugs.webkit.org/" />
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Add Link header support for preload."
   href="https://bugs.webkit.org/show_bug.cgi?id=165521#c23">Comment # 23</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Add Link header support for preload."
   href="https://bugs.webkit.org/show_bug.cgi?id=165521">bug 165521</a>
              from <span class="vcard"><a class="email" href="mailto:yoav&#64;yoav.ws" title="Yoav Weiss &lt;yoav&#64;yoav.ws&gt;"> <span class="fn">Yoav Weiss</span></a>
</span></b>
        <pre>Comment on <span class=""><a href="attachment.cgi?id=299128&amp;action=diff" name="attach_299128" title="Patch">attachment 299128</a> <a href="attachment.cgi?id=299128&amp;action=edit" title="Patch">[details]</a></span>
Patch

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

<span class="quote">&gt;&gt; Source/WebCore/loader/LinkHeader.cpp:115
&gt;&gt; +static bool validFieldEnd(CharacterType*&amp; position, CharacterType * const end)
&gt; 
&gt; extra space after CharacterType.  I see 9 instances of this.
&gt; I guess we don't have a lot of T* const in WebKit, but we should.  It's more WebKit-style than T * const.</span >

changed

<span class="quote">&gt;&gt; Source/WebCore/loader/LinkHeader.cpp:215
&gt;&gt; +    completeQuotes = false;
&gt; 
&gt; This should be initialized by the caller.</span >

moved initialization to the caller

<span class="quote">&gt;&gt; Source/WebCore/loader/LinkHeader.cpp:262
&gt;&gt; +        --valueEnd;
&gt; 
&gt; There should be some checks or at least assertions to make sure we don't go out of bounds.  We should be cautious with out bounds checks.  What if there is only a single quote?  (It would probably fail earlier, but still)
&gt; 
&gt; if (valueStart &lt; valueEnd &amp;&amp; hasQuotes)
&gt;     ++valueStart;
&gt; if (valueStart &lt; valueEnd &amp;&amp; completeQuotes)
&gt;     --valueEnd;</span >

Added ASSERT as well as a single quote test case

<span class="quote">&gt;&gt; Source/WebCore/loader/LinkHeader.cpp:309
&gt;&gt; +    : m_isValid(true)
&gt; 
&gt; This should be initialized in the header.
&gt; bool m_isValid { true };</span >

done</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>