mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 01:27:34 +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:
parent
b84f8fb55b
commit
2555d7a36a
78 changed files with 122 additions and 121 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue