зеркало из https://github.com/mozilla/gecko-dev.git
Bug 471087. Kill nsIDKey. r=bsmedberg
--HG-- extra : rebase_source : 9d60a541863c545101417cf00a11cb9ceda70a09
This commit is contained in:
Родитель
40952ed115
Коммит
254745952a
|
@ -1762,7 +1762,6 @@ nsProxyEventClass::nsProxyEventClass(nsID const &, nsIInterfaceInfo *)
|
|||
|
||||
<nsProxyEventClass>
|
||||
__builtin_new
|
||||
nsIDKey::Clone(void) const
|
||||
nsHashtable::Put(nsHashKey *, void *)
|
||||
nsProxyEventClass::nsProxyEventClass(nsID const &, nsIInterfaceInfo *)
|
||||
|
||||
|
@ -1872,13 +1871,11 @@ nsComponentManagerImpl::RegisterFactory(nsID const &, char const *, char const *
|
|||
|
||||
<nsComponentManagerImpl>
|
||||
__builtin_new
|
||||
nsIDKey::Clone(void) const
|
||||
nsHashtable::Put(nsHashKey *, void *)
|
||||
nsComponentManagerImpl::PlatformPrePopulateRegistry(void)
|
||||
|
||||
<nsComponentManagerImpl>
|
||||
__builtin_new
|
||||
nsIDKey::Clone(void) const
|
||||
nsHashtable::Put(nsHashKey *, void *)
|
||||
nsComponentManagerImpl::RegisterFactory(nsID const &, char const *, char const *, nsIFactory *, int)
|
||||
|
||||
|
@ -1907,7 +1904,6 @@ nsComponentManagerImpl::RegisterComponentCommon(nsID const &, char const *, char
|
|||
|
||||
<nsComponentManagerImpl>
|
||||
__builtin_new
|
||||
nsIDKey::Clone(void) const
|
||||
nsHashtable::Put(nsHashKey *, void *)
|
||||
nsComponentManagerImpl::RegisterComponentCommon(nsID const &, char const *, char const *, char const *, int, int, char const *)
|
||||
|
||||
|
@ -3396,7 +3392,6 @@ nsGenericModule::GetClassObject(nsIComponentManager *, nsID const &, nsID const
|
|||
|
||||
<nsGenericModule>
|
||||
__builtin_new
|
||||
nsIDKey::Clone(void) const
|
||||
nsHashtable::Put(nsHashKey *, void *)
|
||||
nsSupportsHashtable::Put(nsHashKey *, nsISupports *, nsISupports **)
|
||||
nsGenericModule::GetClassObject(nsIComponentManager *, nsID const &, nsID const &, void **)
|
||||
|
@ -3489,7 +3484,6 @@ nsServiceManagerImpl::nsServiceManagerImpl(void)
|
|||
|
||||
<nsServiceManagerImpl>
|
||||
__builtin_new
|
||||
nsIDKey::Clone(void) const
|
||||
nsHashtable::Put(nsHashKey *, void *)
|
||||
nsServiceManagerImpl::GetService(nsID const &, nsID const &, nsISupports **, nsIShutdownListener *)
|
||||
|
||||
|
|
|
@ -468,18 +468,6 @@ nsISupportsKey::Write(nsIObjectOutputStream* aStream) const
|
|||
return rv;
|
||||
}
|
||||
|
||||
nsIDKey::nsIDKey(nsIObjectInputStream* aStream, nsresult *aResult)
|
||||
{
|
||||
*aResult = aStream->ReadID(&mID);
|
||||
}
|
||||
|
||||
nsresult nsIDKey::Write(nsIObjectOutputStream* aStream) const
|
||||
{
|
||||
return aStream->WriteID(mID);
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// Copy Constructor
|
||||
// We need to free mStr if the object is passed with mOwnership as OWN. As the
|
||||
// destructor here is freeing mStr in that case, mStr is NOT getting leaked here.
|
||||
|
|
|
@ -334,48 +334,6 @@ class nsVoidKey : public nsHashKey {
|
|||
void* GetValue() { return mKey; }
|
||||
};
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// nsIDKey: Where keys are nsIDs (e.g. nsIID, nsCID).
|
||||
|
||||
#include "nsID.h"
|
||||
|
||||
class NS_COM nsIDKey : public nsHashKey {
|
||||
protected:
|
||||
nsID mID;
|
||||
|
||||
public:
|
||||
nsIDKey(const nsIDKey& aKey) : mID(aKey.mID) {
|
||||
#ifdef DEBUG
|
||||
mKeyType = IDKey;
|
||||
#endif
|
||||
}
|
||||
|
||||
nsIDKey(const nsID &aID) {
|
||||
#ifdef DEBUG
|
||||
mKeyType = IDKey;
|
||||
#endif
|
||||
mID = aID;
|
||||
}
|
||||
|
||||
PRUint32 HashCode(void) const {
|
||||
return mID.m0;
|
||||
}
|
||||
|
||||
PRBool Equals(const nsHashKey *aKey) const {
|
||||
NS_ASSERTION(aKey->GetKeyType() == IDKey, "mismatched key types");
|
||||
return (mID.Equals(((const nsIDKey *) aKey)->mID));
|
||||
}
|
||||
|
||||
nsHashKey *Clone() const {
|
||||
return new nsIDKey(mID);
|
||||
}
|
||||
|
||||
nsIDKey(nsIObjectInputStream* aStream, nsresult *aResult);
|
||||
nsresult Write(nsIObjectOutputStream* aStream) const;
|
||||
};
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "nsString.h"
|
||||
|
||||
// for null-terminated c-strings
|
||||
|
|
Загрузка…
Ссылка в новой задаче