Skip to content

Commit 541dbd3

Browse files
Fix CI
1 parent 5973868 commit 541dbd3

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

quickjs.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37437,7 +37437,6 @@ static int JS_WriteRegExp(BCWriterState *s, JSRegExp regexp)
3743737437

3743837438
if (is_be()) {
3743937439
if (lre_byte_swap(str8(bc), bc->len, /*is_byte_swapped*/false)) {
37440-
fail:
3744137440
JS_ThrowInternalError(s->ctx, "regex byte swap failed");
3744237441
return -1;
3744337442
}
@@ -38714,7 +38713,10 @@ static JSValue JS_ReadRegExp(BCReaderState *s)
3871438713
}
3871538714
}
3871638715

38717-
return js_regexp_constructor_internal(ctx, JS_UNDEFINED,
38716+
/* Pass ctx->regexp_ctor (not JS_UNDEFINED) to bypass regexp_shape
38717+
fast path during deserialization*/
38718+
return js_regexp_constructor_internal(ctx,
38719+
ctx->class_proto[JS_CLASS_REGEXP],
3871838720
JS_MKPTR(JS_TAG_STRING, pattern),
3871938721
JS_MKPTR(JS_TAG_STRING, bc));
3872038722
}

0 commit comments

Comments
 (0)