summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/3rdparty/javascriptcore/JavaScriptCore/runtime/CollectorHeapIterator.h10
-rw-r--r--src/script/api/qscriptengine.cpp1
-rw-r--r--src/script/api/qscriptengineagent.cpp2
3 files changed, 7 insertions, 6 deletions
diff --git a/src/3rdparty/javascriptcore/JavaScriptCore/runtime/CollectorHeapIterator.h b/src/3rdparty/javascriptcore/JavaScriptCore/runtime/CollectorHeapIterator.h
index e4f2f91..4a38df9 100644
--- a/src/3rdparty/javascriptcore/JavaScriptCore/runtime/CollectorHeapIterator.h
+++ b/src/3rdparty/javascriptcore/JavaScriptCore/runtime/CollectorHeapIterator.h
@@ -97,14 +97,12 @@ namespace JSC {
inline LiveObjectIterator& LiveObjectIterator::operator++()
{
- if (m_block < m_heap.nextBlock || m_cell < m_heap.nextCell) {
- advance(HeapConstants::cellsPerBlock);
+ advance(HeapConstants::cellsPerBlock - 1);
+ if (m_block < m_heap.nextBlock || (m_block == m_heap.nextBlock && m_cell < m_heap.nextCell))
return *this;
- }
- do {
- advance(HeapConstants::cellsPerBlock);
- } while (m_block < m_heap.usedBlocks && !m_heap.blocks[m_block]->marked.get(m_cell));
+ while (m_block < m_heap.usedBlocks && !m_heap.blocks[m_block]->marked.get(m_cell))
+ advance(HeapConstants::cellsPerBlock - 1);
return *this;
}
diff --git a/src/script/api/qscriptengine.cpp b/src/script/api/qscriptengine.cpp
index 7bccffe..26673f4 100644
--- a/src/script/api/qscriptengine.cpp
+++ b/src/script/api/qscriptengine.cpp
@@ -4196,6 +4196,7 @@ void QScriptEngine::setAgent(QScriptEngineAgent *agent)
"cannot set agent belonging to different engine");
return;
}
+ QScript::APIShim shim(d);
if (d->activeAgent)
QScriptEngineAgentPrivate::get(d->activeAgent)->detach();
d->activeAgent = agent;
diff --git a/src/script/api/qscriptengineagent.cpp b/src/script/api/qscriptengineagent.cpp
index 0b5828a..c3d1566 100644
--- a/src/script/api/qscriptengineagent.cpp
+++ b/src/script/api/qscriptengineagent.cpp
@@ -117,6 +117,8 @@ void QScriptEngineAgentPrivate::attach()
if (engine->originalGlobalObject()->debugger())
engine->originalGlobalObject()->setDebugger(0);
JSC::Debugger::attach(engine->originalGlobalObject());
+ if (!QScriptEnginePrivate::get(engine)->isEvaluating())
+ JSC::Debugger::recompileAllJSFunctions(engine->globalData);
}
void QScriptEngineAgentPrivate::detach()