Bug 76652

Summary: CaseFoldingHash::hash() doesn't handle 8 bit strings directly
Product: WebKit Reporter: Michael Saboff <msaboff>
Component: JavaScriptCoreAssignee: Michael Saboff <msaboff>
Status: RESOLVED FIXED    
Severity: Normal    
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
Patch kling: review+

Michael Saboff
Reported 2012-01-19 11:46:15 PST
CaseFoldingHash::hash(StringImpl* str) should have a path for 8 bit strings.
Attachments
Patch (1.18 KB, patch)
2012-01-19 15:10 PST, Michael Saboff
kling: review+
Michael Saboff
Comment 1 2012-01-19 15:10:38 PST
Andreas Kling
Comment 2 2012-01-19 15:29:48 PST
Comment on attachment 123205 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=123205&action=review r=me, just one little thing: > Source/JavaScriptCore/wtf/text/StringHash.h:105 > return hash(str->characters(), str->length()); You should switch this to characters16() to avoid the extra is8Bit() check in StringImpl::characters().
Michael Saboff
Comment 3 2012-01-19 15:31:13 PST
(In reply to comment #2) > (From update of attachment 123205 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=123205&action=review > > r=me, just one little thing: > > > Source/JavaScriptCore/wtf/text/StringHash.h:105 > > return hash(str->characters(), str->length()); > > You should switch this to characters16() to avoid the extra is8Bit() check in StringImpl::characters(). Thanks for catching that. I'll make the change before checking in.
Michael Saboff
Comment 4 2012-01-30 11:09:39 PST
Note You need to log in before you can comment on or make changes to this bug.