VirtualBox

Ignore:
Timestamp:
Jun 7, 2016 2:41:41 PM (9 years ago)
Author:
vboxsync
Message:

addendum to r19249, r104674, r107879: unify these checks for all stubs we are using

Location:
trunk/src/libs/xpcom18a4/xpcom/reflect/xptcall/src/md
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/libs/xpcom18a4/xpcom/reflect/xptcall/src/md/os2/xptcstubs_gcc_x86_os2.cpp

    r3149 r61543  
    6565    self->GetInterfaceInfo(&iface_info);
    6666    NS_ASSERTION(iface_info,"no interface info");
     67    if (!iface_info)
     68        return NS_ERROR_UNEXPECTED;
    6769
    6870    iface_info->GetMethodInfo(PRUint16(methodIndex), &info);
    69     NS_ASSERTION(info,"no interface info");
    70 
    71 #ifdef VBOX
     71    NS_ASSERTION(info,"no method info");
    7272    if (!info)
    73         return result;
    74 #endif
     73        return NS_ERROR_UNEXPECTED;
    7574
    7675    paramCount = info->GetParamCount();
     
    8281        dispatchParams = paramBuffer;
    8382    NS_ASSERTION(dispatchParams,"no place for params");
     83    if (!dispatchParams)
     84        return NS_ERROR_OUT_OF_MEMORY;
    8485
    8586    PRUint32* ap = args;
  • trunk/src/libs/xpcom18a4/xpcom/reflect/xptcall/src/md/unix/xptcstubs_amd64_darwin.cpp

    r26163 r61543  
    6767    nsXPTCMiniVariant* dispatchParams = NULL;
    6868    nsIInterfaceInfo* iface_info = NULL;
    69     const nsXPTMethodInfo* info;
     69    const nsXPTMethodInfo* info = NULL;
    7070    PRUint32 paramCount;
    7171    PRUint32 i;
  • trunk/src/libs/xpcom18a4/xpcom/reflect/xptcall/src/md/unix/xptcstubs_gcc_x86_unix.cpp

    r59107 r61543  
    6767
    6868    iface_info->GetMethodInfo(PRUint16(methodIndex), &info);
    69     NS_ASSERTION(info,"no interface info");
    70 
    71 #ifdef VBOX
     69    NS_ASSERTION(info,"no method info");
    7270    if (!info)
    73         return result;
    74 #endif
     71        return NS_ERROR_UNEXPECTED;
    7572
    7673    paramCount = info->GetParamCount();
     
    8279        dispatchParams = paramBuffer;
    8380    NS_ASSERTION(dispatchParams,"no place for params");
     81    if (!dispatchParams)
     82        return NS_ERROR_OUT_OF_MEMORY;
    8483
    8584    PRUint32* ap = args;
  • trunk/src/libs/xpcom18a4/xpcom/reflect/xptcall/src/md/unix/xptcstubs_unixish_x86.cpp

    r24676 r61543  
    5050    nsXPTCMiniVariant* dispatchParams = NULL;
    5151    nsIInterfaceInfo* iface_info = NULL;
    52     const nsXPTMethodInfo* info;
     52    const nsXPTMethodInfo* info = NULL;
    5353    PRUint8 paramCount;
    5454    PRUint8 i;
     
    5959    self->GetInterfaceInfo(&iface_info);
    6060    NS_ASSERTION(iface_info,"no interface info");
     61    if (!iface_info)
     62        return NS_ERROR_UNEXPECTED;
    6163
    6264    iface_info->GetMethodInfo(PRUint16(methodIndex), &info);
    63     NS_ASSERTION(info,"no interface info");
     65    NS_ASSERTION(info,"no method info");
     66    if (!info)
     67        return NS_ERROR_UNEXPECTED;
    6468
    6569    paramCount = info->GetParamCount();
     
    7175        dispatchParams = paramBuffer;
    7276    NS_ASSERTION(dispatchParams,"no place for params");
     77    if (!dispatchParams)
     78        return NS_ERROR_OUT_OF_MEMORY;
    7379
    7480    PRUint32* ap = args;
  • trunk/src/libs/xpcom18a4/xpcom/reflect/xptcall/src/md/unix/xptcstubs_x86_64_linux.cpp

    r1 r61543  
    6767    nsXPTCMiniVariant* dispatchParams = NULL;
    6868    nsIInterfaceInfo* iface_info = NULL;
    69     const nsXPTMethodInfo* info;
     69    const nsXPTMethodInfo* info = NULL;
    7070    PRUint32 paramCount;
    7171    PRUint32 i;
  • trunk/src/libs/xpcom18a4/xpcom/reflect/xptcall/src/md/unix/xptcstubs_x86_solaris.cpp

    r61542 r61543  
    5050    nsXPTCMiniVariant* dispatchParams = NULL;
    5151    nsIInterfaceInfo* iface_info = NULL;
    52     const nsXPTMethodInfo* info;
     52    const nsXPTMethodInfo* info = NULL;
    5353    PRUint8 paramCount;
    5454    PRUint8 i;
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