We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 4cbc329 + 1ae4fd2 commit 8a9e718Copy full SHA for 8a9e718
common/content/util.js
@@ -408,9 +408,15 @@ const Util = Module("util", {
408
409
if (services.get("vc").compare(Application.version, "33") >= 0
410
&& Cu.isXrayWrapper(result)) {
411
- let (xr = result, s = asIterator ? "iterateNext" : "snapshotItem") {
412
- result = Object.create(xr);
413
- result[s] = xr[s].bind(xr);
+ let xr = result;
+
+ if (asIterator) {
414
+ result = { iterateNext: function iterateNext() xr.iterateNext()};
415
+ } else {
416
+ result = {
417
+ snapshotItem: function snapshotItem(num) xr.snapshotItem(num),
418
+ get snapshotLength() xr.snapshotLength,
419
+ };
420
}
421
422
0 commit comments