LibJS: Make PrimitiveString::deprecated_string() infallible

Work towards #20449.
This commit is contained in:
Andreas Kling 2023-08-08 19:30:07 +02:00
parent c084269e5f
commit 09547ec975
Notes: sideshowbarker 2024-07-16 20:08:14 +09:00
17 changed files with 42 additions and 43 deletions

View file

@ -20,7 +20,7 @@ ThrowCompletionOr<Value> IsHTMLDDA::call()
auto& vm = this->vm();
if (vm.argument_count() == 0)
return js_null();
if (vm.argument(0).is_string() && TRY(vm.argument(0).as_string().deprecated_string()).is_empty())
if (vm.argument(0).is_string() && vm.argument(0).as_string().is_empty())
return js_null();
// Not sure if this really matters, INTERPRETING.md simply says:
// * IsHTMLDDA - (present only in implementations that can provide it) an object that: