michael@0: // Array iterators keep the underlying array, arraylike object, or string alive. michael@0: michael@0: load(libdir + "referencesVia.js"); michael@0: load(libdir + "iteration.js"); michael@0: michael@0: function test(obj) { michael@0: var it = Array.prototype[std_iterator].call(obj); michael@0: assertEq(referencesVia(it, "**UNKNOWN SLOT 0**", obj), true); michael@0: } michael@0: michael@0: test([]); michael@0: test([1, 2, 3, 4]); michael@0: test({});