mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-01 13:49:16 +00:00
LibWasm+LibWeb: Implement (a very basic version of) the JS link/import
This allows Wasm code to call javascript functions.
This commit is contained in:
parent
a2af04837e
commit
3926eab3b7
Notes:
sideshowbarker
2024-07-18 17:23:28 +09:00
Author: https://github.com/alimpfard
Commit: 3926eab3b7
Pull-request: https://github.com/SerenityOS/serenity/pull/7395
Reviewed-by: https://github.com/linusg
6 changed files with 113 additions and 39 deletions
|
@ -21,10 +21,10 @@ Optional<FunctionAddress> Store::allocate(ModuleInstance& module, const Module::
|
|||
return address;
|
||||
}
|
||||
|
||||
Optional<FunctionAddress> Store::allocate(const HostFunction& function)
|
||||
Optional<FunctionAddress> Store::allocate(HostFunction&& function)
|
||||
{
|
||||
FunctionAddress address { m_functions.size() };
|
||||
m_functions.empend(HostFunction { function });
|
||||
m_functions.empend(HostFunction { move(function) });
|
||||
return address;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue