WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
161997
Use character class table in URLParser
https://bugs.webkit.org/show_bug.cgi?id=161997
Summary
Use character class table in URLParser
Alex Christensen
Reported
2016-09-14 15:57:01 PDT
Use character class table in URLParser
Attachments
Patch
(13.50 KB, patch)
2016-09-14 15:57 PDT
,
Alex Christensen
no flags
Details
Formatted Diff
Diff
Patch
(13.51 KB, patch)
2016-09-15 11:44 PDT
,
Alex Christensen
no flags
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Alex Christensen
Comment 1
2016-09-14 15:57:35 PDT
Created
attachment 288878
[details]
Patch
Chris Dumez
Comment 2
2016-09-14 16:14:57 PDT
Comment on
attachment 288878
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=288878&action=review
> Source/WebCore/ChangeLog:8 > + No change in behavior except a performance improvement.
Do you have performance numbers?
> Source/WebCore/platform/URLParser.cpp:308 > +template<typename CharacterType> static bool isTabOrNewline(CharacterType character) { return character <= 0xD && character >= 0x9 && character != 0xB && character != 0xC; }
Could this be "character >= 0x9 && (character < 0xB || character == 0xD)"?
> Source/WebCore/platform/URLParser.cpp:310 > +template<typename CharacterType> static bool isInDefaultEncodeSet(CharacterType character) { return character > 0x7E || characterClassTable[character] & Default; }
what if character > 255?
> Source/WebCore/platform/URLParser.cpp:311 > +template<typename CharacterType> static bool isInUserInfoEncodeSet(CharacterType character) { return character > 0x7E || characterClassTable[character] & UserInfo; }
what if character > 255?
Chris Dumez
Comment 3
2016-09-14 16:16:32 PDT
Comment on
attachment 288878
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=288878&action=review
Ok, i hope the perf win is worth the extra complexity.
>> Source/WebCore/platform/URLParser.cpp:310 >> +template<typename CharacterType> static bool isInDefaultEncodeSet(CharacterType character) { return character > 0x7E || characterClassTable[character] & Default; } > > what if character > 255?
Oh never mind, this is an ||
>> Source/WebCore/platform/URLParser.cpp:311 >> +template<typename CharacterType> static bool isInUserInfoEncodeSet(CharacterType character) { return character > 0x7E || characterClassTable[character] & UserInfo; } > > what if character > 255?
Oh never mind, this is an ||
Alex Christensen
Comment 4
2016-09-15 11:44:22 PDT
Created
attachment 288979
[details]
Patch
Alex Christensen
Comment 5
2016-09-15 11:51:06 PDT
http://trac.webkit.org/changeset/205990
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