Changeset 78752 in vbox for trunk/src/VBox/Main/src-client/ConsoleImpl.cpp
- Timestamp:
- May 25, 2019 8:59:23 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/src-client/ConsoleImpl.cpp
r78751 r78752 8846 8846 that->i_setMachineStateLocally(MachineState_Stopping); 8847 8847 8848 /* Setup task object and thread to carry out the operation 8848 /* 8849 * Setup task object and thread to carry out the operation 8849 8850 * asynchronously (if we call powerDown() right here but there 8850 8851 * is one or more mpUVM callers (added with addVMCaller()) we'll 8851 * deadlock). */ 8852 * deadlock). 8853 */ 8852 8854 VMPowerDownTask *task = NULL; 8853 8855 try 8854 8856 { 8855 8857 task = new VMPowerDownTask(that, pProgress); 8856 /* If creating a task failed, this can currently mean one of8857 * two: either Console::uninit() has been called just a ms8858 * before (so a powerDown() call is already on the way), or8859 * powerDown() itself is being already executed. Just do8860 * nothing.8861 */8862 if (!task->isOk())8863 {8864 LogFlowFunc(("Console is already being uninitialized. \n"));8865 throw E_FAIL;8866 }8867 8858 } 8868 catch (...)8859 catch (std::bad_alloc &) 8869 8860 { 8861 LogRelFunc(("E_OUTOFMEMORY creating VMPowerDownTask")); 8862 rc = E_OUTOFMEMORY; 8863 break; 8864 } 8865 8866 /* 8867 * If creating a task failed, this can currently mean one of 8868 * two: either Console::uninit() has been called just a ms 8869 * before (so a powerDown() call is already on the way), or 8870 * powerDown() itself is being already executed. Just do 8871 * nothing. 8872 */ 8873 if (!task->isOk()) 8874 { 8875 rc = task->createThread(); 8876 task = NULL; 8877 if (FAILED(rc)) 8878 LogRelFunc(("Problem with creating thread for VMPowerDownTask.\n")); 8879 } 8880 else 8881 { 8882 LogFlowFunc(("Console is already being uninitialized. (%Rhrc)\n", task->rc())); 8870 8883 delete task; 8871 LogFlowFunc(("Problem with creating VMPowerDownTask object. \n"));8884 rc = E_FAIL; 8872 8885 } 8873 8874 rc = task->createThread();8875 8876 if (FAILED(rc))8877 {8878 LogFlowFunc(("Problem with creating thread for VMPowerDownTask. \n"));8879 }8880 8881 8886 } 8882 8887 break;
Note:
See TracChangeset
for help on using the changeset viewer.