michael@0: function testWhileObjectOrNull() michael@0: { michael@0: try michael@0: { michael@0: for (var i = 0; i < 3; i++) michael@0: { michael@0: var o = { p: { p: null } }; michael@0: while (o.p) michael@0: o = o.p; michael@0: } michael@0: return "pass"; michael@0: } michael@0: catch (e) michael@0: { michael@0: return "threw exception: " + e; michael@0: } michael@0: } michael@0: assertEq(testWhileObjectOrNull(), "pass");