Skip to content

Commit

Permalink
LibJS: Make well-known symbol getters return NonnullGCPtr
Browse files Browse the repository at this point in the history
None of these are ever null after the VM has been initialized, as proved
by virtually every caller immediately dereferencing the raw pointer.
  • Loading branch information
linusg committed Apr 13, 2023
1 parent b84f8fb commit 2555d7a
Show file tree
Hide file tree
Showing 78 changed files with 122 additions and 121 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -887,7 +887,7 @@ static void generate_to_cpp(SourceGenerator& generator, ParameterType& parameter
if (!@js_name@@[email protected]_object())
return vm.throw_completion<JS::TypeError>(JS::ErrorType::NotAnObject, TRY_OR_THROW_OOM(vm, @js_name@@[email protected]_string_without_side_effects()));
auto* iterator_method@recursion_depth@ = TRY(@js_name@@[email protected]_method(vm, *vm.well_known_symbol_iterator()));
auto* iterator_method@recursion_depth@ = TRY(@js_name@@[email protected]_method(vm, vm.well_known_symbol_iterator()));
if (!iterator_method@recursion_depth@)
return vm.throw_completion<JS::TypeError>(JS::ErrorType::NotIterable, TRY_OR_THROW_OOM(vm, @js_name@@[email protected]_string_without_side_effects()));
)~~~");
Expand Down Expand Up @@ -1169,7 +1169,7 @@ static void generate_to_cpp(SourceGenerator& generator, ParameterType& parameter
if (sequence_type) {
// 1. Let method be ? GetMethod(V, @@iterator).
union_generator.append(R"~~~(
auto* method = TRY(@js_name@@[email protected]_method(vm, *vm.well_known_symbol_iterator()));
auto* method = TRY(@js_name@@[email protected]_method(vm, vm.well_known_symbol_iterator()));
)~~~");

// 2. If method is not undefined, return the result of creating a sequence of that type from V and method.
Expand Down Expand Up @@ -2602,7 +2602,7 @@ JS::ThrowCompletionOr<void> @class_name@::initialize(JS::Realm& realm)
if (interface.indexed_property_getter.has_value()) {
auto iterator_generator = generator.fork();
iterator_generator.append(R"~~~(
define_direct_property(*vm.well_known_symbol_iterator(), realm.intrinsics().array_prototype()->get_without_side_effects(vm.names.values), JS::Attribute::Configurable | JS::Attribute::Writable);
define_direct_property(vm.well_known_symbol_iterator(), realm.intrinsics().array_prototype()->get_without_side_effects(vm.names.values), JS::Attribute::Configurable | JS::Attribute::Writable);
)~~~");

if (interface.value_iterator_type.has_value()) {
Expand All @@ -2625,18 +2625,18 @@ JS::ThrowCompletionOr<void> @class_name@::initialize(JS::Realm& realm)
define_native_function(realm, vm.names.keys, keys, 0, default_attributes);
define_native_function(realm, vm.names.values, values, 0, default_attributes);
define_direct_property(*vm.well_known_symbol_iterator(), get_without_side_effects(vm.names.entries), JS::Attribute::Configurable | JS::Attribute::Writable);
define_direct_property(vm.well_known_symbol_iterator(), get_without_side_effects(vm.names.entries), JS::Attribute::Configurable | JS::Attribute::Writable);
)~~~");
}

if (interface.has_unscopable_member) {
generator.append(R"~~~(
define_direct_property(*vm.well_known_symbol_unscopables(), unscopable_object, JS::Attribute::Configurable);
define_direct_property(vm.well_known_symbol_unscopables(), unscopable_object, JS::Attribute::Configurable);
)~~~");
}

generator.append(R"~~~(
define_direct_property(*vm.well_known_symbol_to_string_tag(), MUST_OR_THROW_OOM(JS::PrimitiveString::create(vm, "@namespaced_name@"sv)), JS::Attribute::Configurable);
define_direct_property(vm.well_known_symbol_to_string_tag(), MUST_OR_THROW_OOM(JS::PrimitiveString::create(vm, "@namespaced_name@"sv)), JS::Attribute::Configurable);
)~~~");

if (!is_global_interface) {
Expand Down Expand Up @@ -3835,7 +3835,7 @@ JS::ThrowCompletionOr<void> @prototype_class@::initialize(JS::Realm& realm)
MUST_OR_THROW_OOM(Base::initialize(realm));
define_native_function(realm, vm.names.next, next, 0, JS::Attribute::Writable | JS::Attribute::Enumerable | JS::Attribute::Configurable);
define_direct_property(*vm.well_known_symbol_to_string_tag(), MUST_OR_THROW_OOM(JS::PrimitiveString::create(vm, "Iterator"sv)), JS::Attribute::Configurable);
define_direct_property(vm.well_known_symbol_to_string_tag(), MUST_OR_THROW_OOM(JS::PrimitiveString::create(vm, "Iterator"sv)), JS::Attribute::Configurable);
return {};
}
Expand Down
8 changes: 4 additions & 4 deletions Userland/Libraries/LibJS/Runtime/AbstractOperations.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ ThrowCompletionOr<FunctionObject*> species_constructor(VM& vm, Object const& obj
return vm.throw_completion<TypeError>(ErrorType::NotAConstructor, TRY_OR_THROW_OOM(vm, constructor.to_string_without_side_effects()));

// 4. Let S be ? Get(C, @@species).
auto species = TRY(constructor.as_object().get(*vm.well_known_symbol_species()));
auto species = TRY(constructor.as_object().get(vm.well_known_symbol_species()));

// 5. If S is either undefined or null, return defaultConstructor.
if (species.is_nullish())
Expand Down Expand Up @@ -1076,7 +1076,7 @@ Object* create_unmapped_arguments_object(VM& vm, Span<Value> arguments)

// 7. Perform ! DefinePropertyOrThrow(obj, @@iterator, PropertyDescriptor { [[Value]]: %Array.prototype.values%, [[Writable]]: true, [[Enumerable]]: false, [[Configurable]]: true }).
auto array_prototype_values = realm.intrinsics().array_prototype_values_function();
MUST(object->define_property_or_throw(*vm.well_known_symbol_iterator(), { .value = array_prototype_values, .writable = true, .enumerable = false, .configurable = true }));
MUST(object->define_property_or_throw(vm.well_known_symbol_iterator(), { .value = array_prototype_values, .writable = true, .enumerable = false, .configurable = true }));

// 8. Perform ! DefinePropertyOrThrow(obj, "callee", PropertyDescriptor { [[Get]]: %ThrowTypeError%, [[Set]]: %ThrowTypeError%, [[Enumerable]]: false, [[Configurable]]: false }).
auto throw_type_error = realm.intrinsics().throw_type_error_function();
Expand Down Expand Up @@ -1159,7 +1159,7 @@ Object* create_mapped_arguments_object(VM& vm, FunctionObject& function, Vector<

// 20. Perform ! DefinePropertyOrThrow(obj, @@iterator, PropertyDescriptor { [[Value]]: %Array.prototype.values%, [[Writable]]: true, [[Enumerable]]: false, [[Configurable]]: true }).
auto array_prototype_values = realm.intrinsics().array_prototype_values_function();
MUST(object->define_property_or_throw(*vm.well_known_symbol_iterator(), { .value = array_prototype_values, .writable = true, .enumerable = false, .configurable = true }));
MUST(object->define_property_or_throw(vm.well_known_symbol_iterator(), { .value = array_prototype_values, .writable = true, .enumerable = false, .configurable = true }));

// 21. Perform ! DefinePropertyOrThrow(obj, "callee", PropertyDescriptor { [[Value]]: func, [[Writable]]: true, [[Enumerable]]: false, [[Configurable]]: true }).
MUST(object->define_property_or_throw(vm.names.callee, { .value = &function, .writable = true, .enumerable = false, .configurable = true }));
Expand Down Expand Up @@ -1401,7 +1401,7 @@ ThrowCompletionOr<GCPtr<FunctionObject>> get_dispose_method(VM& vm, Value value,

// 2. Else,
// a. Let method be ? GetMethod(V, @@dispose).
return GCPtr<FunctionObject> { TRY(value.get_method(vm, *vm.well_known_symbol_dispose())) };
return GCPtr<FunctionObject> { TRY(value.get_method(vm, vm.well_known_symbol_dispose())) };
}

// 2.1.5 Dispose ( V, hint, method ), https://tc39.es/proposal-explicit-resource-management/#sec-dispose
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
2 changes: 1 addition & 1 deletion Userland/Libraries/LibJS/Runtime/ArrayBufferPrototype.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ ThrowCompletionOr<void> ArrayBufferPrototype::initialize(Realm& realm)
define_native_accessor(realm, vm.names.byteLength, byte_length_getter, {}, Attribute::Configurable);

// 25.1.5.4 ArrayBuffer.prototype [ @@toStringTag ], https://tc39.es/ecma262/#sec-arraybuffer.prototype-@@tostringtag
define_direct_property(*vm.well_known_symbol_to_string_tag(), PrimitiveString::create(vm, vm.names.ArrayBuffer.as_string()), Attribute::Configurable);
define_direct_property(vm.well_known_symbol_to_string_tag(), PrimitiveString::create(vm, vm.names.ArrayBuffer.as_string()), Attribute::Configurable);

return {};
}
Expand Down
4 changes: 2 additions & 2 deletions Userland/Libraries/LibJS/Runtime/ArrayConstructor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ ThrowCompletionOr<void> ArrayConstructor::initialize(Realm& realm)
define_native_function(realm, vm.names.of, of, 0, attr);

// 23.1.2.5 get Array [ @@species ], https://tc39.es/ecma262/#sec-get-array-@@species
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);

Expand Down Expand Up @@ -155,7 +155,7 @@ JS_DEFINE_NATIVE_FUNCTION(ArrayConstructor::from)
}

// 4. Let usingIterator be ? GetMethod(items, @@iterator).
auto using_iterator = TRY(items.get_method(vm, *vm.well_known_symbol_iterator()));
auto using_iterator = TRY(items.get_method(vm, vm.well_known_symbol_iterator()));

// 5. If usingIterator is not undefined, then
if (using_iterator) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ ThrowCompletionOr<void> ArrayIteratorPrototype::initialize(Realm& realm)
define_native_function(realm, vm.names.next, next, 0, Attribute::Configurable | Attribute::Writable);

// 23.1.5.2.2 %ArrayIteratorPrototype% [ @@toStringTag ], https://tc39.es/ecma262/#sec-%arrayiteratorprototype%-@@tostringtag
define_direct_property(*vm.well_known_symbol_to_string_tag(), MUST_OR_THROW_OOM(PrimitiveString::create(vm, "Array Iterator"sv)), Attribute::Configurable);
define_direct_property(vm.well_known_symbol_to_string_tag(), MUST_OR_THROW_OOM(PrimitiveString::create(vm, "Array Iterator"sv)), Attribute::Configurable);

return {};
}
Expand Down
8 changes: 4 additions & 4 deletions Userland/Libraries/LibJS/Runtime/ArrayPrototype.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ ThrowCompletionOr<void> ArrayPrototype::initialize(Realm& realm)
// Object.is(Array.prototype[Symbol.iterator], Array.prototype.values)
// evaluates to true
// 23.1.3.40 Array.prototype [ @@iterator ] ( ), https://tc39.es/ecma262/#sec-array.prototype-@@iterator
define_direct_property(*vm.well_known_symbol_iterator(), get_without_side_effects(vm.names.values), attr);
define_direct_property(vm.well_known_symbol_iterator(), get_without_side_effects(vm.names.values), attr);

