summaryrefslogtreecommitdiff
path: root/Userland
diff options
context:
space:
mode:
authorIdan Horowitz <idan.horowitz@gmail.com>2021-10-29 00:13:55 +0300
committerIdan Horowitz <idan.horowitz@gmail.com>2021-10-29 21:29:24 +0300
commit4128f95903435114cfba93dadcdaeabf44780037 (patch)
tree53b78de775294592b590011df9ec1bf155d14c16 /Userland
parentac856cb96541f8165bbadbd4530b3d1ee7ed4395 (diff)
downloadserenity-4128f95903435114cfba93dadcdaeabf44780037.zip
LibJS: Convert BigIntConstructor functions to ThrowCompletionOr
Diffstat (limited to 'Userland')
-rw-r--r--Userland/Libraries/LibJS/Runtime/BigIntConstructor.cpp8
-rw-r--r--Userland/Libraries/LibJS/Runtime/BigIntConstructor.h4
2 files changed, 6 insertions, 6 deletions
diff --git a/Userland/Libraries/LibJS/Runtime/BigIntConstructor.cpp b/Userland/Libraries/LibJS/Runtime/BigIntConstructor.cpp
index 8f818e8468..9ae52c2abd 100644
--- a/Userland/Libraries/LibJS/Runtime/BigIntConstructor.cpp
+++ b/Userland/Libraries/LibJS/Runtime/BigIntConstructor.cpp
@@ -29,8 +29,8 @@ void BigIntConstructor::initialize(GlobalObject& global_object)
// TODO: Implement these functions below and uncomment this.
// u8 attr = Attribute::Writable | Attribute::Configurable;
- // define_old_native_function(vm.names.asIntN, as_int_n, 2, attr);
- // define_old_native_function(vm.names.asUintN, as_uint_n, 2, attr);
+ // define_native_function(vm.names.asIntN, as_int_n, 2, attr);
+ // define_native_function(vm.names.asUintN, as_uint_n, 2, attr);
define_direct_property(vm.names.length, Value(1), Attribute::Configurable);
}
@@ -65,13 +65,13 @@ ThrowCompletionOr<Object*> BigIntConstructor::construct(FunctionObject&)
}
// 21.2.2.1 BigInt.asIntN ( bits, bigint ), https://tc39.es/ecma262/#sec-bigint.asintn
-JS_DEFINE_OLD_NATIVE_FUNCTION(BigIntConstructor::as_int_n)
+JS_DEFINE_NATIVE_FUNCTION(BigIntConstructor::as_int_n)
{
TODO();
}
// 21.2.2.2 BigInt.asUintN ( bits, bigint ), https://tc39.es/ecma262/#sec-bigint.asuintn
-JS_DEFINE_OLD_NATIVE_FUNCTION(BigIntConstructor::as_uint_n)
+JS_DEFINE_NATIVE_FUNCTION(BigIntConstructor::as_uint_n)
{
TODO();
}
diff --git a/Userland/Libraries/LibJS/Runtime/BigIntConstructor.h b/Userland/Libraries/LibJS/Runtime/BigIntConstructor.h
index 190f5d6c5f..7ac55cb55c 100644
--- a/Userland/Libraries/LibJS/Runtime/BigIntConstructor.h
+++ b/Userland/Libraries/LibJS/Runtime/BigIntConstructor.h
@@ -24,8 +24,8 @@ public:
private:
virtual bool has_constructor() const override { return true; }
- JS_DECLARE_OLD_NATIVE_FUNCTION(as_int_n);
- JS_DECLARE_OLD_NATIVE_FUNCTION(as_uint_n);
+ JS_DECLARE_NATIVE_FUNCTION(as_int_n);
+ JS_DECLARE_NATIVE_FUNCTION(as_uint_n);
};
}