aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/qmltooling/qmldbg_debugger/qv4datacollector.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/plugins/qmltooling/qmldbg_debugger/qv4datacollector.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/plugins/qmltooling/qmldbg_debugger/qv4datacollector.cpp')
-rw-r--r--src/plugins/qmltooling/qmldbg_debugger/qv4datacollector.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/plugins/qmltooling/qmldbg_debugger/qv4datacollector.cpp b/src/plugins/qmltooling/qmldbg_debugger/qv4datacollector.cpp
index a44acdd370..01d2a98a74 100644
--- a/src/plugins/qmltooling/qmldbg_debugger/qv4datacollector.cpp
+++ b/src/plugins/qmltooling/qmldbg_debugger/qv4datacollector.cpp
@@ -317,9 +317,16 @@ ExpressionEvalJob::ExpressionEvalJob(QV4::ExecutionEngine *engine, int frameNr,
void ExpressionEvalJob::handleResult(QV4::ScopedValue &result)
{
+ if (hasExeption())
+ exception = result->toQStringNoThrow();
collector->collect(result);
}
+const QString &ExpressionEvalJob::exceptionMessage() const
+{
+ return exception;
+}
+
GatherSourcesJob::GatherSourcesJob(QV4::ExecutionEngine *engine, int seq)
: engine(engine)
, seq(seq)