[webkit-reviews] review granted: [Bug 200475] Fix inefficiency in HTTPHeaderMap::set(CFStringRef, const String&) : [Attachment 375639] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Aug 6 12:00:39 PDT 2019


Darin Adler <darin at apple.com> has granted Chris Dumez <cdumez at apple.com>'s
request for review:
Bug 200475: Fix inefficiency in HTTPHeaderMap::set(CFStringRef, const String&)
https://bugs.webkit.org/show_bug.cgi?id=200475

Attachment 375639: Patch

https://bugs.webkit.org/attachment.cgi?id=375639&action=review




--- Comment #2 from Darin Adler <darin at apple.com> ---
Comment on attachment 375639
  --> https://bugs.webkit.org/attachment.cgi?id=375639
Patch

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

> Source/WebCore/platform/network/HTTPHeaderMap.cpp:75
> +	   if (findHTTPHeaderName(StringView(reinterpret_cast<const
LChar*>(nameCharacters), length), headerName))
> +	       set(headerName, value);
> +	   else
> +	       setUncommonHeader(String(nameCharacters, length), value);

Strikes me as strange that StringView requires the cast to LChar* and String
does not.


More information about the webkit-reviews mailing list