1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 10:07:44 +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

@ -65,10 +65,10 @@ public:
void gather_roots(HashTable<Cell*>&);
#define __JS_ENUMERATE(SymbolName, snake_name) \
Symbol* well_known_symbol_##snake_name() const \
{ \
return m_well_known_symbols.snake_name; \
#define __JS_ENUMERATE(SymbolName, snake_name) \
NonnullGCPtr<Symbol> well_known_symbol_##snake_name() const \
{ \
return *m_well_known_symbols.snake_name; \
}
JS_ENUMERATE_WELL_KNOWN_SYMBOLS
#undef __JS_ENUMERATE