Bug 125722 - Small string improvements to JSInjectedScriptHost::type and other bindings
Summary: Small string improvements to JSInjectedScriptHost::type and other bindings
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-12-13 19:55 PST by Joseph Pecoraro
Modified: 2013-12-14 09:49 PST (History)
3 users (show)

See Also:


Attachments
[PATCH] Proposed Fix (3.02 KB, patch)
2013-12-13 19:56 PST, Joseph Pecoraro
darin: review+
Details | Formatted Diff | Diff
[PATCH] Incorporated Feedback (4.88 KB, patch)
2013-12-13 22:19 PST, Joseph Pecoraro
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Joseph Pecoraro 2013-12-13 19:55:25 PST
This function returns a few strings that JSC VM's always have ("string", "boolean", "number"). And other jsString(...) calls can use ASCIILiteral.

NOTE: The paths that now return smallString are not used because InjectedScriptHost::type calls in InjectedScriptSource avoid calling type for primitives (at least right now).
Comment 1 Joseph Pecoraro 2013-12-13 19:56:19 PST
Created attachment 219222 [details]
[PATCH] Proposed Fix
Comment 2 Darin Adler 2013-12-13 20:24:25 PST
Comment on attachment 219222 [details]
[PATCH] Proposed Fix

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

> Source/WebCore/bindings/js/JSInjectedScriptHostCustom.cpp:133
> +        return jsString(exec, ASCIILiteral("array"));

These should all be jsNontrivialString.
Comment 3 Joseph Pecoraro 2013-12-13 22:08:17 PST
(In reply to comment #2)
> (From update of attachment 219222 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=219222&action=review
> 
> > Source/WebCore/bindings/js/JSInjectedScriptHostCustom.cpp:133
> > +        return jsString(exec, ASCIILiteral("array"));
> 
> These should all be jsNontrivialString.

Oh cool!
Comment 4 Joseph Pecoraro 2013-12-13 22:19:23 PST
Created attachment 219238 [details]
[PATCH] Incorporated Feedback

This covers all the /jsString\(.*?"/ in Source/
Comment 5 WebKit Commit Bot 2013-12-14 09:49:55 PST
Comment on attachment 219238 [details]
[PATCH] Incorporated Feedback

Clearing flags on attachment: 219238

Committed r160597: <http://trac.webkit.org/changeset/160597>
Comment 6 WebKit Commit Bot 2013-12-14 09:49:57 PST
All reviewed patches have been landed.  Closing bug.