michael@0: // Any copyright is dedicated to the Public Domain. michael@0: // http://creativecommons.org/licenses/publicdomain/ michael@0: michael@0: // Don't write string value to method slot. michael@0: // See bug 627984, comment 17, item 2. michael@0: var obj = {}; michael@0: obj.watch("m", function (id, oldval, newval) { michael@0: return 'ok'; michael@0: }); michael@0: delete obj.m; michael@0: obj.m = function () { return this.x; }; michael@0: assertEq(obj.m, 'ok'); michael@0: michael@0: reportCompare(0, 0, 'ok');