aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4debugging.cpp
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@theqtcompany.com>2015-08-18 11:14:56 +0200
committerUlf Hermann <ulf.hermann@theqtcompany.com>2015-08-19 11:28:27 +0000
commitb7521acd2c77f9f7ace8d49cf1e11affe2ccbd21 (patch)
tree370f3069f8e75097990d12f8ae416f3d1f133cf8 /src/qml/jsruntime/qv4debugging.cpp
parentc21bc1cdef5ae0f1e6bd43ac0a6c324a59d4e34b (diff)
V4 debugger: Fix expression evaluation
We need to collect the refs in the debugService's list in order for them to show up on addRefs() and we need to generate proper error responses if either the debugger is not stopped or the evaluation throws an exception. Task-number: QTBUG-47797 Task-number: QTBUG-47816 Change-Id: I98f17c1f3976859ee50b9bfac41091276ff60982 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Diffstat (limited to 'src/qml/jsruntime/qv4debugging.cpp')
-rw-r--r--src/qml/jsruntime/qv4debugging.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/qml/jsruntime/qv4debugging.cpp b/src/qml/jsruntime/qv4debugging.cpp
index ceeef80b9f..6efc3793ce 100644
--- a/src/qml/jsruntime/qv4debugging.cpp
+++ b/src/qml/jsruntime/qv4debugging.cpp
@@ -59,6 +59,7 @@ Debugger::JavaScriptJob::JavaScriptJob(QV4::ExecutionEngine *engine, int frameNr
: engine(engine)
, frameNr(frameNr)
, script(script)
+ , resultIsException(false)
{}
void Debugger::JavaScriptJob::run()
@@ -85,11 +86,18 @@ void Debugger::JavaScriptJob::run()
QV4::ScopedValue result(scope);
if (!scope.engine->hasException)
result = script.run();
- if (scope.engine->hasException)
+ if (scope.engine->hasException) {
result = scope.engine->catchException();
+ resultIsException = true;
+ }
handleResult(result);
}
+bool Debugger::JavaScriptJob::hasExeption() const
+{
+ return resultIsException;
+}
+
class EvalJob: public Debugger::JavaScriptJob
{
bool result;