Closed Bug 862849 Opened 10 years ago Closed 9 years ago

remove __iterator__ use from the devtools


(DevTools :: Object Inspector, defect)

Not set


(Not tracked)

Firefox 28


(Reporter: bbenvie, Assigned: bbenvie)



(Whiteboard: [qa-])


(1 file, 2 obsolete files)

All of these set their `__iterator__` property. The iterator protocol has been changed so that for-of looks for the `iterator` property.
So upon further inspection, this was partially my error. I didn't realize `__iterator__` worked with for-in, versus `iterator` which works with for-of. However, we should still eventually upgrade all the iterators to use for-of anyway so this bug still stands.
Attached patch WIP1 (obsolete) — Splinter Review
Assignee: nobody → bbenvie
Component: Developer Tools → Developer Tools: Object Inspector
Blocks: 887895
Summary: Scope, Variable, etc. VariablesView need to change to updated iterator protocol → remove __iterator__ use from the devtools
Version: 21 Branch → Trunk
Attached patch bug-862849.patch (obsolete) — Splinter Review
Depends on delegating yield to non-generator iterators which has landed on mozilla-inbound but hasn't propagated to fx-team yet. Should be good to go tomorrow. Here's a try that uses a slightly modified version that doesn't use delegating yield:
Attachment #747057 - Attachment is obsolete: true
Attached patch bug-862849.patchSplinter Review
Fixes the webconsole failures. Also switches to legacy generators since apparently ES6 ones are being disabled for now (bug 918083). They're still better than using __iterator__ though, since you only have to make slight changes to the generator function itself in order to update to the new version, rather than find all the places where "in" needs to be changed to "of" (as I did in this patch).
Attachment #818768 - Attachment is obsolete: true
Attachment #819173 - Flags: review?(vporof)
Attachment #819173 - Flags: review?(vporof) → review+
I think I'll need to wait until 28 for this to land. The problem is that bug 918083 will remove handling for ES6 generators in 27, but hasn't landed yet. However, the updated iteration protocol is still being used which is only compatible with new generators. TLDR the version of this patch with ES6 generators can land when we switch to 28, so I'll just hold off until then.
Closed: 9 years ago
Resolution: --- → FIXED
Whiteboard: [fixed-in-fx-team]
Target Milestone: --- → Firefox 28
Whiteboard: [qa-]
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.