diff options
author | Kent Hansen <kent.hansen@nokia.com> | 2009-11-23 14:26:36 (GMT) |
---|---|---|
committer | Jason McDonald <jason.mcdonald@nokia.com> | 2009-11-24 03:19:30 (GMT) |
commit | c27e9337b127d8946844f448892de0da31bbe8f3 (patch) | |
tree | 0a2bb0581a3b0f042e88ab50d92512d3c0b115d4 /LGPL_EXCEPTION.txt | |
parent | 30c51abc4eefa9ccf4311d07100fe383df62bf32 (diff) | |
download | Qt-c27e9337b127d8946844f448892de0da31bbe8f3.zip Qt-c27e9337b127d8946844f448892de0da31bbe8f3.tar.gz Qt-c27e9337b127d8946844f448892de0da31bbe8f3.tar.bz2 |
Don't crash in eval() function when QtScript debugger is attached
The built-in eval() function bypasses the script registration
performed by QScriptEngine::evaluate(), so if we get an
atStatement() callback from JSC from that script, the
scriptID-to-sourceProvider lookup will fail.
In this case, just return from atStatement() without delivering
the positionChange() callback to the QScriptEngineAgent, since
the agent will not have received the scriptLoad() callback for
that script anyway.
This is a change in behavior from 4.5, but we consider it
the minimum-impact fix at this point to keep 4.6.0 from
crashing. The only downside is that debugging will
effectively be "disabled" for the script passed to eval(),
but that's a lot better than crashing.
Task-number: QTBUG-6108
Reviewed-by: Jedrzej Nowacki
(cherry picked from commit 23002374d11598b26b6585e78dc073071a13f0ec)
Diffstat (limited to 'LGPL_EXCEPTION.txt')
0 files changed, 0 insertions, 0 deletions