gecko-dev/testing/web-platform/tests/interfaces/wasm-js-api.idl
autofoolip 843542b89f Bug 1540269 [wpt PR 15901] - Update interfaces/wasm-js-api.idl, a=testonly
Automatic update from web-platform-tests
Update interfaces/wasm-js-api.idl (#15901)

Source: https://github.com/tidoust/reffy-reports/blob/19a80a9/whatwg/idl/wasm-js-api.idl
Build: https://travis-ci.org/tidoust/reffy-reports/builds/507115788
--

wpt-commits: 84a6893e80ada56d07ff7063aac6284ea00189e1
wpt-pr: 15901
2019-04-24 11:31:17 +01:00

110 lines
3 KiB
Text

// GENERATED CONTENT - DO NOT EDIT
// Content was automatically extracted by Reffy into reffy-reports
// (https://github.com/tidoust/reffy-reports)
// Source: WebAssembly JavaScript Interface (https://webassembly.github.io/spec/js-api/)
dictionary WebAssemblyInstantiatedSource {
required Module module;
required Instance instance;
};
[Exposed=(Window,Worker,Worklet)]
namespace WebAssembly {
boolean validate(BufferSource bytes);
Promise<Module> compile(BufferSource bytes);
Promise<WebAssemblyInstantiatedSource> instantiate(
BufferSource bytes, optional object importObject);
Promise<Instance> instantiate(
Module moduleObject, optional object importObject);
};
enum ImportExportKind {
"function",
"table",
"memory",
"global"
};
dictionary ModuleExportDescriptor {
required USVString name;
required ImportExportKind kind;
// Note: Other fields such as signature may be added in the future.
};
dictionary ModuleImportDescriptor {
required USVString module;
required USVString name;
required ImportExportKind kind;
};
[LegacyNamespace=WebAssembly, Constructor(BufferSource bytes), Exposed=(Window,Worker,Worklet)]
interface Module {
static sequence<ModuleExportDescriptor> exports(Module moduleObject);
static sequence<ModuleImportDescriptor> imports(Module moduleObject);
static sequence<ArrayBuffer> customSections(Module moduleObject, DOMString sectionName);
};
[LegacyNamespace=WebAssembly, Constructor(Module module, optional object importObject), Exposed=(Window,Worker,Worklet)]
interface Instance {
readonly attribute object exports;
};
dictionary MemoryDescriptor {
required [EnforceRange] unsigned long initial;
[EnforceRange] unsigned long maximum;
};
[LegacyNamespace=WebAssembly, Constructor(MemoryDescriptor descriptor), Exposed=(Window,Worker,Worklet)]
interface Memory {
unsigned long grow([EnforceRange] unsigned long delta);
readonly attribute ArrayBuffer buffer;
};
enum TableKind {
"anyfunc",
// Note: More values may be added in future iterations,
// e.g., typed function references, typed GC references
};
dictionary TableDescriptor {
required TableKind element;
required [EnforceRange] unsigned long initial;
[EnforceRange] unsigned long maximum;
};
[LegacyNamespace=WebAssembly, Constructor(TableDescriptor descriptor), Exposed=(Window,Worker,Worklet)]
interface Table {
unsigned long grow([EnforceRange] unsigned long delta);
Function? get([EnforceRange] unsigned long index);
void set([EnforceRange] unsigned long index, Function? value);
readonly attribute unsigned long length;
};
enum ValueType {
"i32",
"i64",
"f32",
"f64"
};
dictionary GlobalDescriptor {
required ValueType value;
boolean mutable = false;
};
[LegacyNamespace=WebAssembly, Constructor(GlobalDescriptor descriptor, optional any v), Exposed=(Window,Worker,Worklet)]
interface Global {
any valueOf();
attribute any value;
};
[LegacyNamespace=WebAssembly]
interface CompileError { };
[LegacyNamespace=WebAssembly]
interface LinkError { };
[LegacyNamespace=WebAssembly]
interface RuntimeError { };