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/StringConstructor.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/StringConstructor.cpp')
-rw-r--r-- | Userland/Libraries/LibJS/Runtime/StringConstructor.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Userland/Libraries/LibJS/Runtime/StringConstructor.cpp b/Userland/Libraries/LibJS/Runtime/StringConstructor.cpp index ed77b2adec..c035dab703 100644 --- a/Userland/Libraries/LibJS/Runtime/StringConstructor.cpp +++ b/Userland/Libraries/LibJS/Runtime/StringConstructor.cpp @@ -67,7 +67,7 @@ Value StringConstructor::construct(FunctionObject& new_target) } // 22.1.2.4 String.raw ( template, ...substitutions ), https://tc39.es/ecma262/#sec-string.raw -JS_DEFINE_NATIVE_FUNCTION(StringConstructor::raw) +JS_DEFINE_OLD_NATIVE_FUNCTION(StringConstructor::raw) { auto* cooked = TRY_OR_DISCARD(vm.argument(0).to_object(global_object)); auto raw_value = TRY_OR_DISCARD(cooked->get(vm.names.raw)); @@ -100,7 +100,7 @@ JS_DEFINE_NATIVE_FUNCTION(StringConstructor::raw) } // 22.1.2.1 String.fromCharCode ( ...codeUnits ), https://tc39.es/ecma262/#sec-string.fromcharcode -JS_DEFINE_NATIVE_FUNCTION(StringConstructor::from_char_code) +JS_DEFINE_OLD_NATIVE_FUNCTION(StringConstructor::from_char_code) { Vector<u16, 1> string; string.ensure_capacity(vm.argument_count()); @@ -112,7 +112,7 @@ JS_DEFINE_NATIVE_FUNCTION(StringConstructor::from_char_code) } // 22.1.2.2 String.fromCodePoint ( ...codePoints ), https://tc39.es/ecma262/#sec-string.fromcodepoint -JS_DEFINE_NATIVE_FUNCTION(StringConstructor::from_code_point) +JS_DEFINE_OLD_NATIVE_FUNCTION(StringConstructor::from_code_point) { Vector<u16, 1> string; string.ensure_capacity(vm.argument_count()); // This will be an under-estimate if any code point is > 0xffff. |