File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -312,8 +312,8 @@ struct StarExportBinding {
312312 std::string_view id;
313313};
314314
315- // Global state for error tracking
316- std::optional<lexer_error> last_error;
315+ // Thread-local state for error tracking (safe for concurrent parse calls).
316+ thread_local std::optional<lexer_error> last_error;
317317
318318// Lexer state class
319319class CJSLexer {
Original file line number Diff line number Diff line change @@ -310,8 +310,8 @@ struct StarExportBinding {
310310 std::string_view id;
311311};
312312
313- // Global state for error tracking
314- std::optional<lexer_error> last_error;
313+ // Thread-local state for error tracking (safe for concurrent parse calls).
314+ thread_local std::optional<lexer_error> last_error;
315315
316316// Lexer state class
317317class CJSLexer {
You can’t perform that action at this time.
0 commit comments