mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 20:28:11 +00:00
LibJS: Change PropertyName(Symbol*) => PropertyName(Symbol&)
Requires a bunch of find-and-replace updates across LibJS, but constructing a PropertyName from a nullptr Symbol* should not be possible - let's enforce this at the compiler level instead of using VERIFY() (and already dereference Symbol pointers at the call site).
This commit is contained in:
parent
3d5340d033
commit
f4867572b7
40 changed files with 59 additions and 57 deletions
|
@ -112,7 +112,7 @@ Function* species_constructor(GlobalObject& global_object, Object const& object,
|
|||
vm.throw_exception<TypeError>(global_object, ErrorType::NotAConstructor, constructor.to_string_without_side_effects());
|
||||
return nullptr;
|
||||
}
|
||||
auto species = constructor.as_object().get(vm.well_known_symbol_species()).value_or(js_undefined());
|
||||
auto species = constructor.as_object().get(*vm.well_known_symbol_species()).value_or(js_undefined());
|
||||
if (species.is_nullish())
|
||||
return &default_constructor;
|
||||
if (species.is_constructor())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue