[webkit-reviews] review denied: [Bug 228122] Expand URL class query parameter functions : [Attachment 434214] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Jul 26 12:18:30 PDT 2021


Alex Christensen <achristensen at apple.com> has denied Risul Islam
<risul_islam at apple.com>'s request for review:
Bug 228122: Expand URL class query parameter functions
https://bugs.webkit.org/show_bug.cgi?id=228122

Attachment 434214: Patch

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




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

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

>> Source/WTF/wtf/URL.cpp:1269
>> +	String thisURLWithoutQuery = m_string.substring(0, thisPathLength);
> 
> Ditto.

You don't need to allocate and copy the substrings just to check if they are
equal.	Use StringView.

> Source/WTF/wtf/URL.h:229
> +    WTF_EXPORT_PRIVATE std::optional<Vector<QueryParameter>>
queryParameters() const;

This should probably just use URLParser::parseURLEncodedForm instead of adding
this.  That also returns a URLEncodedForm, which basically makes your
QueryParameter class unnecessary.


More information about the webkit-reviews mailing list