mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 15:48:12 +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
|
@ -40,7 +40,7 @@ ThrowCompletionOr<void> JSONObject::initialize(Realm& realm)
|
|||
define_native_function(realm, vm.names.parse, parse, 2, attr);
|
||||
|
||||
// 25.5.3 JSON [ @@toStringTag ], https://tc39.es/ecma262/#sec-json-@@tostringtag
|
||||
define_direct_property(*vm.well_known_symbol_to_string_tag(), MUST_OR_THROW_OOM(PrimitiveString::create(vm, "JSON"sv)), Attribute::Configurable);
|
||||
define_direct_property(vm.well_known_symbol_to_string_tag(), MUST_OR_THROW_OOM(PrimitiveString::create(vm, "JSON"sv)), Attribute::Configurable);
|
||||
|
||||
return {};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue