Changeset 78751 in vbox for trunk/src/VBox/Main/src-client/ConsoleImpl.cpp
- Timestamp:
- May 25, 2019 8:51:40 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/src-client/ConsoleImpl.cpp
r78750 r78751 2224 2224 if (!pTask->isOk()) 2225 2225 { 2226 hrc = setError(FAILED( hrc) ? hrc: E_FAIL, "Could not create VMPowerDownTask object\n");2226 hrc = setError(FAILED(pTask->rc()) ? pTask->rc() : E_FAIL, "Could not create VMPowerDownTask object\n"); 2227 2227 delete(pTask); 2228 2228 pTask = NULL; … … 7621 7621 LONG cOperations = 1; 7622 7622 LONG ulTotalOperationsWeight = 1; 7623 VMPowerUpTask *task = NULL;7623 VMPowerUpTask *task = NULL; 7624 7624 7625 7625 try … … 7740 7740 /* Setup task object and thread to carry out the operation 7741 7741 * asynchronously */ 7742 try 7743 { 7744 task = new VMPowerUpTask(this, pPowerupProgress); 7745 if (!task->isOk()) 7746 { 7747 throw E_FAIL; 7748 } 7749 } 7750 catch(...) 7751 { 7752 delete task; 7753 rc = setError(E_FAIL, "Could not create VMPowerUpTask object \n"); 7754 throw rc; 7755 } 7742 try { task = new VMPowerUpTask(this, pPowerupProgress); } 7743 catch (std::bad_alloc &) { throw rc = E_OUTOFMEMORY; } 7744 if (!task->isOk()) 7745 throw task->rc(); 7756 7746 7757 7747 task->mConfigConstructor = i_configConstructor; … … 7759 7749 task->mStartPaused = aPaused; 7760 7750 if (mMachineState == MachineState_Saved) 7761 task->mSavedStateFile = savedStateFile; 7751 try { task->mSavedStateFile = savedStateFile; } 7752 catch (std::bad_alloc &) { throw rc = E_OUTOFMEMORY; } 7762 7753 task->mTeleporterEnabled = fTeleporterEnabled; 7763 7754 task->mEnmFaultToleranceState = enmFaultToleranceState; … … 7901 7892 AssertComRCReturnRC(rc); 7902 7893 } 7903 else if ( 7904 ||(!fTeleporterEnabled && !fFaultToleranceSyncEnabled))7894 else if ( mMachineState == MachineState_Saved 7895 || (!fTeleporterEnabled && !fFaultToleranceSyncEnabled)) 7905 7896 { 7906 7897 rc = pPowerupProgress->init(static_cast<IConsole *>(this), … … 8012 8003 /* setup task object and thread to carry out the operation 8013 8004 * asynchronously */ 8014 if (aProgress){ 8015 rc = pPowerupProgress.queryInterfaceTo(aProgress); 8016 AssertComRCReturnRC(rc); 8005 if (aProgress) 8006 { 8007 rc = pPowerupProgress.queryInterfaceTo(aProgress); 8008 AssertComRCReturnRC(rc); 8017 8009 } 8018 8010 8019 8011 rc = task->createThread(); 8020 8012 task = NULL; 8021 8013 if (FAILED(rc)) 8022 8014 throw rc; … … 8034 8026 i_setMachineState(MachineState_Starting); 8035 8027 } 8036 catch (HRESULT aRC) { rc = aRC; } 8028 catch (HRESULT aRC) 8029 { 8030 rc = aRC; 8031 } 8037 8032 8038 8033 if (FAILED(rc) && fBeganPoweringUp) … … 8051 8046 /* signal end of operation */ 8052 8047 mControl->EndPowerUp(rc); 8048 } 8049 8050 if (task) 8051 { 8052 ErrorInfoKeeper eik; 8053 delete task; 8053 8054 } 8054 8055 … … 8848 8849 * asynchronously (if we call powerDown() right here but there 8849 8850 * is one or more mpUVM callers (added with addVMCaller()) we'll 8850 * deadlock). 8851 */ 8852 VMPowerDownTask* task = NULL; 8851 * deadlock). */ 8852 VMPowerDownTask *task = NULL; 8853 8853 try 8854 8854 {
Note:
See TracChangeset
for help on using the changeset viewer.