VirtualBox

Changeset 79053 in vbox


Ignore:
Timestamp:
Jun 8, 2019 11:19:19 PM (6 years ago)
Author:
vboxsync
Message:

Main/GuestImpl.cpp: Must always catch bad_alloc when on an EMT (Guest::i_facilityUpdate).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/src-client/GuestImpl.cpp

    r79050 r79053  
    10191019
    10201020        ComObjPtr<AdditionsFacility> ptrFac;
    1021         ptrFac.createObject();
    1022         AssertReturn(!ptrFac.isNull(), false);
    1023 
    1024         HRESULT hrc = ptrFac->init(this, (AdditionsFacilityType_T)a_enmFacility, (AdditionsFacilityStatus_T)a_enmStatus,
    1025                                    a_fFlags, a_pTimeSpecTS);
     1021        HRESULT hrc = ptrFac.createObject();
    10261022        AssertComRCReturn(hrc, false);
    1027         mData.mFacilityMap.insert(std::make_pair((AdditionsFacilityType_T)a_enmFacility, ptrFac));
    1028         fChanged = true;
     1023        Assert(ptrFac);
     1024
     1025        hrc = ptrFac->init(this, (AdditionsFacilityType_T)a_enmFacility, (AdditionsFacilityStatus_T)a_enmStatus,
     1026                           a_fFlags, a_pTimeSpecTS);
     1027        AssertComRCReturn(hrc, false);
     1028        try
     1029        {
     1030            mData.mFacilityMap.insert(std::make_pair((AdditionsFacilityType_T)a_enmFacility, ptrFac));
     1031            fChanged = true;
     1032        }
     1033        catch (std::bad_alloc &)
     1034        {
     1035            fChanged = false;
     1036        }
    10291037    }
    10301038    return fChanged;
Note: See TracChangeset for help on using the changeset viewer.

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