Changeset 74759 in vbox for trunk/src/VBox
- Timestamp:
- Oct 11, 2018 11:24:47 AM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/src-all/ProgressImpl.cpp
r73853 r74759 168 168 AssertReturn(autoInitSpan.isOk(), E_FAIL); 169 169 170 HRESULT rc = S_OK;171 rc = unconst(pEventSource).createObject();172 if (FAILED(rc)) throwrc;170 HRESULT rc = unconst(pEventSource).createObject(); 171 if (FAILED(rc)) 172 return rc; 173 173 174 174 rc = pEventSource->init(); 175 if (FAILED(rc)) throw rc; 176 177 // rc = Progress::init( 178 //#if !defined(VBOX_COM_INPROC) 179 // aParent, 180 //#endif 181 // aInitiator, aDescription, FALSE, aId); 182 // NA 175 if (FAILED(rc)) 176 return rc; 177 183 178 #if !defined(VBOX_COM_INPROC) 184 179 AssertReturn(aParent, E_INVALIDARG); … … 215 210 216 211 unconst(mDescription) = aDescription; 217 218 219 // end of assertion220 221 222 if (FAILED(rc)) return rc;223 212 224 213 mCancelable = aCancelable; … … 237 226 RTSemEventMultiReset(mCompletedSem); 238 227 239 /* Confirm a successful initialization when it's the case */ 240 if (SUCCEEDED(rc)) 241 autoInitSpan.setSucceeded(); 242 243 return rc; 228 /* Confirm a successful initialization. */ 229 autoInitSpan.setSucceeded(); 230 231 return S_OK; 244 232 } 245 233 … … 268 256 AutoInitSpan autoInitSpan(this); 269 257 AssertReturn(autoInitSpan.isOk(), E_FAIL); 270 271 HRESULT rc = S_OK;272 /* Guarantees subclasses call this method at the proper time */273 NOREF(autoInitSpan);274 275 if (FAILED(rc)) return rc;276 258 277 259 mCancelable = aCancelable; … … 292 274 RTSemEventMultiReset(mCompletedSem); 293 275 294 /* Confirm a successful initialization when it's the case */ 295 if (SUCCEEDED(rc)) 296 autoInitSpan.setSucceeded(); 297 298 return rc; 276 /* Confirm a successful initialization. */ 277 autoInitSpan.setSucceeded(); 278 279 return S_OK; 299 280 } 300 281
Note:
See TracChangeset
for help on using the changeset viewer.