michael@0: x = [] michael@0: try { michael@0: (function() { michael@0: schedulegc(1); michael@0: ((function() { michael@0: return { michael@0: y: function() { michael@0: u() = [] michael@0: } michael@0: } michael@0: })()) michael@0: })() michael@0: watch.call(x, "valueOf", function() {}) michael@0: gc() michael@0: } catch (e) { print(e); } michael@0: try { michael@0: (function() { michael@0: x.valueOf = michael@0: (function() { michael@0: y(); michael@0: }) michael@0: })() michael@0: x + 2 michael@0: print('foo') michael@0: } catch (e) { print(e); }