Closed Bug 1290637 Opened 8 years ago Closed 7 years ago

Replace in-tree consumer of non-standard Iterator() with Object.{values,entries}

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
Tracking Status
firefox50 --- affected

People

(Reporter: arai, Unassigned)

References

Details

Now Object.values and Object.entries are in tree, and we could replace most of Iterator() call with them, if it's iterating over simple object properties.

not-exhaustive list of possible comsumers:
https://dxr.mozilla.org/mozilla-central/search?q=%22in+Iterator(%22&redirect=false
Required code changes are following:
  * Check each usage of non-standard Iterator function,
    and replace it with Object.entries or Object.values,
    or something appropriate for the specific usage
Depends on: 1290698
I'm going to make this a meta bug.
Mentor: arai.unmht
Depends on: 1290701
Blocks: 881061
Depends on: 1292995
Depends on: 1292998
Depends on: 1292999
Depends on: 1293000
Depends on: 1293002
Depends on: 1293003
Depends on: 1293004
Depends on: 1293005
Depends on: 1293006
Depends on: 1293007
Depends on: 1293008
I want to take up this bug, I am a newbie please guide me.
This is a meta bug to track depending bugs.
currently the following 4 bugs are not assigned:
  * bug 1293004
  * bug 1293005
  * bug 1293006
  * bug 1293008
Depends on: 1303700
Hello! I would like to take this up. Can you please assign it to me? :)
Flags: needinfo?(arai.unmht)
This is a metabug, and this will be fixed when all depending bugs are fixed.
nothing should be done here.
Flags: needinfo?(arai.unmht)
So, Can we look at it after the other depending bugs are fixed? or no need to look at this at all?
Flags: needinfo?(arai.unmht)
I'll just close this bug when all depending bugs are fixed.
everything should be done for Iterator is separated into each depending bugs, for each directory.
Flags: needinfo?(arai.unmht)
I've just been looking at some no-undef issues from eslint. It looks like there's quite a few places where StopIteration is still used and possibly expected to be valid, even though the code has changed:

https://dxr.mozilla.org/mozilla-central/search?q=StopIteration+file%3A*.js&redirect=false

Not sure if that should be included in this bug, or needs a separate one.
(In reply to Mark Banner (:standard8) from comment #10)
> I've just been looking at some no-undef issues from eslint. It looks like
> there's quite a few places where StopIteration is still used and possibly
> expected to be valid, even though the code has changed:
> 
> https://dxr.mozilla.org/mozilla-central/search?q=StopIteration+file%3A*.
> js&redirect=false
> 
> Not sure if that should be included in this bug, or needs a separate one.

Thanks!
StopIteration is part of legacy generator, that should be handled in bug 968038 and depending bugs.
All already-resolved bugs there have targeted on legacy generator itself, so there will be several overlooked StopIteration references.
Might be better waiting for remaining legacy generator consumers to be removed, before removing StopIteration.
Depends on: 1337872
Depends on: 1340923
Depends on: 1340924
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.