Skip to content

Commit 72664c0

Browse files
authored
Merge branch 'nginx:master' into qjs-fetch
2 parents 936da2c + 76a5e45 commit 72664c0

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)