Changeset 103563 in vbox
- Timestamp:
- Feb 26, 2024 11:31:39 AM (9 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/libs/xpcom18a4/ipc/ipcd/extensions/dconnect/src/ipcDConnectService.cpp
r103562 r103563 503 503 case nsXPTType::T_IID: 504 504 { 505 nsID *buf = (nsID *) nsMemory::Alloc(sizeof(nsID));505 nsID *buf = (nsID *)RTMemAlloc(sizeof(nsID)); 506 506 IPCMsgReaderReadBytes(pMsgReader, buf, sizeof(nsID)); 507 507 v.val.p = buf; … … 520 520 else 521 521 { 522 char *buf = (char *) nsMemory::Alloc(len + 1);522 char *buf = (char *)RTMemAlloc(len + 1); 523 523 IPCMsgReaderReadBytes(pMsgReader, buf, len); 524 524 buf[len] = char(0); … … 540 540 else 541 541 { 542 PRUnichar *buf = (PRUnichar *) nsMemory::Alloc(len + 2);542 PRUnichar *buf = (PRUnichar *)RTMemAlloc(len + 2); 543 543 IPCMsgReaderReadBytes(pMsgReader, buf, len); 544 544 buf[len / 2] = PRUnichar(0); … … 686 686 687 687 if (v.IsValAllocated()) 688 nsMemory::Free(v.val.p);688 RTMemFree(v.val.p); 689 689 else if (v.IsValInterface()) 690 690 ((nsISupports *) v.val.p)->Release(); … … 745 745 case nsXPTType::T_IID: 746 746 { 747 nsID *buf = (nsID *) nsMemory::Alloc(sizeof(nsID));747 nsID *buf = (nsID *)RTMemAlloc(sizeof(nsID)); 748 748 IPCMsgReaderReadBytes(pMsgReader, buf, sizeof(nsID)); 749 749 *((nsID **) v.val.p) = buf; … … 765 765 else 766 766 { 767 char *buf = (char *) nsMemory::Alloc(len + 1);767 char *buf = (char *)RTMemAlloc(len + 1); 768 768 IPCMsgReaderReadBytes(pMsgReader, buf, len); 769 769 buf[len] = char(0); … … 788 788 else 789 789 { 790 PRUnichar *buf = (PRUnichar *) nsMemory::Alloc(len + 2);790 PRUnichar *buf = (PRUnichar *)RTMemAlloc(len + 2); 791 791 IPCMsgReaderReadBytes(pMsgReader, buf, len); 792 792 buf[len / 2] = PRUnichar(0); … … 803 803 // deserialize the DConAddr and the original value of v.val.p 804 804 // into v.val.p temporarily. needs temporary memory alloc. 805 DConAddrPlusPtr *buf = (DConAddrPlusPtr *) nsMemory::Alloc(sizeof(DConAddrPlusPtr));805 DConAddrPlusPtr *buf = (DConAddrPlusPtr *)RTMemAlloc(sizeof(DConAddrPlusPtr)); 806 806 IPCMsgReaderReadBytes(pMsgReader, &buf->addr, sizeof(DConAddr)); 807 807 buf->p = v.val.p; … … 1107 1107 // malloc(0) returns a null pointer or not (which is used in isNull()) 1108 1108 // is implementation-dependent according to the C standard 1109 void *arr = nsMemory::Alloc((size ? size : 1) * elemSize);1109 void *arr = RTMemAlloc((size ? size : 1) * elemSize); 1110 1110 if (arr == nsnull) 1111 1111 return NS_ERROR_OUT_OF_MEMORY; … … 1161 1161 1162 1162 if (NS_FAILED(rv)) 1163 nsMemory::Free(arr);1163 RTMemFree(arr); 1164 1164 else 1165 1165 array = arr; … … 2408 2408 iid->Equals(NS_GET_IID(nsISupports))) 2409 2409 { 2410 nsMemory::Free((void*)iid);2410 RTMemFree((void*)iid); 2411 2411 2412 2412 // nsISupports is queried on nsISupports, return ourselves … … 2420 2420 } 2421 2421 if (iid) 2422 nsMemory::Free((void*)iid);2422 RTMemFree((void*)iid); 2423 2423 } 2424 2424 … … 2678 2678 PtrBits bits = dptr->addr; 2679 2679 aParams[i].val.p = dptr->p; 2680 nsMemory::Free((void *)dptr);2680 RTMemFree((void *)dptr); 2681 2681 2682 2682 // DeserializeInterfaceParamBits needs IID only if it's a remote object … … 3697 3697 Log((" request-index=%d\n", (PRUint32) invoke->request_index)); 3698 3698 3699 params = new nsXPTCVariant[paramCount];3699 params = (nsXPTCVariant *)RTMemAllocZ(sizeof(nsXPTCVariant) * paramCount); 3700 3700 if (!params) 3701 3701 { … … 3915 3915 for (i=0; i<paramUsed; ++i) 3916 3916 FinishParam(params[i]); 3917 delete[] params;3918 } 3919 } 3917 RTMemFree(params); 3918 } 3919 }
Note:
See TracChangeset
for help on using the changeset viewer.