Closed Bug 607131 Opened 9 years ago Closed 9 years ago

test-collection tests fail with exception "[object StopIteration]"

Categories

(Add-on SDK Graveyard :: General, defect)

x86
Linux
defect
Not set

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: myk, Unassigned)

References

Details

On trunk, test-collection tests fail with the bizarre-looking exception "[object StopIteration]" (just that, nothing else).

Collection iterators are defined like this:

  this.__iterator__ = function Collection___iterator__() {
    let items = array.slice();
    for (let i = 0; i < items.length; i++)
      yield items[i];
  };

And used like this:

  for (let item in coll) {
    test.assertEqual(item, array[numItems], "Items should be equal");
    numItems++;
  }

Bug 606573 could be related, not sure.

Mardak: what do you think?
(In reply to comment #0)
> Bug 606573 could be related, not sure.
> Mardak: what do you think?

mrbkap or gal probably know better. My bug was about Iterator(), but one comment included "Also freeze StopIteration and StopIteration.prototype" so this may be related.
Hmm, the tests all work with the latest tracemonkey branch build.
peterv thinks this is caused by bug 606573, so setting dependency accordingly.
Depends on: 606573
Indeed, this seems to have been fixed by the landing of the fix for bug 606573.
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
The Add-on SDK is no longer a Mozilla Labs experiment and has become a big enough project to warrant its own Bugzilla product, so the "Add-on SDK" product has been created for it, and I am moving its bugs to that product.

To filter bugmail related to this change, filter on the word "looptid".
Component: Jetpack SDK → General
Product: Mozilla Labs → Add-on SDK
QA Contact: jetpack-sdk → general
You need to log in before you can comment on or make changes to this bug.