Bug 168564

Summary: JSC C-API Needs a non-copying stringref constructor
Product: WebKit Reporter: Oliver Hunt <oliver>
Component: JavaScriptCoreAssignee: Nobody <webkit-unassigned>
Status: NEW    
Severity: Normal CC: fpizlo, ggaren, jfbastien, saam
Priority: P2    
Version: WebKit Local Build   
Hardware: Unspecified   
OS: Unspecified   

Oliver Hunt
Reported 2017-02-18 15:49:31 PST
I've been trying to improve load and parse time in some local (e.g. insane) code, and i realized that a common problem i'm having is that i have to cause a copy of data because we don't have a NoCopy() API that takes bytes + encoding + finalizer callback. Something like JSStringCreateWithByteNoCopy(void* bytes, size_t length, CFStringEncoding encoding, void(finalizer)(bytes)); Would be great
Attachments
Oliver Hunt
Comment 1 2017-02-18 15:50:23 PST
Or rather: JSStringCreateWithByteNoCopy(void* context, const uint8_t* bytes, size_t length, void(finalizer)(void* context, const uint8_t* bytes)); Which is more in line with what CF does.
Note You need to log in before you can comment on or make changes to this bug.