From b7521acd2c77f9f7ace8d49cf1e11affe2ccbd21 Mon Sep 17 00:00:00 2001 From: Ulf Hermann Date: Tue, 18 Aug 2015 11:14:56 +0200 Subject: 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 --- src/plugins/qmltooling/qmldbg_debugger/qv4datacollector.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/plugins/qmltooling/qmldbg_debugger/qv4datacollector.cpp') 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) -- cgit v1.2.3