Bug 99727 - Make conversion between JSStringRef and WKStringRef work without character size conversions
Summary: Make conversion between JSStringRef and WKStringRef work without character si...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit API (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Michael Saboff
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-10-18 09:42 PDT by Michael Saboff
Modified: 2012-10-18 14:21 PDT (History)
2 users (show)

See Also:


Attachments
Patch (3.39 KB, patch)
2012-10-18 09:54 PDT, Michael Saboff
andersca: review+
gyuyoung.kim: commit-queue-
Details | Formatted Diff | Diff
Patch with fix to #include typo (3.39 KB, patch)
2012-10-18 10:18 PDT, Michael Saboff
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Saboff 2012-10-18 09:42:27 PDT
The APIs WKStringRef WKStringCreateWithJSString(JSStringRef) and JSStringRef WKStringCopyJSString(WKStringRef) call the characters() method on their argument string to create the wrapped return string.  This will cause 8-bit argument string to be up converted and create the results strings as 16 bit strings.  Instead both of these API's should use the wrapped WTFString objects so that 8-bit strings stay that way.

Due to threading, these API's need to create copies, but that is already done in OpaqueJSString.
Comment 1 Michael Saboff 2012-10-18 09:54:31 PDT
Created attachment 169427 [details]
Patch
Comment 2 Anders Carlsson 2012-10-18 09:58:36 PDT
Comment on attachment 169427 [details]
Patch

Very nice!
Comment 3 Gyuyoung Kim 2012-10-18 10:00:30 PDT
Comment on attachment 169427 [details]
Patch

Attachment 169427 [details] did not pass efl-ews (efl):
Output: http://queues.webkit.org/results/14455140
Comment 4 Early Warning System Bot 2012-10-18 10:01:34 PDT
Comment on attachment 169427 [details]
Patch

Attachment 169427 [details] did not pass qt-wk2-ews (qt):
Output: http://queues.webkit.org/results/14461073
Comment 5 Michael Saboff 2012-10-18 10:18:03 PDT
Created attachment 169432 [details]
Patch with fix to #include typo
Comment 6 WebKit Review Bot 2012-10-18 11:07:16 PDT
Comment on attachment 169432 [details]
Patch with fix to #include typo

Clearing flags on attachment: 169432

Committed r131777: <http://trac.webkit.org/changeset/131777>
Comment 7 WebKit Review Bot 2012-10-18 11:07:19 PDT
All reviewed patches have been landed.  Closing bug.
Comment 8 Roger Fong 2012-10-18 14:17:11 PDT
Fixed windows build: http://trac.webkit.org/changeset/131801
Comment 9 Michael Saboff 2012-10-18 14:21:14 PDT
(In reply to comment #8)
> Fixed windows build: http://trac.webkit.org/changeset/131801

Thanks.