diff options
author | Kent Hansen <kent.hansen@nokia.com> | 2010-04-14 16:22:35 (GMT) |
---|---|---|
committer | Kent Hansen <kent.hansen@nokia.com> | 2010-04-14 16:32:34 (GMT) |
commit | a3d6d4db2c12123873b809a9605b3ab50c740294 (patch) | |
tree | 8db9358f87a202cf8ca6a28d947b66b001952222 /tests/auto/qtime | |
parent | a0b027c9e29cdc75ffe857e19e9892e88bde722e (diff) | |
download | Qt-a3d6d4db2c12123873b809a9605b3ab50c740294.zip Qt-a3d6d4db2c12123873b809a9605b3ab50c740294.tar.gz Qt-a3d6d4db2c12123873b809a9605b3ab50c740294.tar.bz2 |
QtScript: Fix call stack issue with qsTr() when JIT is enabled
When the JIT is enabled, as well as JIT_OPTIMIZE_NATIVE_CALL defined,
NativeFunctionWrapper is a typedef for JSFunction. This has the
consequence that the native call frame will not be fully initialized
by JIT-generated code (because it shouldn't have to); in particular,
ExecState::codeBlock() is not set up.
qsTr() relies on codeBlock() to return a sensible value, though, so
it breaks this contract.
By making qsTr a PrototypeFunction, the JIT will detect that the
function call needs more elaborate setup, i.e. initialize codeBlock()
as well.
Reviewed-by: Olivier Goffart
Diffstat (limited to 'tests/auto/qtime')
0 files changed, 0 insertions, 0 deletions