mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-05 06:32:30 +02:00
LibJS: Convert SymbolObject::create() to NonnullGCPtr
This commit is contained in:
Notes:
sideshowbarker
2024-07-17 03:16:33 +09:00
Author: https://github.com/linusg Commit: https://github.com/SerenityOS/serenity/commit/dd3d133968 Pull-request: https://github.com/SerenityOS/serenity/pull/16479 Reviewed-by: https://github.com/davidot ✅
@@ -10,9 +10,9 @@
|
||||
|
||||
namespace JS {
|
||||
|
||||
SymbolObject* SymbolObject::create(Realm& realm, Symbol& primitive_symbol)
|
||||
NonnullGCPtr<SymbolObject> SymbolObject::create(Realm& realm, Symbol& primitive_symbol)
|
||||
{
|
||||
return realm.heap().allocate<SymbolObject>(realm, primitive_symbol, *realm.intrinsics().symbol_prototype());
|
||||
return *realm.heap().allocate<SymbolObject>(realm, primitive_symbol, *realm.intrinsics().symbol_prototype());
|
||||
}
|
||||
|
||||
SymbolObject::SymbolObject(Symbol& symbol, Object& prototype)
|
||||
|
||||
Reference in New Issue
Block a user