Closed
Bug 559909
Opened 14 years ago
Closed 14 years ago
Fix iteratorUtils.toArray's NodeList and Iterator checks
Categories
(MailNews Core :: Backend, defect)
MailNews Core
Backend
Tracking
(Not tracked)
RESOLVED
FIXED
Thunderbird 3.3a1
People
(Reporter: bwinton, Assigned: rain1)
References
Details
Attachments
(1 file)
6.35 KB,
patch
|
asuth
:
review+
|
Details | Diff | Splinter Review |
(Yeah, I know, this totally isn't the right place for this bug, but it seemed like the closest thing I could find.) I would like to use the toArray function from mail/base/content/featureConfigurator.js, but NodeList doesn't seem to exist, so it fails with an exception. I tried changing it to Ci.nsIDOMNodeList, but that didn't really help me, because it still returned null for the iterator I passed in. I start with an [xpconnect wrapped nsISupportsArray @ 0x1b4e3530 (native @ 0x1b4e34f0)], pass that to fixIterator, which seems to return me "return { __iterator__: iter };" from line 116 in mailnews/base/util/iteratorUtils.jsm). But, since that doesn't have Iterator.prototype in its prototype chain, the call to "aObj instanceof Iterator" on line 62 fails, and I get null back. At least, I think that's what's happening. Thanks, Blake.
Assignee | ||
Comment 1•14 years ago
|
||
Right, this fixes things. I had to add a hack similar to the one I removed in bug 603192. Oh well, you win some, you lose some.
Comment 2•14 years ago
|
||
Comment on attachment 482150 [details] [diff] [review] patch + tests a most excellent and thorough test; thank you!
Attachment #482150 -
Flags: review?(bugmail) → review+
Assignee | ||
Comment 3•14 years ago
|
||
I'll open a separate bug to fix featureConfigurator.js.
Summary: toArray fails in twice when called from featureConfigurator.js → Fix iteratorUtils.toArray's NodeList and Iterator checks
Assignee | ||
Comment 4•14 years ago
|
||
http://hg.mozilla.org/comm-central/rev/6d7a363afbb9 (I added a couple of extra sanity checks to the test)
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Assignee | ||
Updated•14 years ago
|
Attachment #482150 -
Flags: approval-thunderbird3.2a1?
Assignee | ||
Updated•14 years ago
|
Target Milestone: --- → Thunderbird 3.3a1
Updated•13 years ago
|
Attachment #482150 -
Flags: approval-thunderbird3.2a1?
You need to log in
before you can comment on or make changes to this bug.
Description
•