1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 22:57:44 +00:00

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.
This commit is contained in:
Idan Horowitz 2021-10-19 20:18:01 +03:00 committed by Linus Groh
parent 3355b52cca
commit 20163c0584
180 changed files with 1478 additions and 1472 deletions

View file

@ -96,7 +96,7 @@ Value PlainDateTimeConstructor::construct(FunctionObject& new_target)
}
// 5.2.2 Temporal.PlainDateTime.from ( item [ , options ] ), https://tc39.es/proposal-temporal/#sec-temporal.plaindatetime.from
JS_DEFINE_NATIVE_FUNCTION(PlainDateTimeConstructor::from)
JS_DEFINE_OLD_NATIVE_FUNCTION(PlainDateTimeConstructor::from)
{
auto item = vm.argument(0);
@ -119,7 +119,7 @@ JS_DEFINE_NATIVE_FUNCTION(PlainDateTimeConstructor::from)
}
// 5.2.3 Temporal.PlainDateTime.compare ( one, two ), https://tc39.es/proposal-temporal/#sec-temporal.plaindatetime.compare
JS_DEFINE_NATIVE_FUNCTION(PlainDateTimeConstructor::compare)
JS_DEFINE_OLD_NATIVE_FUNCTION(PlainDateTimeConstructor::compare)
{
// 1. Set one to ? ToTemporalDateTime(one).
auto* one = TRY_OR_DISCARD(to_temporal_date_time(global_object, vm.argument(0)));