VirtualBox

Changeset 29948 in vbox


Ignore:
Timestamp:
Jun 1, 2010 12:55:23 PM (15 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
62228
Message:

ProgressProxy: Handle a dead other progress object a bit more gracefully.

File:
1 edited

Legend:

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

    r29937 r29948  
    176176        va_list va;
    177177        va_start(va, aText);
    178         HRESULT hrc = Progress::notifyCompleteV(aResultCode, aIID, aComponent, aText, va);
     178        hrc = Progress::notifyCompleteV(aResultCode, aIID, aComponent, aText, va);
    179179        va_end(va);
    180180    }
     
    321321        /* Detect if the other progress object was canceled. */
    322322        BOOL fCanceled;
    323         hrc = pOtherProgress->COMGETTER(Canceled)(&fCanceled); AssertComRC(hrc);
     323        hrc = pOtherProgress->COMGETTER(Canceled)(&fCanceled);
    324324        if (FAILED(hrc))
    325325            fCanceled = FALSE;
     
    335335            /* Has it completed? */
    336336            BOOL fCompleted;
    337             hrc = pOtherProgress->COMGETTER(Completed)(&fCompleted); AssertComRC(hrc);
     337            hrc = pOtherProgress->COMGETTER(Completed)(&fCompleted);
    338338            if (FAILED(hrc))
    339339                fCompleted = TRUE;
     
    343343                /* Check the result. */
    344344                LONG hrcResult;
    345                 hrc = pOtherProgress->COMGETTER(ResultCode)(&hrcResult); AssertComRC(hrc);
     345                hrc = pOtherProgress->COMGETTER(ResultCode)(&hrcResult);
    346346                if (FAILED(hrc))
    347347                    hrcResult = hrc;
     
    356356                    {
    357357                        Bstr bstrIID;
    358                         hrc = ptrErrorInfo->COMGETTER(InterfaceID)(bstrIID.asOutParam());
     358                        hrc = ptrErrorInfo->COMGETTER(InterfaceID)(bstrIID.asOutParam()); AssertComRC(hrc);
    359359                        if (FAILED(hrc))
    360360                            bstrIID.setNull();
    361361
    362362                        Bstr bstrComponent;
    363                         hrc = ptrErrorInfo->COMGETTER(Component)(bstrComponent.asOutParam());
     363                        hrc = ptrErrorInfo->COMGETTER(Component)(bstrComponent.asOutParam()); AssertComRC(hrc);
    364364                        if (FAILED(hrc))
    365365                            bstrComponent = "failed";
    366366
    367367                        Bstr bstrText;
    368                         hrc = ptrErrorInfo->COMGETTER(Text)(bstrText.asOutParam());
     368                        hrc = ptrErrorInfo->COMGETTER(Text)(bstrText.asOutParam()); AssertComRC(hrc);
    369369                        if (FAILED(hrc))
    370370                            bstrText = "<failed>";
     
    377377                    {
    378378                        LogFlowThisFunc(("ErrorInfo failed with hrc=%Rhrc; hrcResult=%Rhrc\n", hrc, hrcResult));
    379                         Progress::notifyComplete((HRESULT)hrcResult);
     379                        Progress::notifyComplete((HRESULT)hrcResult, COM_IIDOF(IProgress), Bstr("ProgressProxy"),
     380                                                 tr("No error info"));
    380381                    }
    381382                }
     
    391392     * Did cancelable state change (point of no return)?
    392393     */
    393     if (mCancelable)
     394    if (mCancelable && !mCompleted && !mCanceled)
    394395    {
    395396        BOOL fCancelable;
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