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].
Created attachment 106006 [details] Proposed patch
Comment on attachment 106006 [details] Proposed patch r=me
Committed r94336: <http://trac.webkit.org/changeset/94336>
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?