Bug 579692 - Consistently qualify accesses to dependent base classes in xpcom C++ code. r=dbaron
authorEli Friedman <sharparrow1@yahoo.com>
Sun, 18 Jul 2010 10:24:23 +0200
changeset 47872 358360ecb8065087ac83d45c7aecfc65dbba813a
parent 47871 aae7ff3ffc789ab35d1d88b8e8d63a26fb1bf9a0
child 47873 0f3542a15b5b40d6d650bc28c6be3b2be84346a0
push id14456
push userdgottwald@mozilla.com
push dateSun, 18 Jul 2010 08:27:01 +0000
treeherderautoland@358360ecb806 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdbaron
bugs579692
milestone2.0b2pre
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 579692 - Consistently qualify accesses to dependent base classes in xpcom C++ code. r=dbaron
xpcom/glue/nsClassHashtable.h
xpcom/glue/nsInterfaceHashtable.h
--- a/xpcom/glue/nsClassHashtable.h
+++ b/xpcom/glue/nsClassHashtable.h
@@ -120,18 +120,17 @@ nsClassHashtable<KeyClass,T>::Get(KeyTyp
 
   return PR_FALSE;
 }
 
 template<class KeyClass,class T>
 T*
 nsClassHashtable<KeyClass,T>::Get(KeyType aKey) const
 {
-  typename nsBaseHashtable<KeyClass,nsAutoPtr<T>,T*>::EntryType* ent =
-    GetEntry(aKey);
+  typename base_type::EntryType* ent = this->GetEntry(aKey);
 
   if (!ent)
     return NULL;
 
   return ent->mData;
 }
 
 
--- a/xpcom/glue/nsInterfaceHashtable.h
+++ b/xpcom/glue/nsInterfaceHashtable.h
@@ -140,18 +140,17 @@ nsInterfaceHashtable<KeyClass,Interface>
 
   return PR_FALSE;
 }
 
 template<class KeyClass, class Interface>
 already_AddRefed<Interface>
 nsInterfaceHashtable<KeyClass,Interface>::Get(KeyType aKey) const
 {
-  typename nsBaseHashtable<KeyClass, nsCOMPtr<Interface>, Interface*>::EntryType* ent =
-    GetEntry(aKey);
+  typename base_type::EntryType* ent = this->GetEntry(aKey);
   if (!ent)
     return NULL;
 
   NS_IF_ADDREF(ent->mData);
   return already_AddRefed<Interface>(ent->mData);
 }
 
 template<class KeyClass,class Interface>