VirtualBox

Changeset 84745 in vbox for trunk/src/VBox/Main


Ignore:
Timestamp:
Jun 9, 2020 7:24:27 PM (5 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
138539
Message:

Guest Control/Main: Handling throw()ing VBox rc for GuestWaitEventPayload constructor. bugref:9320

Location:
trunk/src/VBox/Main
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/include/GuestCtrlImplPrivate.h

    r84648 r84745  
    10471047          pvData(NULL) { }
    10481048
     1049    /**
     1050     * Initialization constructor. Will throw() VBox status code (rc).
     1051     *
     1052     * @param   uTypePayload    Payload type to set.
     1053     * @param   pvPayload       Pointer to payload data to set (deep copy).
     1054     * @param   cbPayload       Size (in bytes) of payload data to set.
     1055     */
    10491056    GuestWaitEventPayload(uint32_t uTypePayload,
    10501057                          const void *pvPayload, uint32_t cbPayload)
  • trunk/src/VBox/Main/src-client/GuestCtrlPrivate.cpp

    r84648 r84745  
    855855                    AssertRCReturn(vrc, vrc);
    856856
    857                     GuestWaitEventPayload evPayload(dataCb.uType, dataCb.pvPayload, dataCb.cbPayload); /* This bugger throws int. */
    858                     vrc = signalWaitEventInternal(pCtxCb, dataCb.rc, &evPayload);
     857                    try
     858                    {
     859                        GuestWaitEventPayload evPayload(dataCb.uType, dataCb.pvPayload, dataCb.cbPayload);
     860                        vrc = signalWaitEventInternal(pCtxCb, dataCb.rc, &evPayload);
     861                    }
     862                    catch (int rcEx) /* Thrown by GuestWaitEventPayload constructor. */
     863                    {
     864                        vrc = rcEx;
     865                    }
    859866                }
    860867                else
  • trunk/src/VBox/Main/src-client/GuestFileImpl.cpp

    r84744 r84745  
    670670    if (RT_SUCCESS(rc))
    671671    {
    672         GuestWaitEventPayload payload(dataCb.uType, &dataCb, sizeof(dataCb));
    673 
    674         /* Ignore rc, as the event to signal might not be there (anymore). */
    675         signalWaitEventInternal(pCbCtx, rcGuest, &payload);
     672        try
     673        {
     674            GuestWaitEventPayload payload(dataCb.uType, &dataCb, sizeof(dataCb));
     675
     676            /* Ignore rc, as the event to signal might not be there (anymore). */
     677            signalWaitEventInternal(pCbCtx, rcGuest, &payload);
     678        }
     679        catch (int rcEx) /* Thrown by GuestWaitEventPayload constructor. */
     680        {
     681            rc = rcEx;
     682        }
    676683    }
    677684
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