URLParser: empty relative URLs should not copy fragment from the base URL
Created attachment 290484 [details] Patch
Created attachment 290486 [details] Patch
Comment on attachment 290486 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=290486&action=review > Source/WebCore/platform/URL.cpp:1115 > + m_string = m_string.substring(0, m_queryEnd); Seems like this should be m_string.left(m_queryEnd) as in the original code. > Source/WebCore/platform/URLParser.cpp:770 > + RELEASE_ASSERT(length <= string.length()); This assertion is already present at the beginning of the function. Should probably be dropped here. > Source/WebCore/platform/URLParser.cpp:1082 > + && m_url.m_string == base.m_string.substring(0, base.m_queryEnd))); substring() -> left() This allocates the String unnecessarily. I understand this is an assertion but it'd still be nice to use a StringView.
I don't particularly like the name "left" but done. https://trac.webkit.org/changeset/206735