skip verification of class ID in JS_GetOpaque if class_id is 0
This commit is contained in:
parent
6e2e68fd08
commit
77b100d5e6
1 changed files with 1 additions and 1 deletions
|
@ -9847,7 +9847,7 @@ void *JS_GetOpaque(JSValueConst obj, JSClassID class_id)
|
|||
if (JS_VALUE_GET_TAG(obj) != JS_TAG_OBJECT)
|
||||
return NULL;
|
||||
p = JS_VALUE_GET_OBJ(obj);
|
||||
if (p->class_id != class_id)
|
||||
if (class_id && p->class_id != class_id)
|
||||
return NULL;
|
||||
return p->u.opaque;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue