From 20163c058485dc524402c46f21bbe65a860bf9c5 Mon Sep 17 00:00:00 2001 From: Idan Horowitz Date: Tue, 19 Oct 2021 20:18:01 +0300 Subject: LibJS: Add ThrowCompletionOr versions of the JS native function macros The old versions were renamed to JS_DECLARE_OLD_NATIVE_FUNCTION and JS_DEFINE_OLD_NATIVE_FUNCTION, and will be eventually removed once all native functions were converted to the new format. --- Userland/Libraries/LibWeb/WebAssembly/WebAssemblyObject.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'Userland/Libraries/LibWeb/WebAssembly/WebAssemblyObject.cpp') diff --git a/Userland/Libraries/LibWeb/WebAssembly/WebAssemblyObject.cpp b/Userland/Libraries/LibWeb/WebAssembly/WebAssemblyObject.cpp index 51e21fbdde..1c4b72c4c2 100644 --- a/Userland/Libraries/LibWeb/WebAssembly/WebAssemblyObject.cpp +++ b/Userland/Libraries/LibWeb/WebAssembly/WebAssemblyObject.cpp @@ -87,7 +87,7 @@ void WebAssemblyObject::visit_edges(Visitor& visitor) } } -JS_DEFINE_NATIVE_FUNCTION(WebAssemblyObject::validate) +JS_DEFINE_OLD_NATIVE_FUNCTION(WebAssemblyObject::validate) { // FIXME: Implement this once module validation is implemented in LibWasm. dbgln("Hit WebAssemblyObject::validate() stub!"); @@ -127,7 +127,7 @@ Result parse_module(JS::GlobalObject& global_object, JS::Obje return WebAssemblyObject::s_compiled_modules.size() - 1; } -JS_DEFINE_NATIVE_FUNCTION(WebAssemblyObject::compile) +JS_DEFINE_OLD_NATIVE_FUNCTION(WebAssemblyObject::compile) { // FIXME: This shouldn't block! auto buffer_or_error = vm.argument(0).to_object(global_object); @@ -308,7 +308,7 @@ Result WebAssemblyObject::instantiate_module(Wasm::Module con return s_instantiated_modules.size() - 1; } -JS_DEFINE_NATIVE_FUNCTION(WebAssemblyObject::instantiate) +JS_DEFINE_OLD_NATIVE_FUNCTION(WebAssemblyObject::instantiate) { // FIXME: This shouldn't block! auto buffer_or_error = vm.argument(0).to_object(global_object); -- cgit v1.2.3