From 3fa5bb5cea1e96d83318abe16bf5f8583ddfe0de Mon Sep 17 00:00:00 2001 From: Kris Maglione Date: Tue, 10 Aug 2010 01:40:58 -0400 Subject: [PATCH] More Gecko 2 fixes. --HG-- branch : testing --- common/content/util.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/common/content/util.js b/common/content/util.js index a328ae20..6f8857be 100644 --- a/common/content/util.js +++ b/common/content/util.js @@ -417,11 +417,12 @@ const Util = Module("util", { null ); - result.__iterator__ = asIterator + return { + __proto__: result, + __iterator__: asIterator ? function () { let elem; while ((elem = this.iterateNext())) yield elem; } - : function () { for (let i = 0; i < this.snapshotLength; i++) yield this.snapshotItem(i); }; - - return result; + : function () { for (let i = 0; i < this.snapshotLength; i++) yield this.snapshotItem(i); } + } }, /**