mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-05-23 22:02:27 +00:00
Update quickjs (#890)
Includes additional fixes from main repo's unmerged PRs: - quickjs#132: Fix undefined behavior: shift 32 bits for uint32_t in bf_set_ui - quickjs#171: Fix locale-aware representation of hours in Date class - quickjs#182: Fix stack overflow in CVE-2023-31922
This commit is contained in:
parent
4b7ba9a4c5
commit
879bb84244
12 changed files with 2330 additions and 2182 deletions
9
third_party/quickjs/quickjs.c
vendored
9
third_party/quickjs/quickjs.c
vendored
|
@ -4860,6 +4860,15 @@ BOOL JS_SetConstructorBit(JSContext *ctx, JSValueConst func_obj, BOOL val)
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
BOOL JS_IsArrayBuffer(JSContext *ctx, JSValueConst val)
|
||||
{
|
||||
JSObject *p;
|
||||
if (JS_VALUE_GET_TAG(val) != JS_TAG_OBJECT)
|
||||
return FALSE;
|
||||
p = JS_VALUE_GET_OBJ(val);
|
||||
return (p->class_id == JS_CLASS_ARRAY_BUFFER || p->class_id == JS_CLASS_SHARED_ARRAY_BUFFER);
|
||||
}
|
||||
|
||||
BOOL JS_IsError(JSContext *ctx, JSValueConst val)
|
||||
{
|
||||
JSObject *p;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue