This is mainly for Adam, so he can fix it in his jsdom.cpp. I'll fix it
in jsdom.c on the master branch shortly.
Here's a fragment of the documentation for JS_EvaluateScript:
If a script compiles and executes successfully,
JS_EvaluateScript or JS_EvaluateUCScript stores the result in *rval,
if non-null, and returns JS_TRUE. Otherwise it returns JS_FALSE and the value
left in *rval is undefined.
Here's what we do, from line 1089 of jsdom.c on master:
ok = JS_EvaluateScript(jcx, this, str, strlen(str),
filename, lineno, &rval);
rc = eb_true;
if(JSVAL_IS_BOOLEAN(rval))
rc = JSVAL_TO_BOOLEAN(rval);
We never check "ok". If "ok" is false, the contents of rval shouldn't
be used, since they are undefined.
-- Chris
_______________________________________________
Edbrowse-dev mailing list
[email protected]
http://lists.the-brannons.com/mailman/listinfo/edbrowse-dev