mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-11 17:37:33 +02:00
Create parser-free script and module materializers for decoded cache blobs. Cached functions create SFDs without Rust compile inputs and attach their precompiled executable immediately, while declaration metadata is populated from decoded records. Treat cache blobs as external input from the HTTP disk cache. Run bytecode validation unconditionally before fixing up cache pointers, and reject decoded source ranges or metadata indices that would be out-of-bounds during C++ materialization. Report executable validation failures as parser errors so callers can reject corrupt sidecars and fall back to source compilation. LibJS tests cover corrupt top-level bytecode, declaration bytecode, and declaration source spans.