diff options
author | Olivier Goffart <ogoffart@trolltech.com> | 2009-07-22 14:48:39 (GMT) |
---|---|---|
committer | Olivier Goffart <ogoffart@trolltech.com> | 2009-07-22 14:48:39 (GMT) |
commit | 1d92e9a243dfdd84483a978e50f1cee6d5f44159 (patch) | |
tree | 945b2bb50fa51056af25c19642eaa4a59d0e6378 /src/3rdparty/webkit/JavaScriptCore | |
parent | d6c6ac356d2e5dc6af1b368c89124143b161fc4e (diff) | |
download | Qt-1d92e9a243dfdd84483a978e50f1cee6d5f44159.zip Qt-1d92e9a243dfdd84483a978e50f1cee6d5f44159.tar.gz Qt-1d92e9a243dfdd84483a978e50f1cee6d5f44159.tar.bz2 |
JSC: toString report correct error message
Diffstat (limited to 'src/3rdparty/webkit/JavaScriptCore')
-rw-r--r-- | src/3rdparty/webkit/JavaScriptCore/runtime/FunctionPrototype.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/3rdparty/webkit/JavaScriptCore/runtime/FunctionPrototype.cpp b/src/3rdparty/webkit/JavaScriptCore/runtime/FunctionPrototype.cpp index 9ba2144..ff8e57b 100644 --- a/src/3rdparty/webkit/JavaScriptCore/runtime/FunctionPrototype.cpp +++ b/src/3rdparty/webkit/JavaScriptCore/runtime/FunctionPrototype.cpp @@ -98,7 +98,11 @@ JSValue JSC_HOST_CALL functionProtoFuncToString(ExecState* exec, JSObject*, JSVa return jsString(exec, "function " + function->name(&exec->globalData()) + "() {\n [native code]\n}"); } +#ifdef QT_BUILD_SCRIPT_LIB //same error message as in the old engine, and in mozilla + return throwError(exec, TypeError, "Function.prototype.toString called on incompatible object"); +#else return throwError(exec, TypeError); +#endif } JSValue JSC_HOST_CALL functionProtoFuncApply(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) |