Skip to content

Commit 76a5e45

Browse files
committed
QuickJS: fixed compatibility with recent change in upstream.
JS_VALUE_GET_OBJ(v) was made hidden in 156d981.
1 parent 8708663 commit 76a5e45

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/qjs_buffer.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -707,8 +707,8 @@ qjs_buffer_is_buffer(JSContext *ctx, JSValueConst this_val,
707707
proto = JS_GetPrototype(ctx, argv[0]);
708708
buffer_proto = JS_GetClassProto(ctx, QJS_CORE_CLASS_ID_BUFFER);
709709

710-
ret = JS_NewBool(ctx, JS_VALUE_GET_TAG(argv[0]) == JS_TAG_OBJECT &&
711-
JS_VALUE_GET_OBJ(buffer_proto) == JS_VALUE_GET_OBJ(proto));
710+
ret = JS_NewBool(ctx, JS_IsObject(argv[0])
711+
&& qjs_is_same_value(ctx, proto, buffer_proto));
712712

713713
JS_FreeValue(ctx, buffer_proto);
714714
JS_FreeValue(ctx, proto);

0 commit comments

Comments
 (0)