Debian bug 534835: Check some SpiderMonkey return values
commit10c07f9933e148253ecac048e125cc1901de2553
authorKalle Olavi Niemitalo <kon@iki.fi>
Sat, 27 Jun 2009 16:48:56 +0000 (27 19:48 +0300)
committerKalle Olavi Niemitalo <Kalle@Astalo.kon.iki.fi>
Sat, 27 Jun 2009 16:48:56 +0000 (27 19:48 +0300)
treef9053f9ff8761d7ecf390000287fb14e3ece7dbe
parent645e9f22fef4eceecdd9b4f30f2566cd4520a7cd
Debian bug 534835: Check some SpiderMonkey return values

Perhaps because of bug 981, if one opened hundreds of pages with
elinks --remote openURL(...), then ELinks 0.11.4 could crash with a
SIGSEGV in JS_InitClass called from spidermonkey_get_interpreter.
SpiderMonkey ran out of memory and began returning NULL and JS_FALSE
but ELinks didn't notice them and pressed on.  Add some checks to
avoid the crash, although the underlying out-of-memory error remains.
NEWS
src/ecmascript/spidermonkey.c
src/scripting/smjs/elinks_object.c