[Webkit-unassigned] [Bug 123058] JSC should have an API for typed arrays

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sat Oct 19 13:36:45 PDT 2013


--- Comment #4 from Geoffrey Garen <ggaren at apple.com>  2013-10-19 13:35:31 PST ---
I think Alexey is also asking for a way to create typed arrays.

> JSGetTypedArrayBase(JSValueRef) -> returns void* of the first element in the view or the base of the buffer
> JSGetTypedArrayByteLength(JSValueRef) -> returns size_t of the number of bytes that the view sees or the byteLength of the buffer.

This would be 

JSObjectGetTypedArrayBase(JSContextRef, JSValueRef)
JSObjectGetTypedArrayByteLength(JSContextRef, JSValueRef)

Maybe "BytesPtr" is a better name than "Base", to match our string and data APIs.

How would I know the data type in the typed array? How long would the returned pointer remain valid? What happens after neutering?

Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

More information about the webkit-unassigned mailing list