<p>
	This test verifies that execution terminates after a not-a-function exception is thrown. In particular,
	it verifies that the engine doesn't restart execution through a custom toString() function.
</p>

<pre id="console"></pre>

<script>
if (window.testRunner)
	testRunner.dumpAsText();

function log(s)
{
	document.getElementById("console").appendChild(document.createTextNode(s + "\n"));
}

try {
	var o = {
		toString: function() { log("FAIL: toString was called."); },
		valueOf: function() { log("FAIL: valueOf was called."); }
	};

	o();
} catch(e) { }

log("PASS: Test complete.");
</script>
