diff options
author | Idan Horowitz <idan.horowitz@gmail.com> | 2021-10-20 01:40:40 +0300 |
---|---|---|
committer | Linus Groh <mail@linusgroh.de> | 2021-10-20 12:27:19 +0100 |
commit | 40eb3a39d41fe0c3242b586da9cf7e4ce2fcbf13 (patch) | |
tree | a2512e65916d2bebcb71c6dd07b11fb1929b17c8 /Userland/Libraries/LibJS/Runtime/Intl | |
parent | ca27e5eff56ebdaf7f990296c6429f1b3afaa057 (diff) | |
download | serenity-40eb3a39d41fe0c3242b586da9cf7e4ce2fcbf13.zip |
LibJS: Rename define_native_function => define_old_native_function
This method will eventually be removed once all native functions are
converted to ThrowCompletionOr
Diffstat (limited to 'Userland/Libraries/LibJS/Runtime/Intl')
8 files changed, 23 insertions, 23 deletions
diff --git a/Userland/Libraries/LibJS/Runtime/Intl/DisplayNamesConstructor.cpp b/Userland/Libraries/LibJS/Runtime/Intl/DisplayNamesConstructor.cpp index 8173906c3a..c2a7b28140 100644 --- a/Userland/Libraries/LibJS/Runtime/Intl/DisplayNamesConstructor.cpp +++ b/Userland/Libraries/LibJS/Runtime/Intl/DisplayNamesConstructor.cpp @@ -31,7 +31,7 @@ void DisplayNamesConstructor::initialize(GlobalObject& global_object) define_direct_property(vm.names.prototype, global_object.intl_display_names_prototype(), 0); u8 attr = Attribute::Writable | Attribute::Configurable; - define_native_function(vm.names.supportedLocalesOf, supported_locales_of, 1, attr); + define_old_native_function(vm.names.supportedLocalesOf, supported_locales_of, 1, attr); define_direct_property(vm.names.length, Value(2), Attribute::Configurable); } diff --git a/Userland/Libraries/LibJS/Runtime/Intl/DisplayNamesPrototype.cpp b/Userland/Libraries/LibJS/Runtime/Intl/DisplayNamesPrototype.cpp index c1df84148c..cb0d0f63d8 100644 --- a/Userland/Libraries/LibJS/Runtime/Intl/DisplayNamesPrototype.cpp +++ b/Userland/Libraries/LibJS/Runtime/Intl/DisplayNamesPrototype.cpp @@ -28,8 +28,8 @@ void DisplayNamesPrototype::initialize(GlobalObject& global_object) define_direct_property(*vm.well_known_symbol_to_string_tag(), js_string(vm, "Intl.DisplayNames"), Attribute::Configurable); u8 attr = Attribute::Writable | Attribute::Configurable; - define_native_function(vm.names.of, of, 1, attr); - define_native_function(vm.names.resolvedOptions, resolved_options, 0, attr); + define_old_native_function(vm.names.of, of, 1, attr); + define_old_native_function(vm.names.resolvedOptions, resolved_options, 0, attr); } // 12.4.3 Intl.DisplayNames.prototype.of ( code ), https://tc39.es/ecma402/#sec-Intl.DisplayNames.prototype.of diff --git a/Userland/Libraries/LibJS/Runtime/Intl/Intl.cpp b/Userland/Libraries/LibJS/Runtime/Intl/Intl.cpp index 7a90ec5b67..7550dbcdde 100644 --- a/Userland/Libraries/LibJS/Runtime/Intl/Intl.cpp +++ b/Userland/Libraries/LibJS/Runtime/Intl/Intl.cpp @@ -36,7 +36,7 @@ void Intl::initialize(GlobalObject& global_object) define_direct_property(vm.names.Locale, global_object.intl_locale_constructor(), attr); define_direct_property(vm.names.NumberFormat, global_object.intl_number_format_constructor(), attr); - define_native_function(vm.names.getCanonicalLocales, get_canonical_locales, 1, attr); + define_old_native_function(vm.names.getCanonicalLocales, get_canonical_locales, 1, attr); } // 8.3.1 Intl.getCanonicalLocales ( locales ), https://tc39.es/ecma402/#sec-intl.getcanonicallocales diff --git a/Userland/Libraries/LibJS/Runtime/Intl/ListFormatConstructor.cpp b/Userland/Libraries/LibJS/Runtime/Intl/ListFormatConstructor.cpp index 0e1280f8e6..35d6f5cc5e 100644 --- a/Userland/Libraries/LibJS/Runtime/Intl/ListFormatConstructor.cpp +++ b/Userland/Libraries/LibJS/Runtime/Intl/ListFormatConstructor.cpp @@ -30,7 +30,7 @@ void ListFormatConstructor::initialize(GlobalObject& global_object) define_direct_property(vm.names.prototype, global_object.intl_list_format_prototype(), 0); u8 attr = Attribute::Writable | Attribute::Configurable; - define_native_function(vm.names.supportedLocalesOf, supported_locales_of, 1, attr); + define_old_native_function(vm.names.supportedLocalesOf, supported_locales_of, 1, attr); define_direct_property(vm.names.length, Value(0), Attribute::Configurable); } diff --git a/Userland/Libraries/LibJS/Runtime/Intl/ListFormatPrototype.cpp b/Userland/Libraries/LibJS/Runtime/Intl/ListFormatPrototype.cpp index 6d2cc4a38d..b42ab39d6f 100644 --- a/Userland/Libraries/LibJS/Runtime/Intl/ListFormatPrototype.cpp +++ b/Userland/Libraries/LibJS/Runtime/Intl/ListFormatPrototype.cpp @@ -28,9 +28,9 @@ void ListFormatPrototype::initialize(GlobalObject& global_object) define_direct_property(*vm.well_known_symbol_to_string_tag(), js_string(vm, "Intl.ListFormat"), Attribute::Configurable); u8 attr = Attribute::Writable | Attribute::Configurable; - define_native_function(vm.names.format, format, 1, attr); - define_native_function(vm.names.formatToParts, format_to_parts, 1, attr); - define_native_function(vm.names.resolvedOptions, resolved_options, 0, attr); + define_old_native_function(vm.names.format, format, 1, attr); + define_old_native_function(vm.names.formatToParts, format_to_parts, 1, attr); + define_old_native_function(vm.names.resolvedOptions, resolved_options, 0, attr); } // 13.4.3 Intl.ListFormat.prototype.format ( list ), https://tc39.es/ecma402/#sec-Intl.ListFormat.prototype.format diff --git a/Userland/Libraries/LibJS/Runtime/Intl/LocalePrototype.cpp b/Userland/Libraries/LibJS/Runtime/Intl/LocalePrototype.cpp index 2174270ed7..fe9cf756f2 100644 --- a/Userland/Libraries/LibJS/Runtime/Intl/LocalePrototype.cpp +++ b/Userland/Libraries/LibJS/Runtime/Intl/LocalePrototype.cpp @@ -25,23 +25,23 @@ void LocalePrototype::initialize(GlobalObject& global_object) auto& vm = this->vm(); u8 attr = Attribute::Writable | Attribute::Configurable; - define_native_function(vm.names.maximize, maximize, 0, attr); - define_native_function(vm.names.minimize, minimize, 0, attr); - define_native_function(vm.names.toString, to_string, 0, attr); + define_old_native_function(vm.names.maximize, maximize, 0, attr); + define_old_native_function(vm.names.minimize, minimize, 0, attr); + define_old_native_function(vm.names.toString, to_string, 0, attr); // 14.3.2 Intl.Locale.prototype[ @@toStringTag ], https://tc39.es/ecma402/#sec-Intl.Locale.prototype-@@tostringtag define_direct_property(*vm.well_known_symbol_to_string_tag(), js_string(vm, "Intl.Locale"), Attribute::Configurable); - define_native_accessor(vm.names.baseName, base_name, {}, Attribute::Configurable); - define_native_accessor(vm.names.calendar, calendar, {}, Attribute::Configurable); - define_native_accessor(vm.names.caseFirst, case_first, {}, Attribute::Configurable); - define_native_accessor(vm.names.collation, collation, {}, Attribute::Configurable); - define_native_accessor(vm.names.hourCycle, hour_cycle, {}, Attribute::Configurable); - define_native_accessor(vm.names.numberingSystem, numbering_system, {}, Attribute::Configurable); - define_native_accessor(vm.names.numeric, numeric, {}, Attribute::Configurable); - define_native_accessor(vm.names.language, language, {}, Attribute::Configurable); - define_native_accessor(vm.names.script, script, {}, Attribute::Configurable); - define_native_accessor(vm.names.region, region, {}, Attribute::Configurable); + define_old_native_accessor(vm.names.baseName, base_name, {}, Attribute::Configurable); + define_old_native_accessor(vm.names.calendar, calendar, {}, Attribute::Configurable); + define_old_native_accessor(vm.names.caseFirst, case_first, {}, Attribute::Configurable); + define_old_native_accessor(vm.names.collation, collation, {}, Attribute::Configurable); + define_old_native_accessor(vm.names.hourCycle, hour_cycle, {}, Attribute::Configurable); + define_old_native_accessor(vm.names.numberingSystem, numbering_system, {}, Attribute::Configurable); + define_old_native_accessor(vm.names.numeric, numeric, {}, Attribute::Configurable); + define_old_native_accessor(vm.names.language, language, {}, Attribute::Configurable); + define_old_native_accessor(vm.names.script, script, {}, Attribute::Configurable); + define_old_native_accessor(vm.names.region, region, {}, Attribute::Configurable); } // 14.3.3 Intl.Locale.prototype.maximize ( ), https://tc39.es/ecma402/#sec-Intl.Locale.prototype.maximize diff --git a/Userland/Libraries/LibJS/Runtime/Intl/NumberFormatConstructor.cpp b/Userland/Libraries/LibJS/Runtime/Intl/NumberFormatConstructor.cpp index d3377998aa..76e9f6bab7 100644 --- a/Userland/Libraries/LibJS/Runtime/Intl/NumberFormatConstructor.cpp +++ b/Userland/Libraries/LibJS/Runtime/Intl/NumberFormatConstructor.cpp @@ -29,7 +29,7 @@ void NumberFormatConstructor::initialize(GlobalObject& global_object) define_direct_property(vm.names.prototype, global_object.intl_number_format_prototype(), 0); u8 attr = Attribute::Writable | Attribute::Configurable; - define_native_function(vm.names.supportedLocalesOf, supported_locales_of, 1, attr); + define_old_native_function(vm.names.supportedLocalesOf, supported_locales_of, 1, attr); define_direct_property(vm.names.length, Value(0), Attribute::Configurable); } diff --git a/Userland/Libraries/LibJS/Runtime/Intl/NumberFormatPrototype.cpp b/Userland/Libraries/LibJS/Runtime/Intl/NumberFormatPrototype.cpp index 4bb3653ebd..bdb3c9cae7 100644 --- a/Userland/Libraries/LibJS/Runtime/Intl/NumberFormatPrototype.cpp +++ b/Userland/Libraries/LibJS/Runtime/Intl/NumberFormatPrototype.cpp @@ -27,7 +27,7 @@ void NumberFormatPrototype::initialize(GlobalObject& global_object) define_direct_property(*vm.well_known_symbol_to_string_tag(), js_string(vm, "Intl.NumberFormat"), Attribute::Configurable); u8 attr = Attribute::Writable | Attribute::Configurable; - define_native_function(vm.names.resolvedOptions, resolved_options, 0, attr); + define_old_native_function(vm.names.resolvedOptions, resolved_options, 0, attr); } // 15.4.5 Intl.NumberFormat.prototype.resolvedOptions ( ), https://tc39.es/ecma402/#sec-intl.numberformat.prototype.resolvedoptions |