Bug 252790 - Produce 8 bit function toString() strings when possible
Summary: Produce 8 bit function toString() strings when possible
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Cameron McCormack (:heycam)
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2023-02-22 18:25 PST by Cameron McCormack (:heycam)
Modified: 2023-02-22 18:49 PST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Cameron McCormack (:heycam) 2023-02-22 18:25:32 PST
Some pages call Function.prototype.toString() on a function whose resulting string contains only 8 bit characters, but results in a 16 bit WTF::String due to the script source being stored in a 16 bit string.  This can end up wasting memory.  Let's see if perf allows us to check these strings' content and create an 8 bit string if possible.
Comment 1 Radar WebKit Bug Importer 2023-02-22 18:26:06 PST
<rdar://problem/105810084>
Comment 2 Cameron McCormack (:heycam) 2023-02-22 18:49:30 PST
Pull request: https://github.com/WebKit/WebKit/pull/10555