michael@0: // Constructing calls must throw if !callee->isInterpretedConstructor(). michael@0: [0].some(Function.prototype) michael@0: function f() { michael@0: new Function.prototype michael@0: } michael@0: function g() { michael@0: var count = 0; michael@0: for (var i=0; i<3; i++) { michael@0: try { michael@0: f(); michael@0: } catch (e) { michael@0: assertEq(e.message.contains("is not a constructor"), true); michael@0: count++; michael@0: } michael@0: } michael@0: assertEq(count, 3); michael@0: } michael@0: g();