mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 02:37:36 +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
|
@ -49,9 +49,7 @@ Value CalendarConstructor::construct(FunctionObject& new_target)
|
|||
auto& global_object = this->global_object();
|
||||
|
||||
// 2. Set id to ? ToString(id).
|
||||
auto identifier = vm.argument(0).to_string(global_object);
|
||||
if (vm.exception())
|
||||
return {};
|
||||
auto identifier = TRY_OR_DISCARD(vm.argument(0).to_string(global_object));
|
||||
|
||||
// 3. If ! IsBuiltinCalendar(id) is false, then
|
||||
if (!is_builtin_calendar(identifier)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue