~ubuntu-branches/ubuntu/wily/qtdeclarative-opensource-src/wily-proposed

« back to all changes in this revision

Viewing changes to src/qml/jsruntime/qv4executableallocator.cpp

  • Committer: Package Import Robot
  • Author(s): Ricardo Salveti de Araujo, Ricardo Salveti de Araujo, Timo Jyrinki
  • Date: 2014-06-19 02:39:21 UTC
  • mfrom: (0.1.18 experimental)
  • Revision ID: package-import@ubuntu.com-20140619023921-yb2oasnuetz9b0fc
Tags: 5.3.0-3ubuntu4
[ Ricardo Salveti de Araujo ]
* debian/control:
  - Updating dependencies as we now also have libqt5quickwidgets5-gles
* libqt5quickwidgets5.symbols: updating to allow gles variant

[ Timo Jyrinki ]
* Update libqt5quickparticles5.symbols from build logs

Show diffs side-by-side

added added

removed removed

Lines of Context:
41
41
 
42
42
#include "qv4executableallocator_p.h"
43
43
 
44
 
#include <assert.h>
45
44
#include <wtf/StdLibExtras.h>
46
45
#include <wtf/PageAllocation.h>
47
46
 
81
80
 
82
81
bool ExecutableAllocator::Allocation::mergeNext(ExecutableAllocator *allocator)
83
82
{
84
 
    assert(free);
 
83
    Q_ASSERT(free);
85
84
    if (!next || !next->free)
86
85
        return false;
87
86
 
101
100
 
102
101
bool ExecutableAllocator::Allocation::mergePrevious(ExecutableAllocator *allocator)
103
102
{
104
 
    assert(free);
 
103
    Q_ASSERT(free);
105
104
    if (!prev || !prev->free)
106
105
        return false;
107
106
 
185
184
        chunk->firstAllocation = allocation;
186
185
    }
187
186
 
188
 
    assert(allocation);
189
 
    assert(allocation->free);
 
187
    Q_ASSERT(allocation);
 
188
    Q_ASSERT(allocation->free);
190
189
 
191
190
    allocation->free = false;
192
191
 
204
203
{
205
204
    QMutexLocker locker(&mutex);
206
205
 
207
 
    assert(allocation);
 
206
    Q_ASSERT(allocation);
208
207
 
209
208
    allocation->free = true;
210
209
 
211
210
    QMap<quintptr, ChunkOfPages*>::Iterator it = chunks.lowerBound(allocation->addr);
212
211
    if (it != chunks.begin())
213
212
        --it;
214
 
    assert(it != chunks.end());
 
213
    Q_ASSERT(it != chunks.end());
215
214
    ChunkOfPages *chunk = *it;
216
 
    assert(chunk->contains(allocation));
 
215
    Q_ASSERT(chunk->contains(allocation));
217
216
 
218
217
    bool merged = allocation->mergeNext(this);
219
218
    merged |= allocation->mergePrevious(this);