Bug 125722

Summary: Small string improvements to JSInjectedScriptHost::type and other bindings
Product: WebKit Reporter: Joseph Pecoraro <joepeck>
Component: WebCore Misc.Assignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, joepeck, timothy
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
[PATCH] Proposed Fix
darin: review+
[PATCH] Incorporated Feedback none

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.