Skip to content

Commit 4623da7

Browse files
authored
Fix Atomics.pause on 32 bits platforms (#1235)
Use JS_VALUE_GET_NORM_TAG to get the type tag, not JS_VALUE_GET_TAG. The latter doesn't work correctly with NaN boxing. Refs: #986 (comment)
1 parent ca0d50d commit 4623da7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

quickjs.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57112,7 +57112,7 @@ static JSValue js_atomics_pause(JSContext *ctx, JSValueConst this_obj,
5711257112
double d;
5711357113

5711457114
if (argc > 0) {
57115-
switch (JS_VALUE_GET_TAG(argv[0])) {
57115+
switch (JS_VALUE_GET_NORM_TAG(argv[0])) {
5711657116
case JS_TAG_FLOAT64: // accepted if and only if fraction == 0.0
5711757117
d = JS_VALUE_GET_FLOAT64(argv[0]);
5711857118
if (isfinite(d))

0 commit comments

Comments
 (0)