Renaming nsIAllocator to nsIMemory (and nsAllocator to nsMemory). API cleanup/freeze. Bug #18433
git-svn-id: svn://10.0.0.236/trunk@71450 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -1,3 +1,25 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public
|
||||
* License Version 1.1 (the "License"); you may not use this file
|
||||
* except in compliance with the License. You may obtain a copy of
|
||||
* the License at http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS
|
||||
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
* implied. See the License for the specific language governing
|
||||
* rights and limitations under the License.
|
||||
*
|
||||
* The Original Code is mozilla.org code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All
|
||||
* Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*/
|
||||
|
||||
#include "nsISupports.idl"
|
||||
|
||||
/* XXX should be built in */
|
||||
@@ -10,11 +32,11 @@ interface nsIProxyCreateInstance : nsISupports
|
||||
[noscript] void CreateInstanceByIID(in nsIIDRef cid,
|
||||
in nsISupports aOuter,
|
||||
in nsIIDRef iid,
|
||||
out voidStar result);
|
||||
out voidPtr result);
|
||||
|
||||
[noscript] void CreateInstanceByProgID(in string aProgID,
|
||||
in nsISupports aOuter,
|
||||
in nsIIDRef iid,
|
||||
out voidStar result);
|
||||
out voidPtr result);
|
||||
};
|
||||
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
|
||||
#include "nsRepository.h"
|
||||
#include "nsIServiceManager.h"
|
||||
#include "nsIAllocator.h"
|
||||
#include "nsMemory.h"
|
||||
#include "nsIEventQueueService.h"
|
||||
#include "nsIThread.h"
|
||||
|
||||
@@ -582,7 +582,7 @@ AutoProxyParameterList(PRUint32 methodIndex, nsXPTMethodInfo *methodInfo, nsXPTC
|
||||
|
||||
if( !currentType.IsPointer() ||
|
||||
currentType.TagPart() != nsXPTType::T_IID ||
|
||||
!(iid = (nsIID*) nsAllocator::Clone(params[arg_num].val.p, sizeof(nsIID))))
|
||||
!(iid = (nsIID*) nsMemory::Clone(params[arg_num].val.p, sizeof(nsIID))))
|
||||
{
|
||||
// This is really bad that we are here.
|
||||
rv = NS_ERROR_PROXY_INVALID_IN_PARAMETER;
|
||||
@@ -607,7 +607,7 @@ AutoProxyParameterList(PRUint32 methodIndex, nsXPTMethodInfo *methodInfo, nsXPTC
|
||||
printf(" could not find an IID for a parameter: %d\n", (i) );
|
||||
printf("**************************************************\n");
|
||||
|
||||
nsAllocator::Free((void*)interfaceName);
|
||||
nsMemory::Free((void*)interfaceName);
|
||||
#endif /* DEBUG */
|
||||
|
||||
|
||||
@@ -657,7 +657,7 @@ AutoProxyParameterList(PRUint32 methodIndex, nsXPTMethodInfo *methodInfo, nsXPTC
|
||||
|
||||
if (NS_SUCCEEDED( rv ) && iid && iid->Equals(NS_GET_IID(nsIAtom)))
|
||||
{
|
||||
nsAllocator::Free((void*)iid);
|
||||
nsMemory::Free((void*)iid);
|
||||
NS_RELEASE(manager);
|
||||
NS_RELEASE(eventQ);
|
||||
continue;
|
||||
@@ -676,7 +676,7 @@ AutoProxyParameterList(PRUint32 methodIndex, nsXPTMethodInfo *methodInfo, nsXPTC
|
||||
NS_RELEASE(eventQ);
|
||||
}
|
||||
|
||||
nsAllocator::Free((void*)iid);
|
||||
nsMemory::Free((void*)iid);
|
||||
NS_RELEASE(manager);
|
||||
|
||||
if (NS_FAILED(rv))
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
#include "nsIServiceManager.h"
|
||||
#include "nsCOMPtr.h"
|
||||
|
||||
#include "nsIAllocator.h"
|
||||
#include "nsMemory.h"
|
||||
#include "nsHashtable.h"
|
||||
|
||||
#include "nsAutoLock.h"
|
||||
@@ -118,7 +118,7 @@ nsProxyEventClass::GetNewOrUsedClass(REFNSIID aIID)
|
||||
if(NS_SUCCEEDED(oldest->GetIID(&iid)))
|
||||
{
|
||||
isISupportsDescendent = iid->Equals(NS_GET_IID(nsISupports));
|
||||
nsAllocator::Free(iid);
|
||||
nsMemory::Free(iid);
|
||||
}
|
||||
|
||||
NS_VERIFY(isISupportsDescendent,"!isISupportsDescendent");
|
||||
@@ -334,7 +334,7 @@ nsProxyEventClass::DelegatedQueryInterface(nsProxyEventObject* self,
|
||||
if(NS_SUCCEEDED(current->GetIID(&iid)) && iid)
|
||||
{
|
||||
PRBool found = aIID.Equals(*iid);
|
||||
nsAllocator::Free(iid);
|
||||
nsMemory::Free(iid);
|
||||
if(found)
|
||||
{
|
||||
*aInstancePtr = (void*) self;
|
||||
|
||||
@@ -80,7 +80,7 @@ nsProxyEventObject::DebugDump(const char * message, PRUint32 hashKey)
|
||||
GetClass()->GetInterfaceInfo()->GetName(&name);
|
||||
printf("interface name is %s\n", name);
|
||||
if(name)
|
||||
nsAllocator::Free(name);
|
||||
nsMemory::Free(name);
|
||||
char * iid = GetClass()->GetProxiedIID().ToString();
|
||||
printf("IID number is %s\n", iid);
|
||||
delete iid;
|
||||
|
||||
Reference in New Issue
Block a user