[webkit-reviews] review denied: [Bug 95420] Use ASCIILiteral for DEFINE_STATIC_LOCAL string : [Attachment 161400] Patch
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Wed Aug 29 22:32:44 PDT 2012
Benjamin Poulain <benjamin at webkit.org> has denied Gyuyoung Kim
<gyuyoung.kim at samsung.com>'s request for review:
Bug 95420: Use ASCIILiteral for DEFINE_STATIC_LOCAL string
https://bugs.webkit.org/show_bug.cgi?id=95420
Attachment 161400: Patch
https://bugs.webkit.org/attachment.cgi?id=161400&action=review
------- Additional Comments from Benjamin Poulain <benjamin at webkit.org>
View in context: https://bugs.webkit.org/attachment.cgi?id=161400&action=review
r- because of the AtomicStrings.
My apologies about that, I should have documented it earlier.
It is very nice of you to update all the ports.
> Source/WebKit/blackberry/WebKitSupport/InputHandler.cpp:240
> + DEFINE_STATIC_LOCAL(AtomicString, Default, (ASCIILiteral("default")));
> + DEFINE_STATIC_LOCAL(AtomicString, Url, (ASCIILiteral("url")));
> + DEFINE_STATIC_LOCAL(AtomicString, Email, (ASIILiteral("email")));
> + DEFINE_STATIC_LOCAL(AtomicString, Password, (ASCIILiteral("password")));
> + DEFINE_STATIC_LOCAL(AtomicString, Web, (ASCIILiteral("web")));
> + DEFINE_STATIC_LOCAL(AtomicString, Number, (ASCIILiteral("number")));
> + DEFINE_STATIC_LOCAL(AtomicString, Symbol, (ASCIILiteral("symbol")));
> + DEFINE_STATIC_LOCAL(AtomicString, Phone, (ASCIILiteral("phone")));
> + DEFINE_STATIC_LOCAL(AtomicString, Pin, (ASCIILiteral("pin")));
> + DEFINE_STATIC_LOCAL(AtomicString, Hex, (ASCIILiteral("hexadecimal")));
AtomicString should not use ASCIILiteral, I updated the Wiki this afternoon.
You should use the constructor with AtomicString::ConstructFromLiteral so that
I can do more optimizations later for AtomicString.
> Source/WebKit/blackberry/WebKitSupport/InputHandler.cpp:295
> + DEFINE_STATIC_LOCAL(AtomicString, Default, (ASCIILiteral("default")));
> + DEFINE_STATIC_LOCAL(AtomicString, Connect, (ASCIILiteral("connect")));
> + DEFINE_STATIC_LOCAL(AtomicString, Done, (ASCIILiteral("done")));
> + DEFINE_STATIC_LOCAL(AtomicString, Go, (ASCIILiteral("go")));
> + DEFINE_STATIC_LOCAL(AtomicString, Join, (ASCIILiteral("join")));
> + DEFINE_STATIC_LOCAL(AtomicString, Next, (ASCIILiteral("next")));
> + DEFINE_STATIC_LOCAL(AtomicString, Search, (ASCIILiteral("search")));
> + DEFINE_STATIC_LOCAL(AtomicString, Send, (ASCIILiteral("send")));
> + DEFINE_STATIC_LOCAL(AtomicString, Submit, (ASCIILiteral("submit")));
Ditto.
> Source/WebKit/chromium/src/ContextFeaturesClientImpl.cpp:99
> + DEFINE_STATIC_LOCAL(AtomicString, name,
(ASCIILiteral("ContextFeaturesCache")));
Ditto.
> Source/WebKit/gtk/webkit/webkitwebsettings.cpp:137
> - DEFINE_STATIC_LOCAL(const String, uaPlatform, (String("")));
> + DEFINE_STATIC_LOCAL(const String, uaPlatform, (ASCIILiteral("")));
Please leave this one as it is. There is no construction from literal for empty
strings, it is gonna assert.
I need to do some measurement to find the fastest way to initialize empty
strings. I'll update the wiki as soon as I have the solution.
More information about the webkit-reviews
mailing list