js_TryMethod suppresses 'too much recursion' exception, going in circles indefinitely (bug 547086, r=mrbkap).

This commit is contained in:
Andreas Gal 2010-02-19 17:34:32 -08:00
parent 4934b15e9e
commit 8afa0aa3fe

View File

@ -6395,9 +6395,9 @@ js_TryMethod(JSContext *cx, JSObject *obj, JSAtom *atom,
id = ATOM_TO_JSID(atom);
fval = JSVAL_VOID;
ok = js_GetMethod(cx, obj, id, JSGET_NO_METHOD_BARRIER, &fval);
if (!ok)
JS_ClearPendingException(cx);
JS_SetErrorReporter(cx, older);
if (!ok)
return false;
if (JSVAL_IS_PRIMITIVE(fval))
return JS_TRUE;