diff options
author | Liang Qi <liang.qi@qt.io> | 2018-01-09 14:32:32 +0100 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2018-01-09 14:32:32 +0100 |
commit | e3f7da72ac5b4540f88bb5cbd91a4917ba84334a (patch) | |
tree | 3f05c1cf965fe291685c383f04b0bec87b05095b /src/qml/jsruntime/qv4profiling_p.h | |
parent | 4cc883452b37dbe3148064150dc2f6b282b6b816 (diff) | |
parent | 2e8a45d99f94cbd2c805dd3de56d60d9baa9bd4e (diff) |
Merge remote-tracking branch 'origin/5.10' into dev
Conflicts:
.qmake.conf
src/qml/memory/qv4mm.cpp
src/qml/qml/qqmlbinding.cpp
Change-Id: I98e51ef5af12691196da5772a07d3d53d213efcc
Diffstat (limited to 'src/qml/jsruntime/qv4profiling_p.h')
-rw-r--r-- | src/qml/jsruntime/qv4profiling_p.h | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/src/qml/jsruntime/qv4profiling_p.h b/src/qml/jsruntime/qv4profiling_p.h index 5742dd3062..74298e684b 100644 --- a/src/qml/jsruntime/qv4profiling_p.h +++ b/src/qml/jsruntime/qv4profiling_p.h @@ -223,16 +223,24 @@ public: bool trackAlloc(size_t size, MemoryType type) { - MemoryAllocationProperties allocation = {m_timer.nsecsElapsed(), (qint64)size, type}; - m_memory_data.append(allocation); - return true; + if (size) { + MemoryAllocationProperties allocation = {m_timer.nsecsElapsed(), (qint64)size, type}; + m_memory_data.append(allocation); + return true; + } else { + return false; + } } bool trackDealloc(size_t size, MemoryType type) { - MemoryAllocationProperties allocation = {m_timer.nsecsElapsed(), -(qint64)size, type}; - m_memory_data.append(allocation); - return true; + if (size) { + MemoryAllocationProperties allocation = {m_timer.nsecsElapsed(), -(qint64)size, type}; + m_memory_data.append(allocation); + return true; + } else { + return false; + } } quint64 featuresEnabled; |