Open
Bug 1609434
Opened 4 years ago
Updated 2 years ago
Support iterating during eager evaluation
Categories
(DevTools :: Console, enhancement, P2)
DevTools
Console
Tracking
(Not tracked)
NEW
People
(Reporter: bhackett1024, Unassigned)
References
(Blocks 1 open bug)
Details
The native functions called during iterations like "[...someSet.values()]" are not permitted by the native call filtering done during eager eager evaluations. I tried to handle these as part of bug 1607608 but not very hard, and it would be nice to follow up and allow these.
Updated•4 years ago
|
Priority: -- → P3
Comment 1•4 years ago
•
|
||
I can cover
- %ArrayIteratorPrototype%.next with
new Array()[Symbol.iterator]().next
- %IteratorPrototype% [ @@iterator ] with
function*(){}()[Symbol.iterator]
- %MapIteratorPrototype%.next with
new Map()[Symbol.iterator]().next
- %RegExpStringIteratorPrototype%.next with
new RegExp()[Symbol.matchAll]().next
- %SetIteratorPrototype%.next with
new Set()[Symbol.iterator]().next
- %StringIteratorPrototype%.next with
""[Symbol.iterator]().next
- AsyncGenerator.prototype.next with
async function*(){}().next
- Generator.prototype.next with
function*(){}().next
- String.prototype [ @@iterator ] with
...allProperties(String.prototype)
These are already covered:
- Array.prototype [ @@iterator ] (by
Array.prototype.values
) - %TypedArray% [ @@iterator ] (by
Int8Array.prototype.values
) - Map.prototype [ @@iterator ] (by
Map.prototype.entries
) - Set.prototype [ @@iterator ] (by
Set.prototype.values
)
No idea about
Assignee: nobody → oriol-bugzilla
Status: NEW → ASSIGNED
Comment 2•4 years ago
|
||
I realized that I can't just whitelist the next()
iterator methods, because they have side-effects in general:
var it = [1,2,3].values();
it.next(); // { value: 1, done: false }
it.next(); // { value: 2, done: false }
So they should only be allowed if the iterator has been created during the eager evaluation.
This is similar to Object.assign({}, {a:1})
where Object.assign
should be usually prevented but here it would be fine.
I don't know how to address this, unassigning myself.
Assignee: oriol-bugzilla → nobody
Status: ASSIGNED → NEW
Updated•4 years ago
|
Priority: P3 → P2
Updated•2 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•