diff options
Diffstat (limited to 'js/src/proxy/BaseProxyHandler.cpp')
-rw-r--r-- | js/src/proxy/BaseProxyHandler.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/js/src/proxy/BaseProxyHandler.cpp b/js/src/proxy/BaseProxyHandler.cpp index c433e7ace5..6cd526d059 100644 --- a/js/src/proxy/BaseProxyHandler.cpp +++ b/js/src/proxy/BaseProxyHandler.cpp @@ -315,12 +315,13 @@ BaseProxyHandler::className(JSContext* cx, HandleObject proxy) const } JSString* -BaseProxyHandler::fun_toString(JSContext* cx, HandleObject proxy, unsigned indent) const +BaseProxyHandler::fun_toString(JSContext* cx, HandleObject proxy, bool isToSource) const { if (proxy->isCallable()) return JS_NewStringCopyZ(cx, "function () {\n [native code]\n}"); - RootedValue v(cx, ObjectValue(*proxy)); - ReportIsNotFunction(cx, v); + + JS_ReportErrorNumberASCII(cx, GetErrorMessage, nullptr, JSMSG_INCOMPATIBLE_PROTO, + js_Function_str, js_toString_str, "object"); return nullptr; } |