]> git.kaiwu.me - njs.git/commitdiff
QuickJS: fixed compatibility with recent change in upstream.
authorDmitry Volyntsev <xeioex@nginx.com>
Wed, 26 Mar 2025 00:08:09 +0000 (17:08 -0700)
committerDmitry Volyntsev <xeioexception@gmail.com>
Wed, 26 Mar 2025 01:59:11 +0000 (18:59 -0700)
JS_VALUE_GET_OBJ(v) was made hidden in 156d981.

src/qjs_buffer.c

index dfe7b04de14d1b2be2599bfafd69e08c3d4289af..48f609be18ccd6ea891824b32c2acab9c01c3c46 100644 (file)
@@ -707,8 +707,8 @@ qjs_buffer_is_buffer(JSContext *ctx, JSValueConst this_val,
     proto = JS_GetPrototype(ctx, argv[0]);
     buffer_proto = JS_GetClassProto(ctx, QJS_CORE_CLASS_ID_BUFFER);
 
-    ret = JS_NewBool(ctx, JS_VALUE_GET_TAG(argv[0]) == JS_TAG_OBJECT &&
-                     JS_VALUE_GET_OBJ(buffer_proto) == JS_VALUE_GET_OBJ(proto));
+    ret = JS_NewBool(ctx, JS_IsObject(argv[0])
+                          && qjs_is_same_value(ctx, proto, buffer_proto));
 
     JS_FreeValue(ctx, buffer_proto);
     JS_FreeValue(ctx, proto);