// 23.1.3.41 Array.prototype [ @@unscopables ], https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
// With array grouping proposal, https://tc39.es/proposal-array-grouping/#sec-array.prototype-@@unscopables
Expand All @@ -108,7 +108,7 @@ ThrowCompletionOr<void> ArrayPrototype::initialize(Realm& realm)
MUST(unscopable_list->create_data_property_or_throw(vm.names.toSpliced, Value(true)));
MUST(unscopable_list->create_data_property_or_throw(vm.names.values, Value(true)));

define_direct_property(*vm.well_known_symbol_unscopables(), unscopable_list, Attribute::Configurable);
define_direct_property(vm.well_known_symbol_unscopables(), unscopable_list, Attribute::Configurable);

return {};
}
Expand All @@ -135,7 +135,7 @@ static ThrowCompletionOr<Object*> array_species_create(VM& vm, Object& original_
}

if (constructor.is_object()) {
constructor = TRY(constructor.as_object().get(*vm.well_known_symbol_species()));
constructor = TRY(constructor.as_object().get(vm.well_known_symbol_species()));
if (constructor.is_null())
constructor = js_undefined();
}
Expand Down Expand Up @@ -183,7 +183,7 @@ JS_DEFINE_NATIVE_FUNCTION(ArrayPrototype::concat)
if (!val.is_object())
return false;
auto& object = val.as_object();
auto spreadable = TRY(object.get(*vm.well_known_symbol_is_concat_spreadable()));
auto spreadable = TRY(object.get(vm.well_known_symbol_is_concat_spreadable()));
if (!spreadable.is_undefined())
return spreadable.to_boolean();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ ThrowCompletionOr<void> AsyncFunctionPrototype::initialize(Realm& realm)
MUST_OR_THROW_OOM(Base::initialize(realm));

// 27.7.3.2 AsyncFunction.prototype [ @@toStringTag ], https://tc39.es/ecma262/#sec-async-function-prototype-properties-toStringTag
define_direct_property(*vm.well_known_symbol_to_string_tag(), PrimitiveString::create(vm, vm.names.AsyncFunction.as_string()), Attribute::Configurable);
define_direct_property(vm.well_known_symbol_to_string_tag(), PrimitiveString::create(vm, vm.names.AsyncFunction.as_string()), Attribute::Configurable);

return {};
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ ThrowCompletionOr<void> AsyncGeneratorFunctionPrototype::initialize(Realm& realm
define_direct_property(vm.names.prototype, realm.intrinsics().async_generator_prototype(), Attribute::Configurable);

// 27.4.3.3 AsyncGeneratorFunction.prototype [ @@toStringTag ], https://tc39.es/ecma262/#sec-asyncgeneratorfunction-prototype-tostringtag
define_direct_property(*vm.well_known_symbol_to_string_tag(), PrimitiveString::create(vm, vm.names.AsyncGeneratorFunction.as_string()), Attribute::Configurable);
define_direct_property(vm.well_known_symbol_to_string_tag(), PrimitiveString::create(vm, vm.names.AsyncGeneratorFunction.as_string()), Attribute::Configurable);

return {};
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ ThrowCompletionOr<void> AsyncGeneratorPrototype::initialize(Realm& realm)
MUST_OR_THROW_OOM(Base::initialize(realm));

// 27.6.1.5 AsyncGenerator.prototype [ @@toStringTag ], https://tc39.es/ecma262/#sec-asyncgenerator-prototype-tostringtag
define_direct_property(*vm.well_known_symbol_to_string_tag(), MUST_OR_THROW_OOM(PrimitiveString::create(vm, "AsyncGenerator"sv)), Attribute::Configurable);
define_direct_property(vm.well_known_symbol_to_string_tag(), MUST_OR_THROW_OOM(PrimitiveString::create(vm, "AsyncGenerator"sv)), Attribute::Configurable);

return {};
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ ThrowCompletionOr<void> AsyncIteratorPrototype::initialize(Realm& realm)
auto& vm = this->vm();
MUST_OR_THROW_OOM(Base::initialize(realm));
u8 attr = Attribute::Writable | Attribute::Configurable;
define_native_function(realm, *vm.well_known_symbol_async_iterator(), symbol_async_iterator, 0, attr);
define_native_function(realm, vm.well_known_symbol_async_iterator(), symbol_async_iterator, 0, attr);

return {};
}
Expand Down
2 changes: 1 addition & 1 deletion Userland/Libraries/LibJS/Runtime/AtomicsObject.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ ThrowCompletionOr<void> AtomicsObject::initialize(Realm& realm)
define_native_function(realm, vm.names.xor_, xor_, 3, attr);

// 25.4.15 Atomics [ @@toStringTag ], https://tc39.es/ecma262/#sec-atomics-@@tostringtag
define_direct_property(*vm.well_known_symbol_to_string_tag(), MUST_OR_THROW_OOM(PrimitiveString::create(vm, "Atomics"sv)), Attribute::Configurable);
define_direct_property(vm.well_known_symbol_to_string_tag(), MUST_OR_THROW_OOM(PrimitiveString::create(vm, "Atomics"sv)), Attribute::Configurable);

return {};
}
Expand Down
2 changes: 1 addition & 1 deletion Userland/Libraries/LibJS/Runtime/BigIntPrototype.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ ThrowCompletionOr<void> BigIntPrototype::initialize(Realm& realm)
define_native_function(realm, vm.names.valueOf, value_of, 0, attr);

// 21.2.3.5 BigInt.prototype [ @@toStringTag ], https://tc39.es/ecma262/#sec-bigint.prototype-@@tostringtag
define_direct_property(*vm.well_known_symbol_to_string_tag(), PrimitiveString::create(vm, vm.names.BigInt.as_string()), Attribute::Configurable);
define_direct_property(vm.well_known_symbol_to_string_tag(), PrimitiveString::create(vm, vm.names.BigInt.as_string()), Attribute::Configurable);

return {};
}
Expand Down
2 changes: 1 addition & 1 deletion Userland/Libraries/LibJS/Runtime/DataViewPrototype.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ ThrowCompletionOr<void> DataViewPrototype::initialize(Realm& realm)
define_native_accessor(realm, vm.names.byteOffset, byte_offset_getter, {}, Attribute::Configurable);

// 25.3.4.25 DataView.prototype [ @@toStringTag ], https://tc39.es/ecma262/#sec-dataview.prototype-@@tostringtag
define_direct_property(*vm.well_known_symbol_to_string_tag(), PrimitiveString::create(vm, vm.names.DataView.as_string()), Attribute::Configurable);
define_direct_property(vm.well_known_symbol_to_string_tag(), PrimitiveString::create(vm, vm.names.DataView.as_string()), Attribute::Configurable);

return {};
}
Expand Down
2 changes: 1 addition & 1 deletion Userland/Libraries/LibJS/Runtime/DatePrototype.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ ThrowCompletionOr<void> DatePrototype::initialize(Realm& realm)
define_native_function(realm, vm.names.setYear, set_year, 1, attr);

// 21.4.4.45 Date.prototype [ @@toPrimitive ] ( hint ), https://tc39.es/ecma262/#sec-date.prototype-@@toprimitive
define_native_function(realm, *vm.well_known_symbol_to_primitive(), symbol_to_primitive, 1, Attribute::Configurable);
define_native_function(realm, vm.well_known_symbol_to_primitive(), symbol_to_primitive, 1, Attribute::Configurable);

// Aliases.
define_native_function(realm, vm.names.valueOf, get_time, 0, attr);
Expand Down
4 changes: 2 additions & 2 deletions Userland/Libraries/LibJS/Runtime/DisposableStackPrototype.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@ ThrowCompletionOr<void> DisposableStackPrototype::initialize(Realm& realm)
define_native_function(realm, vm.names.move, move_, 0, attr);

// 11.3.3.7 DisposableStack.prototype [ @@dispose ] (), https://tc39.es/proposal-explicit-resource-management/#sec-disposablestack.prototype-@@dispose
define_direct_property(*vm.well_known_symbol_dispose(), get_without_side_effects(vm.names.dispose), attr);
define_direct_property(vm.well_known_symbol_dispose(), get_without_side_effects(vm.names.dispose), attr);

// 11.3.3.8 DisposableStack.prototype [ @@toStringTag ], https://tc39.es/proposal-explicit-resource-management/#sec-disposablestack.prototype-@@toStringTag
define_direct_property(*vm.well_known_symbol_to_string_tag(), PrimitiveString::create(vm, vm.names.DisposableStack.as_string()), Attribute::Configurable);
define_direct_property(vm.well_known_symbol_to_string_tag(), PrimitiveString::create(vm, vm.names.DisposableStack.as_string()), Attribute::Configurable);

return {};
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ ThrowCompletionOr<void> FinalizationRegistryPrototype::initialize(Realm& realm)
define_native_function(realm, vm.names.unregister, unregister, 1, attr);

// 26.2.3.4 FinalizationRegistry.prototype [ @@toStringTag ], https://tc39.es/ecma262/#sec-finalization-registry.prototype-@@tostringtag
define_direct_property(*vm.well_known_symbol_to_string_tag(), PrimitiveString::create(vm, vm.names.FinalizationRegistry.as_string()), Attribute::Configurable);
define_direct_property(vm.well_known_symbol_to_string_tag(), PrimitiveString::create(vm, vm.names.FinalizationRegistry.as_string()), Attribute::Configurable);

return {};
}
Expand Down
2 changes: 1 addition & 1 deletion Userland/Libraries/LibJS/Runtime/FunctionPrototype.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ ThrowCompletionOr<void> FunctionPrototype::initialize(Realm& realm)
define_native_function(realm, vm.names.bind, bind, 1, attr);
define_native_function(realm, vm.names.call, call, 1, attr);
define_native_function(realm, vm.names.toString, to_string, 0, attr);
define_native_function(realm, *vm.well_known_symbol_has_instance(), symbol_has_instance, 1, 0);
define_native_function(realm, vm.well_known_symbol_has_instance(), symbol_has_instance, 1, 0);
define_direct_property(vm.names.length, Value(0), Attribute::Configurable);
define_direct_property(vm.names.name, PrimitiveString::create(vm, String {}), Attribute::Configurable);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ ThrowCompletionOr<void> GeneratorFunctionPrototype::initialize(Realm& realm)
// 27.3.3.2 GeneratorFunction.prototype.prototype, https://tc39.es/ecma262/#sec-generatorfunction.prototype.prototype
define_direct_property(vm.names.prototype, realm.intrinsics().generator_prototype(), Attribute::Configurable);
// 27.3.3.3 GeneratorFunction.prototype [ @@toStringTag ], https://tc39.es/ecma262/#sec-generatorfunction.prototype-@@tostringtag
define_direct_property(*vm.well_known_symbol_to_string_tag(), MUST_OR_THROW_OOM(PrimitiveString::create(vm, "GeneratorFunction"sv)), Attribute::Configurable);
define_direct_property(vm.well_known_symbol_to_string_tag(), MUST_OR_THROW_OOM(PrimitiveString::create(vm, "GeneratorFunction"sv)), Attribute::Configurable);

return {};
}
Expand Down
Loading

0 comments on commit 2555d7a

Please sign in to comment.