michael@0: function whoo() { michael@0: (new Object()).foo() michael@0: } michael@0: Object.prototype.foo = function() { return undefined }; michael@0: whoo(); michael@0: Object.prototype.foo = undefined; michael@0: gc(); michael@0: try { michael@0: whoo(); michael@0: assertEq(0, 1); michael@0: } catch(e) { michael@0: assertEq(e instanceof TypeError, true); michael@0: }