mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2026-04-18 18:00:31 +00:00
NativeFunction previously stored an AK::Function for every builtin, even when the callable was just a plain C++ entry point. That mixed together two different representations, made simple builtins carry capture storage they did not need, and forced the GC to treat every native function as if it might contain captured JS values. Introduce RawNativeFunction for plain NativeFunctionPointer callees and keep AK::Function-backed callables on a CapturingNativeFunction subclass. Update the straightforward native registrations in LibJS and LibWeb to use the raw representation, while leaving exported Wasm functions on the capturing path because they still capture state. Wrap UniversalGlobalScope's byte-length strategy lambda in Function<...> explicitly so it keeps selecting the capturing NativeFunction::create overload. |
||
|---|---|---|
| .. | ||
| Global.cpp | ||
| Global.h | ||
| Global.idl | ||
| Instance.cpp | ||
| Instance.h | ||
| Instance.idl | ||
| Memory.cpp | ||
| Memory.h | ||
| Memory.idl | ||
| Module.cpp | ||
| Module.h | ||
| Module.idl | ||
| Table.cpp | ||
| Table.h | ||
| Table.idl | ||
| WebAssembly.cpp | ||
| WebAssembly.h | ||
| WebAssembly.idl | ||
| WebAssemblyModule.cpp | ||
| WebAssemblyModule.h | ||