summaryrefslogtreecommitdiffstats
path: root/src/3rdparty
diff options
context:
space:
mode:
authorOlivier Goffart <olivier.goffart@nokia.com>2010-07-27 08:31:21 (GMT)
committerOlivier Goffart <olivier.goffart@nokia.com>2010-07-27 10:30:23 (GMT)
commitab7c405ac2e528eb23b2c56ef02bd33c42bc3256 (patch)
treef6e90a9ede2252deb4a948c1a8dba52ebc6966e1 /src/3rdparty
parent39097c5d652efd3eb0946e5a215d82573a46dbf9 (diff)
downloadQt-ab7c405ac2e528eb23b2c56ef02bd33c42bc3256.zip
Qt-ab7c405ac2e528eb23b2c56ef02bd33c42bc3256.tar.gz
Qt-ab7c405ac2e528eb23b2c56ef02bd33c42bc3256.tar.bz2
QScriptEngineAgent: recompile all the function when installing a debugger.
Recompile all the function is necessary to ger the debug opcode that notifies us when the position changes. The change in CollectorHeapIterator.h is nessesary to get it work as Debugger::recompileAllJSFunctions uses LiveObjectIterator, LiveObjectIterator initialied m_cell to -1 and to ++(*this) in its constructor. But as m_cell is of type size_t (unsigned) then the < comparison will always fail as it is an unsigned comparison. This was already fixed upstream in r54672 Reviewed-by: Jedrzej Nowacki
Diffstat (limited to 'src/3rdparty')
-rw-r--r--src/3rdparty/javascriptcore/JavaScriptCore/runtime/CollectorHeapIterator.h10
1 files changed, 4 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;
}