mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-03-09 04:25:38 +00:00
Bug 921448 - Use callability rather than object classes when determining how to toSource(). r=ejpbruel
This commit is contained in:
parent
bab206627b
commit
27836d4cb9
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user