ladybird/Libraries/LibJS/Rust
Andreas Kling 00ffc340bc LibJS: Wrap CompiledRegex in Rc to allow AST cloning
CompiledRegex held an FFI handle with unique ownership and panicked
on clone. This caused a crash when a class field initializer contained
a regex literal, since the codegen wraps field initializers in a
synthetic function body by cloning the expression.

Wrapping CompiledRegex in Rc makes the clone a cheap refcount bump.
The take() semantics are preserved: the first codegen path to call
take() gets the handle, and Drop frees it if nobody took it.
2026-02-25 21:54:30 +01:00
..
src LibJS: Wrap CompiledRegex in Rc to allow AST cloning 2026-02-25 21:54:30 +01:00
build.rs Meta: Add 'cargo clippy -- -D clippy::all' to lint-ci.sh 2026-02-24 16:35:51 +01:00
Cargo.toml LibJs/Rust: Migrate to edition 2024 2026-02-24 16:35:51 +01:00