WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
50123
Add an overload to makeString for Vector<char>
https://bugs.webkit.org/show_bug.cgi?id=50123
Summary
Add an overload to makeString for Vector<char>
Patrick R. Gansterer
Reported
2010-11-27 09:14:26 PST
see patch
Attachments
Patch
(6.47 KB, patch)
2010-11-27 12:06 PST
,
Patrick R. Gansterer
no flags
Details
Formatted Diff
Diff
Patch for landing
(7.31 KB, patch)
2010-12-11 03:29 PST
,
Patrick R. Gansterer
no flags
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Patrick R. Gansterer
Comment 1
2010-11-27 12:06:01 PST
Created
attachment 74963
[details]
Patch
Eric Seidel (no email)
Comment 2
2010-12-09 23:53:26 PST
Darin or or Maciej are better reviewers here.
Darin Adler
Comment 3
2010-12-10 10:40:41 PST
Comment on
attachment 74963
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=74963&action=review
> JavaScriptCore/wtf/text/StringConcatenate.h:124 > + unsigned length() { return m_buffer.size(); } > + > + void writeTo(UChar* destination) > + { > + for (unsigned i = 0; i < m_buffer.size(); ++i) > + destination[i] = m_buffer[i];
It’s better style to use size_t, which makes the type of vector’s size than unsigned, which can be narrower. This will widen characters to UChar based on the signed-ness of characters on a particular platform. If the characters are all ASCII, that’s OK, but if there are non-ASCII characters we probably want the characters treated as Latin-1 as we do in most other contexts. To accomplish that, we will need to cast the characters to unsigned char before letting them get widened to UChar. The same applies for const char*. We should either have an isASCII assertion or a typecast to unsigned char.
Patrick R. Gansterer
Comment 4
2010-12-11 03:29:00 PST
Created
attachment 76299
[details]
Patch for landing
WebKit Review Bot
Comment 5
2010-12-11 04:49:07 PST
Comment on
attachment 76299
[details]
Patch for landing Clearing flags on attachment: 76299 Committed
r73853
: <
http://trac.webkit.org/changeset/73853
>
WebKit Review Bot
Comment 6
2010-12-11 04:49:13 PST
All reviewed patches have been landed. Closing bug.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug