[webkit-reviews] review granted: [Bug 211358] A URL cannot have a username/password/port if its host is null : [Attachment 398327] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sun May 3 20:16:07 PDT 2020


Daniel Bates <dbates at webkit.org> has granted Rob Buis <rbuis at igalia.com>'s
request for review:
Bug 211358: A URL cannot have a username/password/port if its host is null
https://bugs.webkit.org/show_bug.cgi?id=211358

Attachment 398327: Patch

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




--- Comment #2 from Daniel Bates <dbates at webkit.org> ---
Comment on attachment 398327
  --> https://bugs.webkit.org/attachment.cgi?id=398327
Patch

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

Patch looks good.

> Source/WTF/wtf/URL.cpp:453
> +    if (hostStart() == m_hostEnd || protocolIs("file"))

Ok as-is. No change needed. Spec also mentions about checking
cannot-be-a-base-URL flag. This is equivalent to checking !isHierarchical()
(very quick read + intuition) and the optimal solution would do that. <---
function assets there is :, which I think is covered by m_isValid. If not, then
need to check that too to avoid the assert triggering in debug.


More information about the webkit-reviews mailing list