aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2017-10-24 10:05:04 +0200
committerUlf Hermann <ulf.hermann@qt.io>2017-11-06 09:17:07 +0000
commit7bbce3c39660f49add75c5153b8d1f085e31ff49 (patch)
tree58d3e1e222b77497e219febe37f5d7b7e2f5f359
parentce33c5eaba97658bce2664d6a742f6a6fa7ff060 (diff)
Fix JavaScript profiling
The FunctionCallProfiler cannot be temporary, as it should live to the end of the scope. Change-Id: I164d2903cc6070c56bf8fdc4c44009d6c63a870a Reviewed-by: Lars Knoll <lars.knoll@qt.io>
-rw-r--r--src/qml/jsruntime/qv4vme_moth.cpp3
-rw-r--r--tests/auto/qml/debugger/qqmlprofilerservice/tst_qqmlprofilerservice.cpp1
2 files changed, 2 insertions, 2 deletions
diff --git a/src/qml/jsruntime/qv4vme_moth.cpp b/src/qml/jsruntime/qv4vme_moth.cpp
index df04213752..8efd684290 100644
--- a/src/qml/jsruntime/qv4vme_moth.cpp
+++ b/src/qml/jsruntime/qv4vme_moth.cpp
@@ -504,7 +504,8 @@ QV4::ReturnedValue VME::exec(CallData *callData, QV4::Function *function)
ExecutionEngine *engine = function->internalClass->engine;
CHECK_STACK_LIMITS(engine);
- Profiling::FunctionCallProfiler(engine, function);
+ Profiling::FunctionCallProfiler profiler(engine, function);
+ Q_UNUSED(profiler)
Value *jsStackTop = engine->jsStackTop;
diff --git a/tests/auto/qml/debugger/qqmlprofilerservice/tst_qqmlprofilerservice.cpp b/tests/auto/qml/debugger/qqmlprofilerservice/tst_qqmlprofilerservice.cpp
index 0ee1ea9036..cc6083cb98 100644
--- a/tests/auto/qml/debugger/qqmlprofilerservice/tst_qqmlprofilerservice.cpp
+++ b/tests/auto/qml/debugger/qqmlprofilerservice/tst_qqmlprofilerservice.cpp
@@ -667,7 +667,6 @@ void tst_QQmlProfilerService::signalSourceLocation()
void tst_QQmlProfilerService::javascript()
{
- QSKIP("fixme - the nesting is wrong: somthing is called _from_ onWidthChanged");
QCOMPARE(connect(true, "javascript.qml"), ConnectSuccess);
m_client->sendRecordingStatus(true);