diff options
author | Daniel d'Andrada <daniel.dandrada@canonical.com> | 2015-05-29 10:25:26 -0300 |
---|---|---|
committer | Daniel d'Andrada <daniel.dandrada@canonical.com> | 2015-05-29 10:25:26 -0300 |
commit | 11d758309a673f2e7ec5fdd559ac6ceb14bb2320 (patch) | |
tree | 708c8bdc9e0669df0d441bc617c9adad834d22e8 /src | |
parent | 3dd621fe8a4a3578fa345995e2d2a4000d148c52 (diff) |
s/KilledOutOfMemory/DiedUnexpectedly
Diffstat (limited to 'src')
-rw-r--r-- | src/modules/Unity/Application/application.cpp | 14 | ||||
-rw-r--r-- | src/modules/Unity/Application/application.h | 3 |
2 files changed, 8 insertions, 9 deletions
diff --git a/src/modules/Unity/Application/application.cpp b/src/modules/Unity/Application/application.cpp index f627dde..27b6c85 100644 --- a/src/modules/Unity/Application/application.cpp +++ b/src/modules/Unity/Application/application.cpp @@ -203,8 +203,8 @@ const char* Application::internalStateToStr(InternalState state) return "SuspendingWaitProcess"; case InternalState::Suspended: return "Suspended"; - case InternalState::KilledOutOfMemory: - return "KilledOutOfMemory"; + case InternalState::DiedUnexpectedly: + return "DiedUnexpectedly"; case InternalState::Stopped: return "Stopped"; default: @@ -305,7 +305,7 @@ void Application::applyRequestedState() || m_state == InternalState::RunningWithoutWakelock) && m_requestedState == RequestedRunning) { resume(); - } else if (m_state == InternalState::KilledOutOfMemory && m_requestedState == RequestedRunning) { + } else if (m_state == InternalState::DiedUnexpectedly && m_requestedState == RequestedRunning) { respawn(); } } @@ -424,7 +424,7 @@ void Application::setState(Application::InternalState state) case InternalState::Suspended: releaseWakelock(); break; - case InternalState::KilledOutOfMemory: + case InternalState::DiedUnexpectedly: releaseWakelock(); break; case InternalState::Stopped: @@ -461,7 +461,7 @@ void Application::setProcessState(ProcessState newProcessState) m_processState = newProcessState; if (m_processState == ProcessRunning) { - if (m_state == InternalState::KilledOutOfMemory) { + if (m_state == InternalState::DiedUnexpectedly) { setState(InternalState::Starting); } } else if (m_processState == ProcessSuspended) { @@ -474,7 +474,7 @@ void Application::setProcessState(ProcessState newProcessState) setState(InternalState::Stopped); } else { Q_ASSERT(m_state == InternalState::Stopped - || m_state == InternalState::KilledOutOfMemory); + || m_state == InternalState::DiedUnexpectedly); } } @@ -592,7 +592,7 @@ void Application::onSessionStateChanged(Session::State sessionState) */ setState(InternalState::Stopped); } else { - setState(InternalState::KilledOutOfMemory); + setState(InternalState::DiedUnexpectedly); } default: break; diff --git a/src/modules/Unity/Application/application.h b/src/modules/Unity/Application/application.h index 472220a..7c0c465 100644 --- a/src/modules/Unity/Application/application.h +++ b/src/modules/Unity/Application/application.h @@ -83,8 +83,7 @@ public: SuspendingWaitSession, SuspendingWaitProcess, Suspended, - KilledOutOfMemory, // It was killed because the device was running out of memory - // and we can respawn it + DiedUnexpectedly, Stopped // It closed itself, crashed or it stopped and we can't respawn it // In any case, this is a dead end. }; |