mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-28 10:37:17 +02: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:
Notes:
sideshowbarker
2024-07-17 05:23:40 +09:00
Author: https://github.com/linusg Commit: https://github.com/SerenityOS/serenity/commit/2555d7a36a Pull-request: https://github.com/SerenityOS/serenity/pull/18343 Reviewed-by: https://github.com/trflynn89 ✅
@@ -31,7 +31,7 @@ ThrowCompletionOr<void> ArrayBufferConstructor::initialize(Realm& realm)
|
||||
define_native_function(realm, vm.names.isView, is_view, 1, attr);
|
||||
|
||||
// 25.1.5.4 ArrayBuffer.prototype [ @@toStringTag ], https://tc39.es/ecma262/#sec-arraybuffer.prototype-@@tostringtag
|
||||
define_native_accessor(realm, *vm.well_known_symbol_species(), symbol_species_getter, {}, Attribute::Configurable);
|
||||
define_native_accessor(realm, vm.well_known_symbol_species(), symbol_species_getter, {}, Attribute::Configurable);
|
||||
|
||||
define_direct_property(vm.names.length, Value(1), Attribute::Configurable);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user