[Webkit-unassigned] [Bug 61572] KURL::protocolIs(const char* protocol) asserts in Debug builds with valid protocols

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Jun 20 17:07:03 PDT 2011


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


Andy Estes <aestes at apple.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
         AssignedTo|webkit-unassigned at lists.web |aestes at apple.com
                   |kit.org                     |




--- Comment #6 from Andy Estes <aestes at apple.com>  2011-06-20 17:07:04 PST ---
(In reply to comment #3)
> The issue is not just an assertion. The code actually works wrong for custom protocols with non-letters.
> 
> When I originally wrote this we wanted it to be super-fast for protocols like "http" and "file" and it seemed the right tradeoff to only work with letters. If we want a slightly slower one that can work for any protocol, it's easy to change this into that.
> 
> Or we could even have both, although I don't see an obvious way to automatically choose the faster one at compile time.
> 
> The current function could be named fastAllLetterProtocolIs or something annoying like that.

Since the valid non-letter scheme characters ('0'-'9', '+', '-', '.') all fall in the range [32, 63], ORing with 0x20 is a no-op. I think we can make a special version of isLetterMatchIgnoringCase() that works only for protocol characters. The check will be identical to isLetterMatchIgnoringCase() but will have a more permissive assertion.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list