From 7bbce3c39660f49add75c5153b8d1f085e31ff49 Mon Sep 17 00:00:00 2001 From: Ulf Hermann Date: Tue, 24 Oct 2017 10:05:04 +0200 Subject: [PATCH] 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 --- src/qml/jsruntime/qv4vme_moth.cpp | 3 ++- .../debugger/qqmlprofilerservice/tst_qqmlprofilerservice.cpp | 1 - 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);