mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-12-08 06:09:58 +00:00
LibWeb: Don't override prototype on generated iterator prototypes
Generated iterator prototypes already have the IteratorPrototype as
their prototype, but we were incorrectly hijacking them and rerouting
to ObjectPrototype.
Regressed in cfe663435e.
This commit is contained in:
parent
3f1cc7125c
commit
7f90b0cab7
Notes:
sideshowbarker
2024-07-17 05:01:20 +09:00
Author: https://github.com/awesomekling
Commit: 7f90b0cab7
Pull-request: https://github.com/SerenityOS/serenity/pull/19304
Reviewed-by: https://github.com/Lubrsi
3 changed files with 19 additions and 19 deletions
|
|
@ -0,0 +1,6 @@
|
|||
[object Iterator]
|
||||
[object Iterator]
|
||||
true
|
||||
hello
|
||||
1
|
||||
[object Window]
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
<script src="include.js"></script>
|
||||
<script>
|
||||
test(() => {
|
||||
let u = new URLSearchParams();
|
||||
let iterator = u[Symbol.iterator]();
|
||||
println(iterator);
|
||||
println(iterator[Symbol.iterator]());
|
||||
println(iterator === iterator[Symbol.iterator]());
|
||||
println(iterator[Symbol.iterator].call("hello"));
|
||||
println(iterator[Symbol.iterator].call(1));
|
||||
println(iterator[Symbol.iterator].call(window));
|
||||
});
|
||||
</script>
|
||||
Loading…
Add table
Add a link
Reference in a new issue