- Timestamp:
- Nov 30, 2010 12:25:04 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/MediumImpl.cpp
r33921 r34499 194 194 mMediumCaller(aMedium), 195 195 mThread(NIL_RTTHREAD), 196 mProgress(aProgress) 196 mProgress(aProgress), 197 mVirtualBoxCaller(NULL) 197 198 { 198 199 AssertReturnVoidStmt(aMedium, mRC = E_FAIL); 199 200 mRC = mMediumCaller.rc(); 201 if (FAILED(mRC)) 202 return; 203 204 /* Get strong VirtualBox reference, see below. */ 205 VirtualBox *pVirtualBox = aMedium->m->pVirtualBox; 206 mVirtualBox = pVirtualBox; 207 mVirtualBoxCaller.attach(pVirtualBox); 208 mRC = mVirtualBoxCaller.rc(); 200 209 if (FAILED(mRC)) 201 210 return; … … 253 262 VDINTERFACE mVDIfProgress; 254 263 VDINTERFACEPROGRESS mVDIfCallsProgress; 264 265 /* Must have a strong VirtualBox reference during a task otherwise the 266 * reference count might drop to 0 while a task is still running. This 267 * would result in weird behavior, including deadlocks due to uninit and 268 * locking order issues. The deadlock often is not detectable because the 269 * uninit uses event semaphores which sabotages deadlock detection. */ 270 ComObjPtr<VirtualBox> mVirtualBox; 271 AutoCaller mVirtualBoxCaller; 255 272 }; 256 273
Note:
See TracChangeset
for help on using the changeset viewer.