mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 21:58:12 +00:00
LibJS: Convert to_string() to ThrowCompletionOr
Also update get_function_name() to use ThrowCompletionOr, but this is not a standard AO and should be refactored out of existence eventually.
This commit is contained in:
parent
5d38cf4973
commit
4d8912a92b
48 changed files with 171 additions and 415 deletions
|
@ -48,9 +48,7 @@ JS::ThrowCompletionOr<bool> CSSStyleDeclarationWrapper::internal_set(JS::Propert
|
|||
if (property_id == CSS::PropertyID::Invalid)
|
||||
return Base::internal_set(name, value, receiver);
|
||||
|
||||
auto css_text = value.to_string(global_object());
|
||||
if (auto* exception = vm().exception())
|
||||
return JS::throw_completion(exception->value());
|
||||
auto css_text = TRY(value.to_string(global_object()));
|
||||
|
||||
impl().set_property(property_id, css_text);
|
||||
return true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue