Bug 921448 - Use callability rather than object classes when determining how to toSource(). r=ejpbruel

This commit is contained in:
Bobby Holley 2013-10-04 13:29:33 +02:00
parent bab206627b
commit 27836d4cb9

View File

@ -830,7 +830,7 @@ fun_toSource(JSContext *cx, unsigned argc, Value *vp)
return false;
RootedString str(cx);
if (obj->is<JSFunction>() || obj->is<FunctionProxyObject>())
if (obj->isCallable())
str = fun_toStringHelper(cx, obj, JS_DONT_PRETTY_PRINT);
else
str = ObjectToSource(cx, obj);