mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-29 12:19:54 +00:00
LbJS: Convert exception-related usages of Value::TDSWOSE to String
TDSWOSE being to_deprecated_string_without_side_effects.
This commit is contained in:
parent
3ffb6d9b5a
commit
a73b8292ed
Notes:
sideshowbarker
2024-07-18 08:59:31 +09:00
Author: https://github.com/trflynn89
Commit: a73b8292ed
Pull-request: https://github.com/SerenityOS/serenity/pull/17461
Reviewed-by: https://github.com/linusg
47 changed files with 125 additions and 123 deletions
|
@ -53,7 +53,7 @@ ThrowCompletionOr<void> Reference::put_value(VM& vm, Value value)
|
|||
|
||||
// d. If succeeded is false and V.[[Strict]] is true, throw a TypeError exception.
|
||||
if (!succeeded && m_strict)
|
||||
return vm.throw_completion<TypeError>(ErrorType::ReferenceNullishSetProperty, m_name, m_base_value.to_deprecated_string_without_side_effects());
|
||||
return vm.throw_completion<TypeError>(ErrorType::ReferenceNullishSetProperty, m_name, TRY_OR_THROW_OOM(vm, m_base_value.to_string_without_side_effects()));
|
||||
|
||||
// e. Return unused.
|
||||
return {};
|
||||
|
@ -178,7 +178,7 @@ ThrowCompletionOr<bool> Reference::delete_(VM& vm)
|
|||
|
||||
// e. If deleteStatus is false and ref.[[Strict]] is true, throw a TypeError exception.
|
||||
if (!delete_status && m_strict)
|
||||
return vm.throw_completion<TypeError>(ErrorType::ReferenceNullishDeleteProperty, m_name, m_base_value.to_deprecated_string_without_side_effects());
|
||||
return vm.throw_completion<TypeError>(ErrorType::ReferenceNullishDeleteProperty, m_name, TRY_OR_THROW_OOM(vm, m_base_value.to_string_without_side_effects()));
|
||||
|
||||
// f. Return deleteStatus.
|
||||
return delete_status;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue