diff options
author | Idan Horowitz <idan.horowitz@gmail.com> | 2021-10-19 20:18:01 +0300 |
---|---|---|
committer | Linus Groh <mail@linusgroh.de> | 2021-10-20 12:27:19 +0100 |
commit | 20163c058485dc524402c46f21bbe65a860bf9c5 (patch) | |
tree | 35e6942b65f8138ee073efcec6dae987d9ab0377 /Userland/Libraries/LibJS/Runtime/ArrayConstructor.cpp | |
parent | 3355b52cca1e1a8478ea5dbbd193120af4c83ca6 (diff) | |
download | serenity-20163c058485dc524402c46f21bbe65a860bf9c5.zip |
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.
Diffstat (limited to 'Userland/Libraries/LibJS/Runtime/ArrayConstructor.cpp')
-rw-r--r-- | Userland/Libraries/LibJS/Runtime/ArrayConstructor.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Userland/Libraries/LibJS/Runtime/ArrayConstructor.cpp b/Userland/Libraries/LibJS/Runtime/ArrayConstructor.cpp index d8567e2c97..f50c2e207e 100644 --- a/Userland/Libraries/LibJS/Runtime/ArrayConstructor.cpp +++ b/Userland/Libraries/LibJS/Runtime/ArrayConstructor.cpp @@ -89,7 +89,7 @@ Value ArrayConstructor::construct(FunctionObject& new_target) } // 23.1.2.1 Array.from ( items [ , mapfn [ , thisArg ] ] ), https://tc39.es/ecma262/#sec-array.from -JS_DEFINE_NATIVE_FUNCTION(ArrayConstructor::from) +JS_DEFINE_OLD_NATIVE_FUNCTION(ArrayConstructor::from) { auto constructor = vm.this_value(global_object); @@ -200,14 +200,14 @@ JS_DEFINE_NATIVE_FUNCTION(ArrayConstructor::from) } // 23.1.2.2 Array.isArray ( arg ), https://tc39.es/ecma262/#sec-array.isarray -JS_DEFINE_NATIVE_FUNCTION(ArrayConstructor::is_array) +JS_DEFINE_OLD_NATIVE_FUNCTION(ArrayConstructor::is_array) { auto value = vm.argument(0); return Value(TRY_OR_DISCARD(value.is_array(global_object))); } // 23.1.2.3 Array.of ( ...items ), https://tc39.es/ecma262/#sec-array.of -JS_DEFINE_NATIVE_FUNCTION(ArrayConstructor::of) +JS_DEFINE_OLD_NATIVE_FUNCTION(ArrayConstructor::of) { auto this_value = vm.this_value(global_object); Value array; @@ -230,7 +230,7 @@ JS_DEFINE_NATIVE_FUNCTION(ArrayConstructor::of) } // 23.1.2.5 get Array [ @@species ], https://tc39.es/ecma262/#sec-get-array-@@species -JS_DEFINE_NATIVE_FUNCTION(ArrayConstructor::symbol_species_getter) +JS_DEFINE_OLD_NATIVE_FUNCTION(ArrayConstructor::symbol_species_getter) { return vm.this_value(global_object); } |