summaryrefslogtreecommitdiffstats
path: root/src/corelib
diff options
context:
space:
mode:
authorMurray Read <ext-murray.2.read@nokia.com>2012-02-16 15:19:35 (GMT)
committerQt by Nokia <qt-info@nokia.com>2012-02-17 14:55:45 (GMT)
commitc4a650bc7941dd56568d96fd5d9645267cca0071 (patch)
tree1f83cbec2ef3d834db9005c397c3ea77d04e6a3b /src/corelib
parenta1309a2d1936008f36478536f10f2786da78a270 (diff)
downloadQt-c4a650bc7941dd56568d96fd5d9645267cca0071.zip
Qt-c4a650bc7941dd56568d96fd5d9645267cca0071.tar.gz
Qt-c4a650bc7941dd56568d96fd5d9645267cca0071.tar.bz2
Fix for Shazam crash
QtRRActiveScheduler::RunMarkedIfReady was setting a flag in active objects after RunL(). Active objects potentially delete themselves in RunL(), and so this flag setting potentially corrupts memory. The flag is unnecessary, so has been removed. Other flags are renamed to make their roles clearer. Task-number: ou1cimx1#947013 Change-Id: I1391c31b33074ee9d7fd02410fdb879afc455842 Reviewed-by: Juha Kukkonen <ext-juha.kukkonen@nokia.com> Reviewed-by: Shane Kearns <ext-shane.2.kearns@nokia.com> Reviewed-by: Pasi Pentikäinen <ext-pasi.a.pentikainen@nokia.com> Reviewed-by: Murray Read <ext-murray.2.read@nokia.com>
Diffstat (limited to 'src/corelib')
-rw-r--r--src/corelib/kernel/qeventdispatcher_symbian.cpp12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/corelib/kernel/qeventdispatcher_symbian.cpp b/src/corelib/kernel/qeventdispatcher_symbian.cpp
index 5cc38e6..5d7c59c 100644
--- a/src/corelib/kernel/qeventdispatcher_symbian.cpp
+++ b/src/corelib/kernel/qeventdispatcher_symbian.cpp
@@ -789,9 +789,8 @@ private:
{
ENewObject, // CBase zero initialization sets this, new objects cannot be run in the processEvents in which they are created
ENotRun, // This object has not yet run in the current processEvents call
- ERunningUnchecked, // This object is running in the current processEvents call, as yet unacknowledged by the event dispatcher
- ERunningChecked, // This object is running in a processEvents call, the event dispatcher knows which loop level
- ERan // This object has run in the current processEvents call
+ ERunUnchecked, // This object is run in the current processEvents call, as yet unacknowledged by the event dispatcher
+ ERunChecked // This object is run in a processEvents call, the event dispatcher knows which loop level
};
int iMark; //TAny* iSpare;
};
@@ -839,12 +838,11 @@ QtRRActiveScheduler::RunResult QtRRActiveScheduler::RunMarkedIfReady(TInt &runPr
if (active->IsActive() && (active->iStatus!=KRequestPending)) {
int& mark = dataAccess->iMark;
if (mark == CActiveDataAccess::ENotRun && active->Priority()>=minimumPriority) {
- mark = CActiveDataAccess::ERunningUnchecked;
+ mark = CActiveDataAccess::ERunUnchecked;
runPriority = active->Priority();
dataAccess->iStatus.iFlags&=~TRequestStatusAccess::ERequestActiveFlags;
int vptr = *(int*)active; // vptr can be used to identify type when debugging leaves
TRAP(error, QT_TRYCATCH_LEAVING(active->RunL()));
- mark = CActiveDataAccess::ERan;
if (error!=KErrNone)
error=active->RunError(error);
if (error) {
@@ -876,8 +874,8 @@ bool QtRRActiveScheduler::UseRRActiveScheduler()
bool QtRRActiveScheduler::TestAndClearActiveObjectRunningInRRScheduler(CActive* ao)
{
CActiveDataAccess *dataAccess = (CActiveDataAccess*)ao;
- if (dataAccess->iMark == CActiveDataAccess::ERunningUnchecked) {
- dataAccess->iMark = CActiveDataAccess::ERunningChecked;
+ if (dataAccess->iMark == CActiveDataAccess::ERunUnchecked) {
+ dataAccess->iMark = CActiveDataAccess::ERunChecked;
return true;
}
return false;