Bug 67340

Summary: Remove simple usage of UString::characters() from JavaScriptCore
Product: WebKit Reporter: Michael Saboff <msaboff>
Component: JavaScriptCoreAssignee: Michael Saboff <msaboff>
Status: RESOLVED FIXED    
Severity: Normal CC: darin
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Bug Depends on:    
Bug Blocks: 66661    
Attachments:
Description Flags
Proposed patch ggaren: review+

Michael Saboff
Reported 2011-08-31 16:50:03 PDT
As part of the changes for https://bugs.webkit.org/show_bug.cgi?id=66161 it would simplify the work if simple usage of the existing UString::characters() method where changed to other forms. For example, there are many cases where the code does s.characters()[0] which can be directly replaced with s[0].
Attachments
Proposed patch (9.22 KB, patch)
2011-09-01 12:16 PDT, Michael Saboff
ggaren: review+
Michael Saboff
Comment 1 2011-09-01 12:16:53 PDT
Created attachment 106006 [details] Proposed patch
Geoffrey Garen
Comment 2 2011-09-01 12:19:53 PDT
Comment on attachment 106006 [details] Proposed patch r=me
Michael Saboff
Comment 3 2011-09-01 13:03:46 PDT
Darin Adler
Comment 4 2011-09-01 13:39:50 PDT
This adds code to each call site, checking the number against the length of the string. Is there a measurable performance cost? Should we redo this in a way that does not have performance cost?
Note You need to log in before you can comment on or make changes to this bug.