You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
napi_check_object_type_tag returns false if upper in napi_type_tag is 0 #43786
How often does it reproduce? Is there a required condition?
100% of the time
What is the expected behavior?
napi_check_object_type_tag will set is_my_type to true.
What do you see instead?
is_my_type remains false.
Additional information
Type tags are stored in a BigInt. If upper is 0, then the leading zero gets truncated and the length is 1. However, the follow check expects the length to always be 2.
Activity
daeyeon commentedon Jul 12, 2022
I guess you meant
0xa5ed9ce2e4c00c38, 0x0since the first one is for a lower value.node/src/js_native_api_types.h
Lines 160 to 163 in 5fad0b9
kjvalencik commentedon Jul 12, 2022
@daeyeon Good catch; that's correct. I was transcribing from Rust and my test code used named fields.
src: fix `napi_check_object_type_tag()`
src: fix `napi_check_object_type_tag()`
src: fix `napi_check_object_type_tag()`
src: fix `napi_check_object_type_tag()`