[Webkit-unassigned] [Bug 165521] Add Link header support for preload.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Jan 18 12:40:54 PST 2017


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

Alex Christensen <achristensen at apple.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #299128|review?                     |review+
              Flags|                            |

--- Comment #22 from Alex Christensen <achristensen at apple.com> ---
Comment on attachment 299128
  --> https://bugs.webkit.org/attachment.cgi?id=299128
Patch

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

> 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.

> Source/WebCore/loader/LinkHeader.cpp:215
> +    completeQuotes = false;

This should be initialized by the caller.

> Source/WebCore/loader/LinkHeader.cpp:262
> +    if (hasQuotes)
> +        ++valueStart;
> +    if (completeQuotes)
> +        --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;

> Source/WebCore/loader/LinkHeader.cpp:309
> +    : m_isValid(true)

This should be initialized in the header.
bool m_isValid { true };

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20170118/39c5bce1/attachment.html>


More information about the webkit-unassigned mailing list