diff options
author | Ulf Hermann <ulf.hermann@qt.io> | 2021-05-17 16:38:25 +0200 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@qt.io> | 2021-06-10 11:53:19 +0200 |
commit | e20650e0702259b4be79be85a3d27e45db42efc1 (patch) | |
tree | 7536cee98f4cc502774f807d1a609940cd20d4f5 /src/plugins | |
parent | 7fa28f98824a94396106eadfc028b329985a0cfc (diff) |
Eliminate JS call frame from metatypes calls
If we call an AOT-compiled function we never need the JavaScript call
frame. We can just skip its setup and save some overhead.
Change-Id: I39dc2ca6eea5b5a66f3b87b642a310534cecf6cd
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'src/plugins')
-rw-r--r-- | src/plugins/qmltooling/qmldbg_debugger/qv4debugjob.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/plugins/qmltooling/qmldbg_debugger/qv4debugjob.cpp b/src/plugins/qmltooling/qmldbg_debugger/qv4debugjob.cpp index e0c24979a9..7e05769941 100644 --- a/src/plugins/qmltooling/qmldbg_debugger/qv4debugjob.cpp +++ b/src/plugins/qmltooling/qmldbg_debugger/qv4debugjob.cpp @@ -72,7 +72,7 @@ void JavaScriptJob::run() for (int i = 0; frame && i < frameNr; ++i) frame = frame->parentFrame(); if (frameNr > 0 && frame) - ctx = static_cast<QV4::ExecutionContext *>(&frame->jsFrame->context); + ctx = frame->context(); if (context >= 0) { QObject *forId = QQmlDebugService::objectForId(context); @@ -218,7 +218,8 @@ void ValueLookupJob::run() QQmlContextData::get(engine->qmlEngine()->rootContext()), scopeObject.data()); } - QV4::ScopedStackFrame frame(scope, qmlContext); + QV4::Scoped<QV4::ExecutionContext> scopedContext(scope, qmlContext); + QV4::ScopedStackFrame frame(scope, scopedContext); for (const QJsonValue handle : handles) { QV4DataCollector::Ref ref = handle.toInt(); if (!collector->isValidRef(ref)) { |