From 8bc243f569e3feb1005fbca426bf24f59c38af2e Mon Sep 17 00:00:00 2001 From: Lars Knoll Date: Fri, 19 May 2017 15:50:22 +0200 Subject: Move the engine() accessor from Object to Managed We can easily do this now that Managed has a pointer to an internal class (which always has a back pointer to the ExecutionEngine). Remove the extra engine pointer from ExecutionContext, and clean up tow methods in String. Change-Id: I98d750b1afbdeadf42e66ae0c92c48db1a7adc31 Reviewed-by: Robin Burchell --- src/plugins/qmltooling/qmldbg_debugger/qv4datacollector.cpp | 2 +- src/plugins/qmltooling/qmldbg_debugger/qv4debugger.cpp | 2 +- .../qmltooling/qmldbg_nativedebugger/qqmlnativedebugservice.cpp | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) (limited to 'src/plugins') diff --git a/src/plugins/qmltooling/qmldbg_debugger/qv4datacollector.cpp b/src/plugins/qmltooling/qmldbg_debugger/qv4datacollector.cpp index b4b95f6713..755235a3a7 100644 --- a/src/plugins/qmltooling/qmldbg_debugger/qv4datacollector.cpp +++ b/src/plugins/qmltooling/qmldbg_debugger/qv4datacollector.cpp @@ -76,7 +76,7 @@ QV4::Heap::CallContext *QV4DataCollector::findScope(QV4::ExecutionContext *ctxt, if (!ctxt) return 0; - QV4::Scope s(ctxt->d()->engine); + QV4::Scope s(ctxt); QV4::ScopedContext ctx(s, ctxt); for (; scope > 0 && ctx; --scope) ctx = ctx->d()->outer; diff --git a/src/plugins/qmltooling/qmldbg_debugger/qv4debugger.cpp b/src/plugins/qmltooling/qmldbg_debugger/qv4debugger.cpp index 9e8be84c33..b82df9c6a9 100644 --- a/src/plugins/qmltooling/qmldbg_debugger/qv4debugger.cpp +++ b/src/plugins/qmltooling/qmldbg_debugger/qv4debugger.cpp @@ -260,7 +260,7 @@ QV4::Function *QV4Debugger::getFunction() const if (QV4::Function *function = context->getFunction()) return function; else - return context->d()->engine->globalCode; + return m_engine->globalCode; } void QV4Debugger::runJobUnpaused() diff --git a/src/plugins/qmltooling/qmldbg_nativedebugger/qqmlnativedebugservice.cpp b/src/plugins/qmltooling/qmldbg_nativedebugger/qqmlnativedebugservice.cpp index 7f842419e7..2015118d95 100644 --- a/src/plugins/qmltooling/qmldbg_nativedebugger/qqmlnativedebugservice.cpp +++ b/src/plugins/qmltooling/qmldbg_nativedebugger/qqmlnativedebugservice.cpp @@ -465,7 +465,7 @@ void NativeDebugger::handleVariables(QJsonObject *response, const QJsonObject &a } TRACE_PROTOCOL("Context: " << executionContext); - QV4::ExecutionEngine *engine = executionContext->d()->engine; + QV4::ExecutionEngine *engine = executionContext->engine(); if (!engine) { setError(response, QStringLiteral("No execution engine passed")); return; @@ -517,7 +517,7 @@ void NativeDebugger::handleExpressions(QJsonObject *response, const QJsonObject } TRACE_PROTOCOL("Context: " << executionContext); - QV4::ExecutionEngine *engine = executionContext->d()->engine; + QV4::ExecutionEngine *engine = executionContext->engine(); if (!engine) { setError(response, QStringLiteral("No execution engine passed")); return; @@ -669,7 +669,7 @@ QV4::Function *NativeDebugger::getFunction() const if (QV4::Function *function = context->getFunction()) return function; else - return context->d()->engine->globalCode; + return m_engine->globalCode; } void NativeDebugger::pauseAndWait() -- cgit v1.2.3