File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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}
You can’t perform that action at this time.
0 commit comments