aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4debugging.cpp
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@theqtcompany.com>2015-01-13 09:01:29 +0100
committerLars Knoll <lars.knoll@digia.com>2015-01-13 22:42:04 +0100
commit39f1e0d66dc434e764731fbfed29c8fd98d217aa (patch)
treed9855dbedd752c23395ccb6d4d3dc8fc3bece254 /src/qml/jsruntime/qv4debugging.cpp
parenta38f9ec6c96559efa56e8f7346f74f5990810c3a (diff)
Make sure we always have an engine when assigning to a Persistent
This prepares things for a rewrite of the internals of Persistent. Change-Id: Ib93ec5911984d1bfce87ffdc3f86bc75f6ecafe9 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/qml/jsruntime/qv4debugging.cpp')
-rw-r--r--src/qml/jsruntime/qv4debugging.cpp13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/qml/jsruntime/qv4debugging.cpp b/src/qml/jsruntime/qv4debugging.cpp
index 85874d1318..9361fa1a23 100644
--- a/src/qml/jsruntime/qv4debugging.cpp
+++ b/src/qml/jsruntime/qv4debugging.cpp
@@ -172,7 +172,7 @@ Debugger::Debugger(QV4::ExecutionEngine *engine)
, m_pauseRequested(false)
, m_haveBreakPoints(false)
, m_breakOnThrow(false)
- , m_returnedValue(Primitive::undefinedValue())
+ , m_returnedValue(engine, Primitive::undefinedValue())
, m_gatherSources(0)
, m_runningJob(0)
{
@@ -230,9 +230,9 @@ void Debugger::resume(Speed speed)
return;
if (!m_returnedValue.isUndefined())
- m_returnedValue = Encode::undefined();
+ m_returnedValue.set(m_engine, Encode::undefined());
- m_currentContext = m_engine->currentContext();
+ m_currentContext.set(m_engine, m_engine->currentContext());
m_stepping = speed;
m_runningCondition.wakeAll();
}
@@ -559,7 +559,7 @@ void Debugger::enteringFunction()
QMutexLocker locker(&m_lock);
if (m_stepping == StepIn) {
- m_currentContext = m_engine->currentContext();
+ m_currentContext.set(m_engine, m_engine->currentContext());
}
}
@@ -571,11 +571,10 @@ void Debugger::leavingFunction(const ReturnedValue &retVal)
QMutexLocker locker(&m_lock);
- Scope scope(m_engine);
if (m_stepping != NotStepping && m_currentContext.asManaged()->d() == m_engine->currentContext()) {
- m_currentContext = m_engine->currentContext()->parent;
+ m_currentContext.set(m_engine, m_engine->currentContext()->parent);
m_stepping = StepOver;
- m_returnedValue = retVal;
+ m_returnedValue.set(m_engine, retVal);
}
}