Bug 957: Assert that the ECMAScript interpreter is not running.
commit13b1d2694664e470153c4f456dfc6fb5fc5a31db
authorKalle Olavi Niemitalo <kon@iki.fi>
Thu, 21 Jun 2007 18:34:36 +0000 (21 21:34 +0300)
committerKalle Olavi Niemitalo <Kalle@Astalo.kon.iki.fi>
Mon, 2 Jul 2007 19:21:33 +0000 (2 22:21 +0300)
treedecccb74092f522c4c68b67a2fd0995994127b55
parent0cf60aefb53b813597fc948434019f18c08e8db8
Bug 957: Assert that the ECMAScript interpreter is not running.

Add ecmascript_interpreter.backend_nesting, increment it when
beginning to evaluate an expression, and decrement it when evaluation
finishes.  Then assert that it is zero in ecmascript_put_interpreter.
This detects bug 957 and similar ones before they corrupt memory.

[ Backported from commit 58e3ebf2e70bf228ab741a39bcaf99e61b0ffb3a in
  ELinks 0.12.GIT.  --KON ]
src/ecmascript/ecmascript.c
src/ecmascript/ecmascript.h