mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 707096 - Add a public API for TypedArray / ArrayBuffer. r=dmandelin
This commit is contained in:
parent
08f3e24abd
commit
0f953f4c92
@ -2412,6 +2412,12 @@ js_IsArrayBuffer(JSObject *obj)
|
||||
return obj->isArrayBuffer();
|
||||
}
|
||||
|
||||
JS_FRIEND_API(JSBool)
|
||||
JS_IsArrayBufferObject(JSObject *obj)
|
||||
{
|
||||
return js_IsArrayBuffer(obj);
|
||||
}
|
||||
|
||||
namespace js {
|
||||
|
||||
bool
|
||||
@ -2449,6 +2455,12 @@ js_CreateArrayBuffer(JSContext *cx, jsuint nbytes)
|
||||
return ArrayBuffer::create(cx, nbytes);
|
||||
}
|
||||
|
||||
JS_FRIEND_API(JSObject *)
|
||||
JS_NewArrayBuffer(JSContext *cx, jsuint nbytes)
|
||||
{
|
||||
return js_CreateArrayBuffer(cx, nbytes);
|
||||
}
|
||||
|
||||
static inline JSObject *
|
||||
TypedArrayConstruct(JSContext *cx, jsint atype, uintN argc, Value *argv)
|
||||
{
|
||||
|
@ -325,6 +325,12 @@ js_CreateTypedArrayWithBuffer(JSContext *cx, jsint atype, JSObject *bufArg,
|
||||
extern int32_t JS_FASTCALL
|
||||
js_TypedArray_uint8_clamp_double(const double x);
|
||||
|
||||
JS_FRIEND_API(JSBool)
|
||||
JS_IsArrayBufferObject(JSObject *obj);
|
||||
|
||||
JS_FRIEND_API(JSObject *)
|
||||
JS_NewArrayBuffer(JSContext *cx, jsuint nbytes);
|
||||
|
||||
JS_FRIEND_API(uint32_t)
|
||||
JS_GetArrayBufferByteLength(JSObject *obj);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user