michael@0: // Any copyright is dedicated to the Public Domain. michael@0: // http://creativecommons.org/licenses/publicdomain/ michael@0: michael@0: // See bug 627984, comment 17, item 1. michael@0: var obj; michael@0: var methods = []; michael@0: for (var i = 0; i < 2; i++) { michael@0: obj = {m: function () { return this.x; }}; michael@0: obj.watch("m", function (id, oldval, newval) { methods[i] = oldval; }); michael@0: obj.m = 0; michael@0: } michael@0: assertEq(typeof methods[0], "function"); michael@0: assertEq(typeof methods[1], "function"); michael@0: assertEq(methods[0] !== methods[1], true); michael@0: michael@0: reportCompare(0, 0, 'ok');