Bug 93402 - Use char* instead of LChar* for the public interface of String construction from literals
Summary: Use char* instead of LChar* for the public interface of String construction f...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Template Framework (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Benjamin Poulain
URL:
Keywords:
Depends on:
Blocks: 93426
  Show dependency treegraph
 
Reported: 2012-08-07 15:39 PDT by Benjamin Poulain
Modified: 2012-08-08 18:29 PDT (History)
3 users (show)

See Also:


Attachments
Patch (11.70 KB, patch)
2012-08-07 15:51 PDT, Benjamin Poulain
msaboff: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Benjamin Poulain 2012-08-07 15:39:22 PDT
Some part of the API was based on LChar because it is easier. After using it for a bit, I think it is dangerously confusing.
Comment 1 Benjamin Poulain 2012-08-07 15:51:30 PDT
Created attachment 157028 [details]
Patch
Comment 2 Michael Saboff 2012-08-08 15:40:44 PDT
Comment on attachment 157028 [details]
Patch

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

> Source/WTF/wtf/text/StringImpl.cpp:87
> +    ASSERT(charactersAreAllASCII<LChar>(reinterpret_cast<const LChar*>(characters), length));

Do we care about the ASSERT after this change?
Comment 3 Benjamin Poulain 2012-08-08 16:14:27 PDT
Thanks for the review.

> > +    ASSERT(charactersAreAllASCII<LChar>(reinterpret_cast<const LChar*>(characters), length));
> 
> Do we care about the ASSERT after this change?

Yep, it is still possible to pass non ASCII characters. Unfortunately there is no easy way to enforce that at compile time.
Comment 4 Benjamin Poulain 2012-08-08 18:29:56 PDT
Committed r125135: <http://trac.webkit.org/changeset/125135>