VirtualBox

Changeset 102334 in vbox for trunk/src/libs/xpcom18a4/ipc


Ignore:
Timestamp:
Nov 27, 2023 4:08:53 PM (14 months ago)
Author:
vboxsync
Message:

libs/xpcom: Drop VBOX_USE_IPRT_IN_XPCOM andmake the code the default as running without IPRT is impossible anyways, bugref:10545

Location:
trunk/src/libs/xpcom18a4/ipc/ipcd
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/libs/xpcom18a4/ipc/ipcd/extensions/transmngr/common/tmTransaction.cpp

    r31259 r102334  
    3838#include <stdlib.h>
    3939#include "tmTransaction.h"
    40 #ifdef VBOX_USE_IPRT_IN_XPCOM
    41 # include <iprt/mem.h>
    42 #endif
     40
     41#include <iprt/mem.h>
    4342
    4443///////////////////////////////////////////////////////////////////////////////
     
    4746tmTransaction::~tmTransaction() {
    4847  if (mHeader)
    49 #ifdef VBOX_USE_IPRT_IN_XPCOM
    5048    RTMemFree(mHeader);
    51 #else
    52     free(mHeader);
    53 #endif
    5449}
    5550
     
    6863  // indicates the message is the entire raw message
    6964  if (aQueueID == TM_INVALID_ID) {
    70 #ifdef VBOX_USE_IPRT_IN_XPCOM
    7165    header = (tmHeader*) RTMemAlloc(aLength);
    72 #else
    73     header = (tmHeader*) malloc(aLength);
    74 #endif
    7566    if (header) {
    7667      mRawMessageLength = aLength;
     
    8172  }
    8273  else {   // need to create the tmHeader and concat the message
    83 #ifdef VBOX_USE_IPRT_IN_XPCOM
    8474    header = (tmHeader*) RTMemAlloc (sizeof(tmHeader) + aLength);
    85 #else
    86     header = (tmHeader*) malloc (sizeof(tmHeader) + aLength);
    87 #endif
    8875    if (header) {
    8976      mRawMessageLength = sizeof(tmHeader) + aLength;
  • trunk/src/libs/xpcom18a4/ipc/ipcd/shared/src/ipcMessage.cpp

    r101996 r102334  
    205205                if (MsgLen() > IPC_MSG_GUESSED_SIZE) {
    206206                    // realloc message buffer to the correct size
    207 #ifdef VBOX_USE_IPRT_IN_XPCOM
    208207                    mMsgHdr = (ipcMessageHeader *) RTMemRealloc(mMsgHdr, MsgLen());
    209 #else
    210                     mMsgHdr = (ipcMessageHeader *) realloc(mMsgHdr, MsgLen());
    211 #endif
    212208                }
    213209            }
     
    219215            // allocate a partial buffer
    220216            PRUint32 msgLen = IPC_MSG_GUESSED_SIZE;
    221 #ifdef VBOX_USE_IPRT_IN_XPCOM
    222217            mMsgHdr = (ipcMessageHeader *) RTMemAlloc(msgLen);
    223 #else
    224             mMsgHdr = (ipcMessageHeader *) malloc(msgLen);
    225 #endif
    226218            if (!mMsgHdr)
    227219                return PR_FAILURE;
     
    234226        else {
    235227            PRUint32 msgLen = *(PRUint32 *) buf;
    236 #ifdef VBOX_USE_IPRT_IN_XPCOM
    237228            mMsgHdr = (ipcMessageHeader *) RTMemAlloc(msgLen);
    238 #else
    239             mMsgHdr = (ipcMessageHeader *) malloc(msgLen);
    240 #endif
    241229            if (!mMsgHdr)
    242230                return PR_FAILURE;
  • trunk/src/libs/xpcom18a4/ipc/ipcd/util/src/ipcMessageWriter.cpp

    r31259 r102334  
    4040#include "prmem.h"
    4141#include <string.h>
    42 #ifdef VBOX_USE_IPRT_IN_XPCOM
    43 # include <iprt/mem.h>
    44 #endif
     42
     43#include <iprt/mem.h>
    4544
    4645//*****************************************************************************
     
    5150{
    5251  if (mBuf)
    53 #ifdef VBOX_USE_IPRT_IN_XPCOM
    5452    RTMemFree(mBuf);
    55 #else
    56     free(mBuf);
    57 #endif
    5853}
    5954
     
    116111
    117112  PRInt32 curPos = mBufPtr - mBuf;
    118 #ifdef VBOX_USE_IPRT_IN_XPCOM
    119113  mBuf = (PRUint8*)RTMemRealloc(mBuf, mCapacity);
    120 #else
    121   mBuf = (PRUint8*)realloc(mBuf, mCapacity);
    122 #endif
    123114  if (!mBuf) {
    124115    mError = PR_TRUE;
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