OpenCoverage

qv4debugjob.h

Absolute File Name:/home/opencoverage/opencoverage/guest-scripts/qtdeclarative/src/qtdeclarative/src/plugins/qmltooling/qmldbg_debugger/qv4debugjob.h
Switch to Source codePreprocessed file
LineSourceCount
1-
2-
3-
4-
5class QV4DataCollector;-
6class QV4DebugJob-
7{-
8public:-
9 virtual ~QV4DebugJob();-
10 virtual void run() = 0;-
11};-
12-
13class JavaScriptJob : public QV4DebugJob-
14{-
15 QV4::ExecutionEngine *engine;-
16 int frameNr;-
17 int context;-
18 const QString &script;-
19 bool resultIsException;-
20-
21public:-
22 JavaScriptJob(QV4::ExecutionEngine *engine, int frameNr, int context, const QString &script);-
23 void run() override;-
24 bool hasExeption() const;-
25-
26protected:-
27 virtual void handleResult(QV4::ScopedValue &result) = 0;-
28};-
29-
30class CollectJob : public QV4DebugJob-
31{-
32protected:-
33 QV4DataCollector *collector;-
34 QJsonObject result;-
35 QJsonArray collectedRefs;-
36-
37 void flushRedundantRefs()-
38 {-
39 if (collector->redundantRefs()
collector->redundantRefs()Description
TRUEevaluated 98 times by 1 test
Evaluated by:
  • tst_qv4debugger
FALSEevaluated 74 times by 1 test
Evaluated by:
  • tst_qv4debugger
)
74-98
40 collectedRefs = collector->flushCollectedRefs();
executed 98 times by 1 test: collectedRefs = collector->flushCollectedRefs();
Executed by:
  • tst_qv4debugger
98
41 }
executed 172 times by 1 test: end of block
Executed by:
  • tst_qv4debugger
172
42-
43public:-
44 CollectJob(QV4DataCollector *collector) : collector(collector) {}
executed 174 times by 1 test: end of block
Executed by:
  • tst_qv4debugger
174
45 const QJsonObject &returnValue() const { return
executed 172 times by 1 test: return result;
Executed by:
  • tst_qv4debugger
result;
executed 172 times by 1 test: return result;
Executed by:
  • tst_qv4debugger
}
172
46-
47-
48 const QJsonArray &refs() const-
49 {-
50 ((collector->redundantRefs()) ? static_cast<void>(0) : qt_assert("collector->redundantRefs()", __FILE__, 96));-
51 return
never executed: return collectedRefs;
collectedRefs;
never executed: return collectedRefs;
0
52 }-
53};-
54-
55class BacktraceJob: public CollectJob-
56{-
57 int fromFrame;-
58 int toFrame;-
59public:-
60 BacktraceJob(QV4DataCollector *collector, int fromFrame, int toFrame);-
61 void run() override;-
62};-
63-
64class FrameJob: public CollectJob-
65{-
66 int frameNr;-
67 bool success;-
68-
69public:-
70 FrameJob(QV4DataCollector *collector, int frameNr);-
71 void run() override;-
72 bool wasSuccessful() const;-
73};-
74-
75class ScopeJob: public CollectJob-
76{-
77 int frameNr;-
78 int scopeNr;-
79 bool success;-
80-
81public:-
82 ScopeJob(QV4DataCollector *collector, int frameNr, int scopeNr);-
83 void run() override;-
84 bool wasSuccessful() const;-
85};-
86-
87class ValueLookupJob: public CollectJob-
88{-
89 const QJsonArray handles;-
90 QString exception;-
91-
92public:-
93 ValueLookupJob(const QJsonArray &handles, QV4DataCollector *collector);-
94 void run() override;-
95 const QString &exceptionMessage() const;-
96};-
97-
98class ExpressionEvalJob: public JavaScriptJob-
99{-
100 QV4DataCollector *collector;-
101 QString exception;-
102 QJsonObject result;-
103 QJsonArray collectedRefs;-
104-
105public:-
106 ExpressionEvalJob(QV4::ExecutionEngine *engine, int frameNr, int context,-
107 const QString &expression, QV4DataCollector *collector);-
108 void handleResult(QV4::ScopedValue &value) override;-
109 const QString &exceptionMessage() const;-
110 const QJsonObject &returnValue() const;-
111 const QJsonArray &refs() const;-
112};-
113-
114class GatherSourcesJob: public QV4DebugJob-
115{-
116 QV4::ExecutionEngine *engine;-
117 QStringList sources;-
118-
119public:-
120 GatherSourcesJob(QV4::ExecutionEngine *engine);-
121 void run() override;-
122 const QStringList &result() const;-
123};-
124-
125class EvalJob: public JavaScriptJob-
126{-
127 bool result;-
128-
129public:-
130 EvalJob(QV4::ExecutionEngine *engine, const QString &script);-
131-
132 void handleResult(QV4::ScopedValue &result) override;-
133 bool resultAsBoolean() const;-
134};-
135-
136-
Switch to Source codePreprocessed file

Generated by Squish Coco 4.2.0