<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@yoav.ws" title="Yoav Weiss <yoav@yoav.ws>"> <span class="fn">Yoav Weiss</span></a>
</span></b>
<pre>Comment on <span class=""><a href="attachment.cgi?id=299128&action=diff" name="attach_299128" title="Patch">attachment 299128</a> <a href="attachment.cgi?id=299128&action=edit" title="Patch">[details]</a></span>
Patch
View in context: <a href="https://bugs.webkit.org/attachment.cgi?id=299128&action=review">https://bugs.webkit.org/attachment.cgi?id=299128&action=review</a>
<span class="quote">>> Source/WebCore/loader/LinkHeader.cpp:115
>> +static bool validFieldEnd(CharacterType*& position, CharacterType * const end)
>
> extra space after CharacterType. I see 9 instances of this.
> 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">>> Source/WebCore/loader/LinkHeader.cpp:215
>> + completeQuotes = false;
>
> This should be initialized by the caller.</span >
moved initialization to the caller
<span class="quote">>> Source/WebCore/loader/LinkHeader.cpp:262
>> + --valueEnd;
>
> 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)
>
> if (valueStart < valueEnd && hasQuotes)
> ++valueStart;
> if (valueStart < valueEnd && completeQuotes)
> --valueEnd;</span >
Added ASSERT as well as a single quote test case
<span class="quote">>> Source/WebCore/loader/LinkHeader.cpp:309
>> + : m_isValid(true)
>
> This should be initialized in the header.
> 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>