diff options
author | Olivier Goffart <ogoffart@trolltech.com> | 2009-10-06 09:19:40 (GMT) |
---|---|---|
committer | Olivier Goffart <ogoffart@trolltech.com> | 2009-10-06 09:28:01 (GMT) |
commit | c8d2160f3aa9b6709874c9cf4a634a46728d6cc6 (patch) | |
tree | a8e1c8ff4156c5f668da7ee28005cf93ff3fa062 /src/script | |
parent | 65a101502bb04ea95110ce6e12a3848c790eb7a1 (diff) | |
download | Qt-c8d2160f3aa9b6709874c9cf4a634a46728d6cc6.zip Qt-c8d2160f3aa9b6709874c9cf4a634a46728d6cc6.tar.gz Qt-c8d2160f3aa9b6709874c9cf4a634a46728d6cc6.tar.bz2 |
QtScript: Another crash fix on PowerPC
on 32bit PowerPC, the integer value and the pointer value are not
in the same word leading to crash. So blindly casting between them
lead to crashes.
Use the new Register::withInt instead
Reviewed-by: Kent Hansen
Diffstat (limited to 'src/script')
-rw-r--r-- | src/script/api/qscriptengine.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/script/api/qscriptengine.cpp b/src/script/api/qscriptengine.cpp index 3402190..863ac30 100644 --- a/src/script/api/qscriptengine.cpp +++ b/src/script/api/qscriptengine.cpp @@ -1116,8 +1116,7 @@ uint QScriptEnginePrivate::contextFlags(JSC::ExecState *exec) void QScriptEnginePrivate::setContextFlags(JSC::ExecState *exec, uint flags) { Q_ASSERT(!exec->codeBlock()); - quintptr flag_ptr = flags; - exec->registers()[JSC::RegisterFile::ReturnValueRegister] = JSC::JSValue(reinterpret_cast<JSC::JSObject*>(flag_ptr)); + exec->registers()[JSC::RegisterFile::ReturnValueRegister] = JSC::Register::withInt(flags); } |