mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 19:07:36 +00:00
LibWeb: Port the WebAssembly namespace to IDL
This commit is contained in:
parent
2cd7159694
commit
57646c86ef
8 changed files with 186 additions and 170 deletions
27
Userland/Libraries/LibWeb/WebAssembly/WebAssembly.h
Normal file
27
Userland/Libraries/LibWeb/WebAssembly/WebAssembly.h
Normal file
|
@ -0,0 +1,27 @@
|
|||
/*
|
||||
* Copyright (c) 2021, Ali Mohammad Pur <mpfard@serenityos.org>
|
||||
* Copyright (c) 2023, Tim Flynn <trflynn89@serenityos.org>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <AK/Optional.h>
|
||||
#include <LibJS/Forward.h>
|
||||
#include <LibJS/Heap/Handle.h>
|
||||
#include <LibJS/Runtime/Value.h>
|
||||
#include <LibWeb/Bindings/ExceptionOrUtils.h>
|
||||
#include <LibWeb/Forward.h>
|
||||
|
||||
namespace Web::WebAssembly {
|
||||
|
||||
void visit_edges(JS::Cell::Visitor&);
|
||||
|
||||
bool validate(JS::VM&, JS::Handle<JS::Object>& bytes);
|
||||
WebIDL::ExceptionOr<JS::Value> compile(JS::VM&, JS::Handle<JS::Object>& bytes);
|
||||
|
||||
WebIDL::ExceptionOr<JS::Value> instantiate(JS::VM&, JS::Handle<JS::Object>& bytes, Optional<JS::Handle<JS::Object>>& import_object);
|
||||
WebIDL::ExceptionOr<JS::Value> instantiate(JS::VM&, Module const& module_object, Optional<JS::Handle<JS::Object>>& import_object);
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue