mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 07:27:45 +00:00
LibWeb: Convert WebAssemblyObject AOs to ThrowCompletionOr
This commit is contained in:
parent
a76cd669b1
commit
3e8c76d5ab
6 changed files with 62 additions and 102 deletions
|
@ -14,10 +14,10 @@
|
|||
namespace Web::Bindings {
|
||||
|
||||
class WebAssemblyMemoryObject;
|
||||
Result<size_t, JS::Value> parse_module(JS::GlobalObject& global_object, JS::Object* buffer);
|
||||
JS::ThrowCompletionOr<size_t> parse_module(JS::GlobalObject& global_object, JS::Object* buffer);
|
||||
JS::NativeFunction* create_native_function(JS::GlobalObject& global_object, Wasm::FunctionAddress address, String const& name);
|
||||
JS::Value to_js_value(JS::GlobalObject& global_object, Wasm::Value& wasm_value);
|
||||
Optional<Wasm::Value> to_webassembly_value(JS::GlobalObject& global_object, JS::Value value, const Wasm::ValueType& type);
|
||||
JS::ThrowCompletionOr<Wasm::Value> to_webassembly_value(JS::GlobalObject& global_object, JS::Value value, const Wasm::ValueType& type);
|
||||
|
||||
class WebAssemblyObject final : public JS::Object {
|
||||
JS_OBJECT(WebAssemblyObject, JS::Object);
|
||||
|
@ -29,7 +29,7 @@ public:
|
|||
|
||||
virtual void visit_edges(Cell::Visitor&) override;
|
||||
|
||||
static Result<size_t, JS::Value> instantiate_module(Wasm::Module const&, JS::VM&, JS::GlobalObject&);
|
||||
static JS::ThrowCompletionOr<size_t> instantiate_module(Wasm::Module const&, JS::VM&, JS::GlobalObject&);
|
||||
|
||||
struct CompiledWebAssemblyModule {
|
||||
explicit CompiledWebAssemblyModule(Wasm::Module&& module)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue