LibJS: Don't coerce this value in %IteratorPrototype%[@@iterator]
Another day, another mistake that's been there for a long time but would've been immediately obvious when adding spec comments. :^)
This commit is contained in:
parent
ee1379520a
commit
472ff7a6d4
Notes:
sideshowbarker
2024-07-17 11:43:45 +09:00
1 changed files with 2 additions and 1 deletions
|
@ -27,7 +27,8 @@ void IteratorPrototype::initialize(GlobalObject& global_object)
|
|||
// 27.1.2.1 %IteratorPrototype% [ @@iterator ] ( ), https://tc39.es/ecma262/#sec-%iteratorprototype%-@@iterator
|
||||
JS_DEFINE_NATIVE_FUNCTION(IteratorPrototype::symbol_iterator)
|
||||
{
|
||||
return TRY(vm.this_value(global_object).to_object(global_object));
|
||||
// 1. Return the this value.
|
||||
return vm.this_value(global_object);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue