[Webkit-unassigned] [Bug 228122] Expand URL class query parameter functions

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Jul 30 12:14:44 PDT 2021


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

--- Comment #12 from Risul Islam <risul_islam at apple.com> ---
Comment on attachment 434642
  --> https://bugs.webkit.org/attachment.cgi?id=434642
Patch

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

>> Source/WTF/wtf/URL.cpp:1259
>> +        queryWithoutRemovalKeys = queryWithoutRemovalKeys.substring(0, queryWithoutRemovalKeys.length() - 1);
> 
> This is also a wasteful String allocation and copy.  This could either be done with a StringView substring, which is just an integer subtraction, or by checking if queryWithoutRemovalKeys is empty in the loop and adding '&' before the new values if not.

On all the above things.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20210730/5c66ac6f/attachment.htm>


More information about the webkit-unassigned mailing list