Bug 73797

Summary: Update String::containsOnlyLatin1() to avoid converting to 16 bits
Product: WebKit Reporter: Benjamin Poulain <benjamin>
Component: Web Template FrameworkAssignee: Benjamin Poulain <benjamin>
Status: RESOLVED FIXED    
Severity: Normal CC: kling, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch none

Description Benjamin Poulain 2011-12-04 21:29:35 PST
Update String::containsOnlyLatin1() to avoid converting to 16 bits
Comment 1 Benjamin Poulain 2011-12-04 21:44:59 PST
Created attachment 117839 [details]
Patch
Comment 2 Andreas Kling 2011-12-05 09:58:31 PST
Comment on attachment 117839 [details]
Patch

Delightful!
Comment 3 Darin Adler 2011-12-05 10:44:05 PST
Comment on attachment 117839 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=117839&action=review

> Source/JavaScriptCore/wtf/text/WTFString.h:-479
> -inline bool charactersAreAllLatin1(const UChar* characters, size_t length)

Why remove this? Why not just call it?
Comment 4 Benjamin Poulain 2011-12-05 10:48:17 PST
> > Source/JavaScriptCore/wtf/text/WTFString.h:-479
> > -inline bool charactersAreAllLatin1(const UChar* characters, size_t length)
> 
> Why remove this? Why not just call it?

I thought removing it would reduce the complexity here since it is never used.
Comment 5 Benjamin Poulain 2011-12-05 10:52:26 PST
(In reply to comment #4)
> > > Source/JavaScriptCore/wtf/text/WTFString.h:-479
> > > -inline bool charactersAreAllLatin1(const UChar* characters, size_t length)
> > 
> > Why remove this? Why not just call it?
> 
> I thought removing it would reduce the complexity here since it is never used.

Do you want me to add it back? I don't mind.
Comment 6 WebKit Review Bot 2011-12-05 12:28:03 PST
Comment on attachment 117839 [details]
Patch

Clearing flags on attachment: 117839

Committed r102028: <http://trac.webkit.org/changeset/102028>
Comment 7 WebKit Review Bot 2011-12-05 12:28:08 PST
All reviewed patches have been landed.  Closing bug.