mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2026-04-19 02:10:26 +00:00
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. |
||
|---|---|---|
| .. | ||
| src | ||
| build.rs | ||
| Cargo.toml | ||