WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
Bug 162864
URLParser: empty relative URLs should not copy fragment from the base URL
https://bugs.webkit.org/show_bug.cgi?id=162864
Summary
URLParser: empty relative URLs should not copy fragment from the base URL
Alex Christensen
Reported
2016-10-03 08:21:03 PDT
URLParser: empty relative URLs should not copy fragment from the base URL
Attachments
Patch
(9.54 KB, patch)
2016-10-03 08:24 PDT
,
Alex Christensen
no flags
Details
Formatted Diff
Diff
Patch
(9.08 KB, patch)
2016-10-03 09:04 PDT
,
Alex Christensen
cdumez
: review+
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Alex Christensen
Comment 1
2016-10-03 08:24:15 PDT
Created
attachment 290484
[details]
Patch
Alex Christensen
Comment 2
2016-10-03 09:04:38 PDT
Created
attachment 290486
[details]
Patch
Chris Dumez
Comment 3
2016-10-03 10:13:41 PDT
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.
Alex Christensen
Comment 4
2016-10-03 10:31:04 PDT
I don't particularly like the name "left" but done.
https://trac.webkit.org/changeset/206735
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug