diff options
author | Kent Hansen <khansen@trolltech.com> | 2009-07-30 12:56:05 (GMT) |
---|---|---|
committer | Kent Hansen <khansen@trolltech.com> | 2009-07-30 13:03:36 (GMT) |
commit | 854e71d1335c7d3c2f1f68680f13fe69533125c5 (patch) | |
tree | 8c916ffce7293db85509806eeb7660e35a5c7f78 /src/3rdparty | |
parent | 6ec8d347c5bc8f87d8666ca34dc49afd80c19801 (diff) | |
download | Qt-854e71d1335c7d3c2f1f68680f13fe69533125c5.zip Qt-854e71d1335c7d3c2f1f68680f13fe69533125c5.tar.gz Qt-854e71d1335c7d3c2f1f68680f13fe69533125c5.tar.bz2 |
use "fileName" instead of "sourceURL" as error property name
JSC uses "sourceURL", but for compatibility with the old back-end
we need it to be called "fileName".
Diffstat (limited to 'src/3rdparty')
-rw-r--r-- | src/3rdparty/webkit/JavaScriptCore/interpreter/Interpreter.cpp | 4 | ||||
-rw-r--r-- | src/3rdparty/webkit/JavaScriptCore/runtime/Error.cpp | 2 | ||||
-rw-r--r-- | src/3rdparty/webkit/JavaScriptCore/runtime/Error.h | 2 |
3 files changed, 5 insertions, 3 deletions
diff --git a/src/3rdparty/webkit/JavaScriptCore/interpreter/Interpreter.cpp b/src/3rdparty/webkit/JavaScriptCore/interpreter/Interpreter.cpp index 1c4ddbb..35c6d2f 100644 --- a/src/3rdparty/webkit/JavaScriptCore/interpreter/Interpreter.cpp +++ b/src/3rdparty/webkit/JavaScriptCore/interpreter/Interpreter.cpp @@ -520,7 +520,7 @@ NEVER_INLINE HandlerInfo* Interpreter::throwException(CallFrame*& callFrame, JSV } else { if (!exception->hasProperty(callFrame, Identifier(callFrame, JSC_ERROR_LINENUMBER_PROPERTYNAME)) && !exception->hasProperty(callFrame, Identifier(callFrame, "sourceId")) && - !exception->hasProperty(callFrame, Identifier(callFrame, "sourceURL")) && + !exception->hasProperty(callFrame, Identifier(callFrame, JSC_ERROR_FILENAME_PROPERTYNAME)) && !exception->hasProperty(callFrame, Identifier(callFrame, expressionBeginOffsetPropertyName)) && !exception->hasProperty(callFrame, Identifier(callFrame, expressionCaretOffsetPropertyName)) && !exception->hasProperty(callFrame, Identifier(callFrame, expressionEndOffsetPropertyName))) { @@ -538,7 +538,7 @@ NEVER_INLINE HandlerInfo* Interpreter::throwException(CallFrame*& callFrame, JSV } else exception->putWithAttributes(callFrame, Identifier(callFrame, JSC_ERROR_LINENUMBER_PROPERTYNAME), jsNumber(callFrame, codeBlock->lineNumberForBytecodeOffset(callFrame, bytecodeOffset)), ReadOnly | DontDelete); exception->putWithAttributes(callFrame, Identifier(callFrame, "sourceId"), jsNumber(callFrame, codeBlock->ownerNode()->sourceID()), ReadOnly | DontDelete); - exception->putWithAttributes(callFrame, Identifier(callFrame, "sourceURL"), jsOwnedString(callFrame, codeBlock->ownerNode()->sourceURL()), ReadOnly | DontDelete); + exception->putWithAttributes(callFrame, Identifier(callFrame, JSC_ERROR_FILENAME_PROPERTYNAME), jsOwnedString(callFrame, codeBlock->ownerNode()->sourceURL()), ReadOnly | DontDelete); } if (exception->isWatchdogException()) { diff --git a/src/3rdparty/webkit/JavaScriptCore/runtime/Error.cpp b/src/3rdparty/webkit/JavaScriptCore/runtime/Error.cpp index a23cb3e..1aa9034 100644 --- a/src/3rdparty/webkit/JavaScriptCore/runtime/Error.cpp +++ b/src/3rdparty/webkit/JavaScriptCore/runtime/Error.cpp @@ -87,7 +87,7 @@ JSObject* Error::create(ExecState* exec, ErrorType type, const UString& message, if (sourceID != -1) error->putWithAttributes(exec, Identifier(exec, "sourceId"), jsNumber(exec, sourceID), ReadOnly | DontDelete); if (!sourceURL.isNull()) - error->putWithAttributes(exec, Identifier(exec, "sourceURL"), jsString(exec, sourceURL), ReadOnly | DontDelete); + error->putWithAttributes(exec, Identifier(exec, JSC_ERROR_FILENAME_PROPERTYNAME), jsString(exec, sourceURL), ReadOnly | DontDelete); return error; } diff --git a/src/3rdparty/webkit/JavaScriptCore/runtime/Error.h b/src/3rdparty/webkit/JavaScriptCore/runtime/Error.h index 8831e8e..fb864ee 100644 --- a/src/3rdparty/webkit/JavaScriptCore/runtime/Error.h +++ b/src/3rdparty/webkit/JavaScriptCore/runtime/Error.h @@ -61,8 +61,10 @@ namespace JSC { JSObject* throwError(ExecState*, ErrorType); #ifdef QT_BUILD_SCRIPT_LIB +# define JSC_ERROR_FILENAME_PROPERTYNAME "fileName" # define JSC_ERROR_LINENUMBER_PROPERTYNAME "lineNumber" #else +# define JSC_ERROR_FILENAME_PROPERTYNAME "sourceURL" # define JSC_ERROR_LINENUMBER_PROPERTYNAME "line" #endif |