|
@@ -289,15 +289,26 @@ namespace Chromium {
|
|
|
|
|
|
void CChromiumEntity::OnPreClose(EntityCloseCauseEnum eCloseCause, CSmartPointer<ITransactionContext> pTransactionContext)
|
|
|
{
|
|
|
- CModTools::get_mutable_instance().killAllChromium();
|
|
|
- if (m_pTimerListener != NULL)
|
|
|
+ exitClean();
|
|
|
+ pTransactionContext->SendAnswer(Error_Succeed);
|
|
|
+ }
|
|
|
+
|
|
|
+ void CChromiumEntity::exitClean()
|
|
|
+ {
|
|
|
+ static bool isExit = false;
|
|
|
+ if (!isExit)
|
|
|
{
|
|
|
- GetFunction()->KillTimer(CHROMIUM_TIMER_ID);
|
|
|
- delete m_pTimerListener;
|
|
|
- m_pTimerListener = NULL;
|
|
|
+ isExit = true;
|
|
|
+ CModTools::get_mutable_instance().killAllChromium();
|
|
|
+ delete m_pWsServer;
|
|
|
+ if (m_pTimerListener != NULL)
|
|
|
+ {
|
|
|
+ GetFunction()->KillTimer(CHROMIUM_TIMER_ID);
|
|
|
+ delete m_pTimerListener;
|
|
|
+ m_pTimerListener = NULL;
|
|
|
+ }
|
|
|
+ GetFunction()->UnsubscribeBroadcast("IEBrowser");
|
|
|
}
|
|
|
- GetFunction()->UnsubscribeBroadcast("IEBrowser");
|
|
|
- pTransactionContext->SendAnswer(Error_Succeed);
|
|
|
}
|
|
|
|
|
|
void CChromiumEntity::OnLog(const CAutoArray<CUUID>& SubIDs, const CUUID nLogID, const LogTypeEnum eLogType, const SeverityLevelEnum eLevel,
|