1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 11:38:11 +00:00

LibJS: Make well-known symbol getters return NonnullGCPtr

None of these are ever null after the VM has been initialized, as proved
by virtually every caller immediately dereferencing the raw pointer.
This commit is contained in:
Linus Groh 2023-04-13 01:14:45 +02:00
parent b84f8fb55b
commit 2555d7a36a
78 changed files with 122 additions and 121 deletions

View file

@ -55,7 +55,7 @@ static JS::ThrowCompletionOr<Vector<String>> convert_value_to_sequence_of_string
return vm.throw_completion<JS::TypeError>(JS::ErrorType::NotAnObject, TRY_OR_THROW_OOM(vm, value.to_string_without_side_effects()));
// 2. Let method be ? GetMethod(V, @@iterator).
auto* method = TRY(value.get_method(vm, *vm.well_known_symbol_iterator()));
auto* method = TRY(value.get_method(vm, vm.well_known_symbol_iterator()));
// 3. If method is undefined, throw a TypeError.
if (!method)