mirror of
https://github.com/oven-sh/bun
synced 2026-02-17 22:32:06 +00:00
### What does this PR do? Replaces raw napi_env pointers with WTF::Ref<NapiEnv> for improved memory management and safety. Updates related classes, function signatures, and finalizer handling to use reference counting. Adds ref/deref methods to NapiEnv and integrates them in Zig and C++ code paths, ensuring proper lifecycle management for N-API environments. ### How did you verify your code works?