diff options
author | Timothy Flynn <trflynn89@pm.me> | 2023-02-12 20:38:28 -0500 |
---|---|---|
committer | Linus Groh <mail@linusgroh.de> | 2023-02-16 14:32:22 +0100 |
commit | b245300ba132ea3bce21c82ea585ce8ea85cca40 (patch) | |
tree | 3fc95ce9b306dac23d3486eeabc60bb9a53c57cc /Meta | |
parent | 7fc7d4f8c642d776488a52758e428b33fd8e6693 (diff) | |
download | serenity-b245300ba132ea3bce21c82ea585ce8ea85cca40.zip |
LibJS+Everywhere: Deprecate Value::to_string_without_side_effects
Diffstat (limited to 'Meta')
-rw-r--r-- | Meta/Lagom/Tools/CodeGenerators/LibWeb/BindingsGenerator/IDLGenerators.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/Meta/Lagom/Tools/CodeGenerators/LibWeb/BindingsGenerator/IDLGenerators.cpp b/Meta/Lagom/Tools/CodeGenerators/LibWeb/BindingsGenerator/IDLGenerators.cpp index 4fd30cc2f1..3810f56fd1 100644 --- a/Meta/Lagom/Tools/CodeGenerators/LibWeb/BindingsGenerator/IDLGenerators.cpp +++ b/Meta/Lagom/Tools/CodeGenerators/LibWeb/BindingsGenerator/IDLGenerators.cpp @@ -325,7 +325,7 @@ static void generate_to_cpp(SourceGenerator& generator, ParameterType& parameter @cpp_type@* @cpp_name@ = nullptr; if (!@js_name@@js_suffix@.is_nullish()) { if (!@js_name@@js_suffix@.is_object()) - return vm.throw_completion<JS::TypeError>(JS::ErrorType::NotAnObject, @js_name@@js_suffix@.to_string_without_side_effects()); + return vm.throw_completion<JS::TypeError>(JS::ErrorType::NotAnObject, @js_name@@js_suffix@.to_deprecated_string_without_side_effects()); auto callback_type = vm.heap().allocate_without_realm<WebIDL::CallbackType>(@js_name@@js_suffix@.as_object(), HTML::incumbent_settings_object()); @cpp_name@ = @cpp_type@::create(realm, *callback_type).ptr(); @@ -334,7 +334,7 @@ static void generate_to_cpp(SourceGenerator& generator, ParameterType& parameter } else { scoped_generator.append(R"~~~( if (!@js_name@@js_suffix@.is_object()) - return vm.throw_completion<JS::TypeError>(JS::ErrorType::NotAnObject, @js_name@@js_suffix@.to_string_without_side_effects()); + return vm.throw_completion<JS::TypeError>(JS::ErrorType::NotAnObject, @js_name@@js_suffix@.to_deprecated_string_without_side_effects()); auto callback_type = vm.heap().allocate_without_realm<WebIDL::CallbackType>(@js_name@@js_suffix@.as_object(), HTML::incumbent_settings_object()); auto @cpp_name@ = adopt_ref(*new @cpp_type@(callback_type)); @@ -692,7 +692,7 @@ static void generate_to_cpp(SourceGenerator& generator, ParameterType& parameter if (!callback_function.is_legacy_treat_non_object_as_null) { callback_function_generator.append(R"~~~( if (!@js_name@@js_suffix@.is_function()) - return vm.throw_completion<JS::TypeError>(JS::ErrorType::NotAFunction, @js_name@@js_suffix@.to_string_without_side_effects()); + return vm.throw_completion<JS::TypeError>(JS::ErrorType::NotAFunction, @js_name@@js_suffix@.to_deprecated_string_without_side_effects()); )~~~"); } // 2. Return the IDL callback function type value that represents a reference to the same object that V represents, with the incumbent settings object as the callback context. @@ -757,11 +757,11 @@ static void generate_to_cpp(SourceGenerator& generator, ParameterType& parameter sequence_generator.append(R"~~~( if (!@js_name@@js_suffix@.is_object()) - return vm.throw_completion<JS::TypeError>(JS::ErrorType::NotAnObject, @js_name@@js_suffix@.to_string_without_side_effects()); + return vm.throw_completion<JS::TypeError>(JS::ErrorType::NotAnObject, @js_name@@js_suffix@.to_deprecated_string_without_side_effects()); auto* iterator_method@recursion_depth@ = TRY(@js_name@@js_suffix@.get_method(vm, *vm.well_known_symbol_iterator())); if (!iterator_method@recursion_depth@) - return vm.throw_completion<JS::TypeError>(JS::ErrorType::NotIterable, @js_name@@js_suffix@.to_string_without_side_effects()); + return vm.throw_completion<JS::TypeError>(JS::ErrorType::NotIterable, @js_name@@js_suffix@.to_deprecated_string_without_side_effects()); )~~~"); parameterized_type.generate_sequence_from_iterable(sequence_generator, DeprecatedString::formatted("{}{}", acceptable_cpp_name, optional ? "_non_optional" : ""), DeprecatedString::formatted("{}{}", js_name, js_suffix), DeprecatedString::formatted("iterator_method{}", recursion_depth), interface, recursion_depth + 1); @@ -806,7 +806,7 @@ static void generate_to_cpp(SourceGenerator& generator, ParameterType& parameter if (recursion_depth == 0) { record_generator.append(R"~~~( if (!@js_name@@js_suffix@.is_object()) - return vm.throw_completion<JS::TypeError>(JS::ErrorType::NotAnObject, @js_name@@js_suffix@.to_string_without_side_effects()); + return vm.throw_completion<JS::TypeError>(JS::ErrorType::NotAnObject, @js_name@@js_suffix@.to_deprecated_string_without_side_effects()); auto& @js_name@@js_suffix@_object = @js_name@@js_suffix@.as_object(); )~~~"); @@ -2764,7 +2764,7 @@ JS_DEFINE_NATIVE_FUNCTION(@prototype_class@::for_each) auto callback = vm.argument(0); if (!callback.is_function()) - return vm.throw_completion<JS::TypeError>(JS::ErrorType::NotAFunction, callback.to_string_without_side_effects()); + return vm.throw_completion<JS::TypeError>(JS::ErrorType::NotAFunction, callback.to_deprecated_string_without_side_effects()); auto this_value = vm.this_value(); TRY(impl->for_each([&](auto key, auto value) -> JS::ThrowCompletionOr<void> { |