mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-26 09:45:06 +02:00
Create a SourceCode on the main thread (performing UTF-8 to UTF-16 conversion), then submit parse_program() to the ThreadPool for Rust parsing on a worker thread. This unblocks the WebContent event loop during external script loading. Add Script::create_from_parsed() and ClassicScript::create_from_pre_parsed() factory methods that take a pre-parsed RustParsedProgram and a SourceCode, performing only the GC-allocating compile step on the main thread. Falls back to synchronous parsing when the Rust pipeline is unavailable (LIBJS_CPP=1 or LIBJS_COMPARE_PIPELINES=1).
8.0 KiB
8.0 KiB