Skip to content

Commit 7cf3737

Browse files
Fix CI
1 parent 3b3bb60 commit 7cf3737

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
@@ -37411,7 +37411,6 @@ static int JS_WriteRegExp(BCWriterState *s, JSRegExp regexp)
3741137411

3741237412
if (is_be()) {
3741337413
if (lre_byte_swap(str8(bc), bc->len, /*is_byte_swapped*/false)) {
37414-
fail:
3741537414
JS_ThrowInternalError(s->ctx, "regex byte swap failed");
3741637415
return -1;
3741737416
}
@@ -38681,7 +38680,10 @@ static JSValue JS_ReadRegExp(BCReaderState *s)
3868138680
}
3868238681
}
3868338682

38684-
return js_regexp_constructor_internal(ctx, JS_UNDEFINED,
38683+
/* Pass ctx->regexp_ctor (not JS_UNDEFINED) to bypass regexp_shape
38684+
fast path during deserialization*/
38685+
return js_regexp_constructor_internal(ctx,
38686+
ctx->class_proto[JS_CLASS_REGEXP],
3868538687
JS_MKPTR(JS_TAG_STRING, pattern),
3868638688
JS_MKPTR(JS_TAG_STRING, bc));
3868738689
}

0 commit comments

Comments
 (0)