VirtualBox

Changeset 30292 in vbox for trunk


Ignore:
Timestamp:
Jun 17, 2010 6:45:15 PM (15 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
62821
Message:

Main/Medium: add a couple of forgotten AutoCaller objects to fix extremely sporadic crashes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/MediumImpl.cpp

    r30277 r30292  
    19011901STDMETHODIMP Medium::Close()
    19021902{
     1903    AutoCaller autoCaller(this);
     1904    if (FAILED(autoCaller.rc())) return autoCaller.rc();
     1905
    19031906    // we're accessing parent/child and backrefs, so lock the tree first, then ourselves
    19041907    AutoMultiWriteLock2 multilock(&m->pVirtualBox->getMediaTreeLockHandle(),
     
    19411944    // make a copy of VirtualBox pointer which gets nulled by uninit()
    19421945    ComObjPtr<VirtualBox> pVirtualBox(m->pVirtualBox);
     1946
     1947    // leave the AutoCaller, as otherwise uninit() will simply hang
     1948    autoCaller.release();
    19431949
    19441950    /* Keep the locks held until after uninit, as otherwise the consistency
     
    31313137                                     MediumLockList &mediumLockList)
    31323138{
     3139    AutoCaller autoCaller(this);
     3140    if (FAILED(autoCaller.rc())) return autoCaller.rc();
     3141
    31333142    HRESULT rc = S_OK;
    31343143
     
    38463855{
    38473856    AssertReturn(aProgress != NULL || aWait == true, E_FAIL);
     3857
     3858    AutoCaller autoCaller(this);
     3859    if (FAILED(autoCaller.rc())) return autoCaller.rc();
    38483860
    38493861    HRESULT rc = S_OK;
     
    46094621    if (FAILED(autoCaller.rc())) return autoCaller.rc();
    46104622
     4623    AutoCaller targetCaller(pTarget);
     4624    AssertComRCReturnRC(targetCaller.rc());
     4625
    46114626    HRESULT rc = S_OK;
    46124627    ComObjPtr <Progress> pProgress;
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette