diff options
author | Timothy Flynn <trflynn89@pm.me> | 2023-02-12 22:05:35 -0500 |
---|---|---|
committer | Linus Groh <mail@linusgroh.de> | 2023-02-16 14:32:22 +0100 |
commit | 527edb55ade3da2db90d4cc8631aa81adc66a6f7 (patch) | |
tree | 37ae50f787f2462261d36a9fb4abb9bd49738845 /Userland/Libraries | |
parent | 24e9cea524e3c81bc8c53ef668cd69990b98b3ec (diff) | |
download | serenity-527edb55ade3da2db90d4cc8631aa81adc66a6f7.zip |
LibWeb: Convert usages of Value::TDSWOSE to Value::TSWOSE
Diffstat (limited to 'Userland/Libraries')
5 files changed, 6 insertions, 6 deletions
diff --git a/Userland/Libraries/LibWeb/Bindings/FetchMethod.cpp b/Userland/Libraries/LibWeb/Bindings/FetchMethod.cpp index ee8f26d3ba..c533cdf488 100644 --- a/Userland/Libraries/LibWeb/Bindings/FetchMethod.cpp +++ b/Userland/Libraries/LibWeb/Bindings/FetchMethod.cpp @@ -172,10 +172,10 @@ JS::ThrowCompletionOr<JS::Value> fetch(JS::VM& vm) break; auto next_item1 = TRY(JS::iterator_value(vm, *next1)); if (!next_item1.is_object()) - return vm.throw_completion<JS::TypeError>(JS::ErrorType::NotAnObject, next_item1.to_deprecated_string_without_side_effects()); + return vm.throw_completion<JS::TypeError>(JS::ErrorType::NotAnObject, TRY_OR_THROW_OOM(vm, next_item1.to_string_without_side_effects())); auto* iterator_method1 = TRY(next_item1.get_method(vm, *vm.well_known_symbol_iterator())); if (!iterator_method1) - return vm.throw_completion<JS::TypeError>(JS::ErrorType::NotIterable, next_item1.to_deprecated_string_without_side_effects()); + return vm.throw_completion<JS::TypeError>(JS::ErrorType::NotIterable, TRY_OR_THROW_OOM(vm, next_item1.to_string_without_side_effects())); auto iterator2 = TRY(JS::get_iterator(vm, next_item1, JS::IteratorHint::Sync, iterator_method1)); Vector<DeprecatedString> sequence_item1; for (;;) { diff --git a/Userland/Libraries/LibWeb/HTML/Scripting/ExceptionReporter.cpp b/Userland/Libraries/LibWeb/HTML/Scripting/ExceptionReporter.cpp index 23e00d0393..db35df95eb 100644 --- a/Userland/Libraries/LibWeb/HTML/Scripting/ExceptionReporter.cpp +++ b/Userland/Libraries/LibWeb/HTML/Scripting/ExceptionReporter.cpp @@ -44,7 +44,7 @@ void report_exception_to_console(JS::Value value, JS::Realm& realm, ErrorInPromi dbgln("\033[31;1mUnhandled JavaScript exception{}:\033[0m {}", error_in_promise == ErrorInPromise::Yes ? " (in promise)" : "", value); } - console.report_exception(*JS::Error::create(realm, value.to_deprecated_string_without_side_effects()), error_in_promise == ErrorInPromise::Yes); + console.report_exception(*JS::Error::create(realm, value.to_string_without_side_effects().release_value_but_fixme_should_propagate_errors().to_deprecated_string()), error_in_promise == ErrorInPromise::Yes); } // https://html.spec.whatwg.org/#report-the-exception diff --git a/Userland/Libraries/LibWeb/HTML/Worker.cpp b/Userland/Libraries/LibWeb/HTML/Worker.cpp index b04a40349a..a430fd579b 100644 --- a/Userland/Libraries/LibWeb/HTML/Worker.cpp +++ b/Userland/Libraries/LibWeb/HTML/Worker.cpp @@ -326,7 +326,7 @@ WebIDL::ExceptionOr<void> Worker::terminate() // https://html.spec.whatwg.org/multipage/workers.html#dom-worker-postmessage void Worker::post_message(JS::Value message, JS::Value) { - dbgln_if(WEB_WORKER_DEBUG, "WebWorker: Post Message: {}", message.to_deprecated_string_without_side_effects()); + dbgln_if(WEB_WORKER_DEBUG, "WebWorker: Post Message: {}", MUST(message.to_string_without_side_effects())); // 1. Let targetPort be the port with which this is entangled, if any; otherwise let it be null. auto& target_port = m_outside_port; diff --git a/Userland/Libraries/LibWeb/WebAssembly/WebAssemblyTableConstructor.cpp b/Userland/Libraries/LibWeb/WebAssembly/WebAssemblyTableConstructor.cpp index 3ac0cf62f4..faa157e564 100644 --- a/Userland/Libraries/LibWeb/WebAssembly/WebAssemblyTableConstructor.cpp +++ b/Userland/Libraries/LibWeb/WebAssembly/WebAssemblyTableConstructor.cpp @@ -34,7 +34,7 @@ JS::ThrowCompletionOr<JS::NonnullGCPtr<JS::Object>> WebAssemblyTableConstructor: auto descriptor = TRY(vm.argument(0).to_object(vm)); auto element_value = TRY(descriptor->get("element")); if (!element_value.is_string()) - return vm.throw_completion<JS::TypeError>(JS::ErrorType::InvalidHint, element_value.to_deprecated_string_without_side_effects()); + return vm.throw_completion<JS::TypeError>(JS::ErrorType::InvalidHint, TRY_OR_THROW_OOM(vm, element_value.to_string_without_side_effects())); auto element = TRY(element_value.as_string().deprecated_string()); Optional<Wasm::ValueType> reference_type; diff --git a/Userland/Libraries/LibWeb/WebIDL/AbstractOperations.h b/Userland/Libraries/LibWeb/WebIDL/AbstractOperations.h index d9e792972a..87e832679b 100644 --- a/Userland/Libraries/LibWeb/WebIDL/AbstractOperations.h +++ b/Userland/Libraries/LibWeb/WebIDL/AbstractOperations.h @@ -88,7 +88,7 @@ JS::Completion call_user_object_operation(WebIDL::CallbackType& callback, Deprec // 4. If ! IsCallable(X) is false, then set completion to a new Completion{[[Type]]: throw, [[Value]]: a newly created TypeError object, [[Target]]: empty}, and jump to the step labeled return. if (!get_result.value().is_function()) { - completion = realm.vm().template throw_completion<JS::TypeError>(JS::ErrorType::NotAFunction, get_result.value().to_deprecated_string_without_side_effects()); + completion = realm.vm().template throw_completion<JS::TypeError>(JS::ErrorType::NotAFunction, TRY_OR_THROW_OOM(realm.vm(), get_result.value().to_string_without_side_effects())); return clean_up_on_return(stored_settings, relevant_settings, completion); } |