Remove unused getKey callback from PLDHashTableOps/JSDHashTableOps. b=374906 r=bsmedberg
authordbaron@dbaron.org
Tue, 27 Mar 2007 08:33:38 -0700
changeset 149 aec4549c91defbb33656b4c9e181a4bae7d551c7
parent 148 939f9d78a7301a4b6a59e4fb5a05ea42a9f6e45a
child 150 710aaee7ad28f0ec6497ff8fffa770b11db22ee7
push id1
push userroot
push dateTue, 26 Apr 2011 22:38:44 +0000
treeherdermozilla-beta@bfdb6e623a36 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbsmedberg
bugs374906
milestone1.9a4pre
Remove unused getKey callback from PLDHashTableOps/JSDHashTableOps. b=374906 r=bsmedberg
caps/include/nsScriptSecurityManager.h
chrome/src/nsChromeRegistry.cpp
chrome/src/nsChromeRegistry.h
content/base/src/nsContentList.cpp
content/base/src/nsContentUtils.cpp
content/base/src/nsDocument.cpp
content/html/document/src/nsHTMLDocument.cpp
content/xbl/src/nsBindingManager.cpp
content/xul/document/src/nsXULDocument.cpp
content/xul/templates/src/nsContentSupportMap.cpp
content/xul/templates/src/nsContentSupportMap.h
dom/src/base/nsScriptNameSpaceManager.cpp
embedding/components/commandhandler/src/nsCommandParams.cpp
embedding/components/commandhandler/src/nsCommandParams.h
extensions/java/xpcom/src/nsJavaXPCOMBindingUtils.cpp
js/src/jscntxt.c
js/src/jsdhash.c
js/src/jsdhash.h
js/src/jsparse.c
js/src/jsscope.c
js/src/xpconnect/src/xpcmaps.cpp
js/src/xpconnect/src/xpcmaps.h
layout/base/nsFrameManager.cpp
layout/style/nsCSSRuleProcessor.cpp
layout/style/nsHTMLStyleSheet.cpp
layout/style/nsRuleNode.cpp
layout/tables/SpanningCellSorter.cpp
layout/tables/SpanningCellSorter.h
modules/libpref/src/prefapi.cpp
modules/plugin/base/src/nsJSNPRuntime.cpp
netwerk/base/src/nsLoadGroup.cpp
netwerk/cache/src/nsCacheEntry.cpp
netwerk/cache/src/nsCacheEntry.h
netwerk/cache/src/nsDiskCacheBinding.cpp
netwerk/dns/src/nsHostResolver.cpp
netwerk/protocol/http/src/nsHttp.cpp
parser/htmlparser/src/nsHTMLEntities.cpp
rdf/base/src/nsRDFService.cpp
security/manager/boot/src/nsSecureBrowserUIImpl.cpp
security/manager/ssl/src/nsCertTree.cpp
security/manager/ssl/src/nsNSSShutDown.cpp
uriloader/base/nsDocLoader.cpp
widget/src/gtk/nsWindow.cpp
xpcom/components/nsComponentManager.cpp
xpcom/components/nsStaticComponentLoader.cpp
xpcom/ds/nsAtomTable.cpp
xpcom/ds/nsDoubleHashtable.h
xpcom/ds/nsHashtable.cpp
xpcom/ds/nsPersistentProperties.cpp
xpcom/ds/nsStaticNameTable.cpp
xpcom/glue/nsTHashtable.h
xpcom/glue/pldhash.c
xpcom/glue/pldhash.h
xpcom/io/nsFastLoadFile.cpp
xpcom/reflect/xptinfo/src/xptiWorkingSet.cpp
--- a/caps/include/nsScriptSecurityManager.h
+++ b/caps/include/nsScriptSecurityManager.h
@@ -240,17 +240,16 @@ PR_STATIC_CALLBACK(PRBool)
 InitClassPolicyEntry(PLDHashTable *table,
                      PLDHashEntryHdr *entry,
                      const void *key)
 {
     static PLDHashTableOps classPolicyOps =
     {
         PL_DHashAllocTable,
         PL_DHashFreeTable,
-        PL_DHashGetKeyStub,
         PL_DHashVoidPtrKeyStub,
         PL_DHashMatchEntryStub,
         PL_DHashMoveEntryStub,
         ClearPropertyPolicyEntry,
         PL_DHashFinalizeStub,
         InitPropertyPolicyEntry
     };
 
@@ -286,17 +285,16 @@ public:
     }
 
     PRBool Init()
     {
         static const PLDHashTableOps domainPolicyOps =
         {
             PL_DHashAllocTable,
             PL_DHashFreeTable,
-            PL_DHashGetKeyStub,
             PL_DHashStringKey,
             PL_DHashMatchStringKey,
             MoveClassPolicyEntry,
             ClearClassPolicyEntry,
             PL_DHashFinalizeStub,
             InitClassPolicyEntry
         };
 
--- a/chrome/src/nsChromeRegistry.cpp
+++ b/chrome/src/nsChromeRegistry.cpp
@@ -334,23 +334,16 @@ nsChromeRegistry::nsProviderArray::Clear
   mArray.Clear();
 }
 
 nsChromeRegistry::PackageEntry::PackageEntry(const nsACString& aPackage) :
   package(aPackage), flags(0)
 {
 }
 
-const void*
-nsChromeRegistry::GetKey(PLDHashTable *table, PLDHashEntryHdr *entry)
-{
-  PackageEntry* pentry = NS_STATIC_CAST(PackageEntry*, entry);
-  return (nsACString*) &pentry->package;
-}
-
 PLHashNumber
 nsChromeRegistry::HashKey(PLDHashTable *table, const void *key)
 {
   const nsACString& str = *NS_REINTERPRET_CAST(const nsACString*, key);
   return HashString(str);
 }
 
 PRBool
@@ -378,17 +371,16 @@ nsChromeRegistry::InitEntry(PLDHashTable
   new (entry) PackageEntry(str);
   return PR_TRUE;
 }
 
 const PLDHashTableOps
 nsChromeRegistry::kTableOps = {
   PL_DHashAllocTable,
   PL_DHashFreeTable,
-  GetKey,
   HashKey,
   MatchKey,
   PL_DHashMoveEntryStub,
   ClearEntry,
   PL_DHashFinalizeStub,
   InitEntry
 };
 
--- a/chrome/src/nsChromeRegistry.h
+++ b/chrome/src/nsChromeRegistry.h
@@ -191,17 +191,16 @@ public:
     nsCString        package;
     nsCOMPtr<nsIURI> baseURI;
     PRUint32         flags;
     nsProviderArray  locales;
     nsProviderArray  skins;
   };
 
 private:
-  static const void*   GetKey(PLDHashTable *table, PLDHashEntryHdr *entry);
   static PLDHashNumber HashKey(PLDHashTable *table, const void *key);
   static PRBool        MatchKey(PLDHashTable *table, const PLDHashEntryHdr *entry,
                                 const void *key);
   static void          ClearEntry(PLDHashTable *table, PLDHashEntryHdr *entry);
   static PRBool        InitEntry(PLDHashTable *table, PLDHashEntryHdr *entry,
                                  const void *key);
 
   static const PLDHashTableOps kTableOps;
--- a/content/base/src/nsContentList.cpp
+++ b/content/base/src/nsContentList.cpp
@@ -181,23 +181,16 @@ nsFormContentList::nsFormContentList(nsI
 // Hashtable for storing nsContentLists
 static PLDHashTable gContentListHashTable;
 
 struct ContentListHashEntry : public PLDHashEntryHdr
 {
   nsContentList* mContentList;
 };
 
-PR_STATIC_CALLBACK(const void *)
-ContentListHashtableGetKey(PLDHashTable *table, PLDHashEntryHdr *entry)
-{
-  ContentListHashEntry *e = NS_STATIC_CAST(ContentListHashEntry *, entry);
-  return e->mContentList->GetKey();
-}
-
 PR_STATIC_CALLBACK(PLDHashNumber)
 ContentListHashtableHashKey(PLDHashTable *table, const void *key)
 {
   const nsContentListKey* list = NS_STATIC_CAST(const nsContentListKey *, key);
   return list->GetHash();
 }
 
 PR_STATIC_CALLBACK(PRBool)
@@ -220,17 +213,16 @@ NS_GetContentList(nsINode* aRootNode, ns
   NS_ASSERTION(aRootNode, "content list has to have a root");
 
   nsContentList* list = nsnull;
 
   static PLDHashTableOps hash_table_ops =
   {
     PL_DHashAllocTable,
     PL_DHashFreeTable,
-    ContentListHashtableGetKey,
     ContentListHashtableHashKey,
     ContentListHashtableMatchEntry,
     PL_DHashMoveEntryStub,
     PL_DHashClearEntryStub,
     PL_DHashFinalizeStub
   };
 
   // Initialize the hashtable if needed.
--- a/content/base/src/nsContentUtils.cpp
+++ b/content/base/src/nsContentUtils.cpp
@@ -279,17 +279,16 @@ nsContentUtils::Init()
     return NS_ERROR_OUT_OF_MEMORY;
   }
 
   if (!sEventListenerManagersHash.ops) {
     static PLDHashTableOps hash_table_ops =
     {
       PL_DHashAllocTable,
       PL_DHashFreeTable,
-      PL_DHashGetKeyStub,
       PL_DHashVoidPtrKeyStub,
       PL_DHashMatchEntryStub,
       PL_DHashMoveEntryStub,
       EventListenerManagerHashClearEntry,
       PL_DHashFinalizeStub,
       EventListenerManagerHashInitEntry
     };
 
--- a/content/base/src/nsDocument.cpp
+++ b/content/base/src/nsDocument.cpp
@@ -2038,17 +2038,16 @@ nsDocument::SetSubDocumentFor(nsIContent
   } else {
     if (!mSubDocuments) {
       // Create a new hashtable
 
       static PLDHashTableOps hash_table_ops =
       {
         PL_DHashAllocTable,
         PL_DHashFreeTable,
-        PL_DHashGetKeyStub,
         PL_DHashVoidPtrKeyStub,
         PL_DHashMatchEntryStub,
         PL_DHashMoveEntryStub,
         SubDocClearEntry,
         PL_DHashFinalizeStub,
         SubDocInitEntry
       };
 
--- a/content/html/document/src/nsHTMLDocument.cpp
+++ b/content/html/document/src/nsHTMLDocument.cpp
@@ -269,24 +269,16 @@ IdAndNameMapEntry::AddIdContent(nsIConte
     // nothing else to do here
     return PR_TRUE;
   }
     
   return mIdContentList.AppendElement(aContent);
 }
 
 
-PR_STATIC_CALLBACK(const void *)
-IdAndNameHashGetKey(PLDHashTable *table, PLDHashEntryHdr *entry)
-{
-  IdAndNameMapEntry *e = NS_STATIC_CAST(IdAndNameMapEntry *, entry);
-
-  return NS_STATIC_CAST(const nsIAtom *, e->mKey);
-}
-
 PR_STATIC_CALLBACK(PLDHashNumber)
 IdAndNameHashHashKey(PLDHashTable *table, const void *key)
 {
   // Our key is an nsIAtom*, so just shift it and use that as the hash.
   return NS_PTR_TO_INT32(key) >> 2;
 }
 
 PR_STATIC_CALLBACK(PRBool)
@@ -402,17 +394,16 @@ nsHTMLDocument::Init()
   // match our compat mode.
   CSSLoader()->SetCaseSensitive(IsXHTML());
   CSSLoader()->SetCompatibilityMode(mCompatMode);
 
   static PLDHashTableOps hash_table_ops =
   {
     PL_DHashAllocTable,
     PL_DHashFreeTable,
-    IdAndNameHashGetKey,
     IdAndNameHashHashKey,
     IdAndNameHashMatchEntry,
     PL_DHashMoveEntryStub,
     IdAndNameHashClearEntry,
     PL_DHashFinalizeStub,
     IdAndNameHashInitEntry
   };
 
--- a/content/xbl/src/nsBindingManager.cpp
+++ b/content/xbl/src/nsBindingManager.cpp
@@ -197,17 +197,16 @@ InitObjectEntry(PLDHashTable* table, PLD
   return PR_TRUE;
 }
   
 
 
 static PLDHashTableOps ObjectTableOps = {
   PL_DHashAllocTable,
   PL_DHashFreeTable,
-  PL_DHashGetKeyStub,
   PL_DHashVoidPtrKeyStub,
   PL_DHashMatchEntryStub,
   PL_DHashMoveEntryStub,
   ClearObjectEntry,
   PL_DHashFinalizeStub,
   InitObjectEntry
 };
 
--- a/content/xul/document/src/nsXULDocument.cpp
+++ b/content/xul/document/src/nsXULDocument.cpp
@@ -750,17 +750,16 @@ nsXULDocument::AddBroadcastListenerFor(n
 
     if (NS_FAILED(rv)) {
         return rv;
     }
 
     static PLDHashTableOps gOps = {
         PL_DHashAllocTable,
         PL_DHashFreeTable,
-        PL_DHashGetKeyStub,
         PL_DHashVoidPtrKeyStub,
         PL_DHashMatchEntryStub,
         PL_DHashMoveEntryStub,
         ClearBroadcasterMapEntry,
         PL_DHashFinalizeStub,
         nsnull
     };
 
--- a/content/xul/templates/src/nsContentSupportMap.cpp
+++ b/content/xul/templates/src/nsContentSupportMap.cpp
@@ -34,37 +34,21 @@
  * the provisions above, a recipient may use your version of this file under
  * the terms of any one of the MPL, the GPL or the LGPL.
  *
  * ***** END LICENSE BLOCK ***** */
 
 #include "nsContentSupportMap.h"
 #include "nsXULElement.h"
 
-PLDHashTableOps nsContentSupportMap::gOps = {
-    PL_DHashAllocTable,
-    PL_DHashFreeTable,
-    PL_DHashGetKeyStub,
-    PL_DHashVoidPtrKeyStub,
-    PL_DHashMatchEntryStub,
-    PL_DHashMoveEntryStub,
-    ClearEntry,
-    PL_DHashFinalizeStub
-};
-
-void PR_CALLBACK
-nsContentSupportMap::ClearEntry(PLDHashTable* aTable, PLDHashEntryHdr* aHdr)
-{
-    PL_DHashClearEntryStub(aTable, aHdr);
-}
-
 void
 nsContentSupportMap::Init()
 {
-    if (!PL_DHashTableInit(&mMap, &gOps, nsnull, sizeof(Entry), PL_DHASH_MIN_SIZE))
+    if (!PL_DHashTableInit(&mMap, PL_DHashGetStubOps(), nsnull,
+                           sizeof(Entry), PL_DHASH_MIN_SIZE))
         mMap.ops = nsnull;
 }
 
 void
 nsContentSupportMap::Finish()
 {
     if (mMap.ops)
         PL_DHashTableFinish(&mMap);
--- a/content/xul/templates/src/nsContentSupportMap.h
+++ b/content/xul/templates/src/nsContentSupportMap.h
@@ -94,16 +94,11 @@ protected:
     void Init();
     void Finish();
 
     struct Entry {
         PLDHashEntryHdr  mHdr;
         nsIContent*      mContent;
         nsTemplateMatch* mMatch;
     };
-
-    static PLDHashTableOps gOps;
-
-    static void PR_CALLBACK
-    ClearEntry(PLDHashTable* aTable, PLDHashEntryHdr* aHdr);
 };
 
 #endif
--- a/dom/src/base/nsScriptNameSpaceManager.cpp
+++ b/dom/src/base/nsScriptNameSpaceManager.cpp
@@ -63,24 +63,16 @@ class GlobalNameMapEntry : public PLDHas
 {
 public:
   // Our hash table ops don't care about the order of these members
   nsString mKey;
   nsGlobalNameStruct mGlobalName;
 };
 
 
-PR_STATIC_CALLBACK(const void *)
-GlobalNameHashGetKey(PLDHashTable *table, PLDHashEntryHdr *entry)
-{
-  GlobalNameMapEntry *e = NS_STATIC_CAST(GlobalNameMapEntry *, entry);
-
-  return NS_STATIC_CAST(const nsAString *, &e->mKey);
-}
-
 PR_STATIC_CALLBACK(PLDHashNumber)
 GlobalNameHashHashKey(PLDHashTable *table, const void *key)
 {
   const nsAString *str = NS_STATIC_CAST(const nsAString *, key);
 
   return HashString(*str);
 }
 
@@ -456,17 +448,16 @@ nsScriptNameSpaceManager::RegisterInterf
 
 nsresult
 nsScriptNameSpaceManager::Init()
 {
   static PLDHashTableOps hash_table_ops =
   {
     PL_DHashAllocTable,
     PL_DHashFreeTable,
-    GlobalNameHashGetKey,
     GlobalNameHashHashKey,
     GlobalNameHashMatchEntry,
     PL_DHashMoveEntryStub,
     GlobalNameHashClearEntry,
     PL_DHashFinalizeStub,
     GlobalNameHashInitEntry
   };
 
--- a/embedding/components/commandhandler/src/nsCommandParams.cpp
+++ b/embedding/components/commandhandler/src/nsCommandParams.cpp
@@ -42,17 +42,16 @@
 
 #include "nsCommandParams.h"
 
 
 PLDHashTableOps nsCommandParams::sHashOps =
 {
     PL_DHashAllocTable,
     PL_DHashFreeTable,
-    HashGetKey,
     HashKey,
     HashMatchEntry,
     HashMoveEntry,
     HashClearEntry,
     PL_DHashFinalizeStub
 };
 
 
@@ -349,24 +348,16 @@ nsCommandParams::GetOrMakeEntry(const ch
   outEntry = new (foundEntry) HashEntry(entryType, name);  
   return NS_OK;
 }
 
 #if 0
 #pragma mark -
 #endif
 
-const void *
-nsCommandParams::HashGetKey(PLDHashTable *table, PLDHashEntryHdr *entry)
-{
-  HashEntry*    thisEntry = NS_STATIC_CAST(HashEntry*, entry);
-  return (void *)thisEntry->mEntryName.get();
-}
-
-
 PLDHashNumber
 nsCommandParams::HashKey(PLDHashTable *table, const void *key)
 {
   return nsCRT::HashCode((const char *)key);
 }
 
 PRBool
 nsCommandParams::HashMatchEntry(PLDHashTable *table,
--- a/embedding/components/commandhandler/src/nsCommandParams.h
+++ b/embedding/components/commandhandler/src/nsCommandParams.h
@@ -146,18 +146,16 @@ protected:
   HashEntry*          GetNamedEntry(const char * name);
   HashEntry*          GetIndexedEntry(PRInt32 index);
   PRUint32            GetNumEntries();
   
   nsresult            GetOrMakeEntry(const char * name, PRUint8 entryType, HashEntry*& outEntry);
   
 protected:
 
-  static const void * PR_CALLBACK  HashGetKey(PLDHashTable *table, PLDHashEntryHdr *entry);
-
   static PLDHashNumber PR_CALLBACK HashKey(PLDHashTable *table, const void *key);
 
   static PRBool PR_CALLBACK        HashMatchEntry(PLDHashTable *table,
                                                   const PLDHashEntryHdr *entry, const void *key);
   
   static void PR_CALLBACK          HashMoveEntry(PLDHashTable *table, const PLDHashEntryHdr *from,
                                                  PLDHashEntryHdr *to);
   
--- a/extensions/java/xpcom/src/nsJavaXPCOMBindingUtils.cpp
+++ b/extensions/java/xpcom/src/nsJavaXPCOMBindingUtils.cpp
@@ -444,38 +444,27 @@ FreeJavaGlobals(JNIEnv* env)
   }
 }
 
 
 /**************************************
  *  Java<->XPCOM object mappings
  **************************************/
 
-static PLDHashTableOps hash_ops =
-{
-  PL_DHashAllocTable,
-  PL_DHashFreeTable,
-  PL_DHashGetKeyStub,
-  PL_DHashVoidPtrKeyStub,
-  PL_DHashMatchEntryStub,
-  PL_DHashMoveEntryStub,
-  PL_DHashClearEntryStub,
-  PL_DHashFinalizeStub
-};
-
 // NativeToJavaProxyMap: The common case is that each XPCOM object will have
 // one Java proxy.  But there are instances where there will be multiple Java
 // proxies for a given XPCOM object, each representing a different interface.
 // So we optimize the common case by using a hash table.  Then, if there are
 // multiple Java proxies, we cycle through the linked list, comparing IIDs.
 
 nsresult
 NativeToJavaProxyMap::Init()
 {
-  mHashTable = PL_NewDHashTable(&hash_ops, nsnull, sizeof(Entry), 16);
+  mHashTable = PL_NewDHashTable(PL_DHashGetStubOps(), nsnull,
+                                sizeof(Entry), 16);
   if (!mHashTable)
     return NS_ERROR_OUT_OF_MEMORY;
   return NS_OK;
 }
 
 PLDHashOperator
 DestroyJavaProxyMappingEnum(PLDHashTable* aTable, PLDHashEntryHdr* aHeader,
                             PRUint32 aNumber, void* aData)
@@ -654,17 +643,18 @@ NativeToJavaProxyMap::Remove(JNIEnv* env
 
   NS_WARNING("Java proxy matching given IID not found");
   return NS_ERROR_FAILURE;
 }
 
 nsresult
 JavaToXPTCStubMap::Init()
 {
-  mHashTable = PL_NewDHashTable(&hash_ops, nsnull, sizeof(Entry), 16);
+  mHashTable = PL_NewDHashTable(PL_DHashGetStubOps(), nsnull,
+                                sizeof(Entry), 16);
   if (!mHashTable)
     return NS_ERROR_OUT_OF_MEMORY;
   return NS_OK;
 }
 
 
 PLDHashOperator
 DestroyXPTCMappingEnum(PLDHashTable* aTable, PLDHashEntryHdr* aHeader,
--- a/js/src/jscntxt.c
+++ b/js/src/jscntxt.c
@@ -497,24 +497,16 @@ js_ContextIterator(JSRuntime *rt, JSBool
     if (&cx->links == &rt->contextList)
         cx = NULL;
     *iterp = cx;
     if (unlocked)
         JS_UNLOCK_GC(rt);
     return cx;
 }
 
-JS_STATIC_DLL_CALLBACK(const void *)
-resolving_GetKey(JSDHashTable *table, JSDHashEntryHdr *hdr)
-{
-    JSResolvingEntry *entry = (JSResolvingEntry *)hdr;
-
-    return &entry->key;
-}
-
 JS_STATIC_DLL_CALLBACK(JSDHashNumber)
 resolving_HashKey(JSDHashTable *table, const void *ptr)
 {
     const JSResolvingKey *key = (const JSResolvingKey *)ptr;
 
     return ((JSDHashNumber)JS_PTR_TO_UINT32(key->obj) >> JSVAL_TAGBITS) ^ key->id;
 }
 
@@ -527,17 +519,16 @@ resolving_MatchEntry(JSDHashTable *table
     const JSResolvingKey *key = (const JSResolvingKey *)ptr;
 
     return entry->key.obj == key->obj && entry->key.id == key->id;
 }
 
 static const JSDHashTableOps resolving_dhash_ops = {
     JS_DHashAllocTable,
     JS_DHashFreeTable,
-    resolving_GetKey,
     resolving_HashKey,
     resolving_MatchEntry,
     JS_DHashMoveEntryStub,
     JS_DHashClearEntryStub,
     JS_DHashFinalizeStub,
     NULL
 };
 
--- a/js/src/jsdhash.c
+++ b/js/src/jsdhash.c
@@ -102,24 +102,16 @@ JS_DHashStringKey(JSDHashTable *table, c
     const unsigned char *s;
 
     h = 0;
     for (s = key; *s != '\0'; s++)
         h = (h >> (JS_DHASH_BITS - 4)) ^ (h << 4) ^ *s;
     return h;
 }
 
-JS_PUBLIC_API(const void *)
-JS_DHashGetKeyStub(JSDHashTable *table, JSDHashEntryHdr *entry)
-{
-    JSDHashEntryStub *stub = (JSDHashEntryStub *)entry;
-
-    return stub->key;
-}
-
 JS_PUBLIC_API(JSDHashNumber)
 JS_DHashVoidPtrKeyStub(JSDHashTable *table, const void *key)
 {
     return (JSDHashNumber)(unsigned long)key >> 2;
 }
 
 JS_PUBLIC_API(JSBool)
 JS_DHashMatchEntryStub(JSDHashTable *table,
@@ -169,17 +161,16 @@ JS_DHashFreeStringKey(JSDHashTable *tabl
 JS_PUBLIC_API(void)
 JS_DHashFinalizeStub(JSDHashTable *table)
 {
 }
 
 static const JSDHashTableOps stub_ops = {
     JS_DHashAllocTable,
     JS_DHashFreeTable,
-    JS_DHashGetKeyStub,
     JS_DHashVoidPtrKeyStub,
     JS_DHashMatchEntryStub,
     JS_DHashMoveEntryStub,
     JS_DHashClearEntryStub,
     JS_DHashFinalizeStub,
     NULL
 };
 
--- a/js/src/jsdhash.h
+++ b/js/src/jsdhash.h
@@ -81,21 +81,22 @@ typedef struct JSDHashEntryHdr  JSDHashE
 typedef struct JSDHashEntryStub JSDHashEntryStub;
 typedef struct JSDHashTable     JSDHashTable;
 typedef struct JSDHashTableOps  JSDHashTableOps;
 
 /*
  * Table entry header structure.
  *
  * In order to allow in-line allocation of key and value, we do not declare
- * either here.  Instead, the API uses const void *key as a formal parameter,
- * and asks each entry for its key when necessary via a getKey callback, used
- * when growing or shrinking the table.  Other callback types are defined
- * below and grouped into the JSDHashTableOps structure, for single static
- * initialization per hash table sub-type.
+ * either here.  Instead, the API uses const void *key as a formal parameter.
+ * The key need not be stored in the entry; it may be part of the value, but
+ * need not be stored at all.
+ *
+ * Callback types are defined below and grouped into the JSDHashTableOps
+ * structure, for single static initialization per hash table sub-type.
  *
  * Each hash table sub-type should nest the JSDHashEntryHdr structure at the
  * front of its particular entry type.  The keyHash member contains the result
  * of multiplying the hash code returned from the hashKey callback (see below)
  * by JS_DHASH_GOLDEN_RATIO, then constraining the result to avoid the magic 0
  * and 1 values.  The stored keyHash value is table size invariant, and it is
  * maintained automatically by JS_DHashTableOperate -- users should never set
  * it, and its only uses should be via the entry macros below.
@@ -238,26 +239,16 @@ struct JSDHashTable {
  */
 typedef void *
 (* JS_DLL_CALLBACK JSDHashAllocTable)(JSDHashTable *table, uint32 nbytes);
 
 typedef void
 (* JS_DLL_CALLBACK JSDHashFreeTable) (JSDHashTable *table, void *ptr);
 
 /*
- * When a table grows or shrinks, each entry is queried for its key using this
- * callback.  NB: in that event, entry is not in table any longer; it's in the
- * old entryStore vector, which is due to be freed once all entries have been
- * moved via moveEntry callbacks.
- */
-typedef const void *
-(* JS_DLL_CALLBACK JSDHashGetKey)    (JSDHashTable *table,
-                                      JSDHashEntryHdr *entry);
-
-/*
  * Compute the hash code for a given key to be looked up, added, or removed
  * from table.  A hash code may have any JSDHashNumber value.
  */
 typedef JSDHashNumber
 (* JS_DLL_CALLBACK JSDHashHashKey)   (JSDHashTable *table, const void *key);
 
 /*
  * Compare the key identifying entry in table with the provided key parameter.
@@ -334,17 +325,16 @@ typedef JSBool
  * course, the clearEntry hook must zero or null appropriately.
  *
  * XXX assumes 0 is null for pointer types.
  */
 struct JSDHashTableOps {
     /* Mandatory hooks.  All implementations must provide these. */
     JSDHashAllocTable   allocTable;
     JSDHashFreeTable    freeTable;
-    JSDHashGetKey       getKey;
     JSDHashHashKey      hashKey;
     JSDHashMatchEntry   matchEntry;
     JSDHashMoveEntry    moveEntry;
     JSDHashClearEntry   clearEntry;
     JSDHashFinalize     finalize;
 
     /* Optional hooks start here.  If null, these are not called. */
     JSDHashInitEntry    initEntry;
@@ -363,19 +353,16 @@ extern JS_PUBLIC_API(JSDHashNumber)
 JS_DHashStringKey(JSDHashTable *table, const void *key);
 
 /* A minimal entry contains a keyHash header and a void key pointer. */
 struct JSDHashEntryStub {
     JSDHashEntryHdr hdr;
     const void      *key;
 };
 
-extern JS_PUBLIC_API(const void *)
-JS_DHashGetKeyStub(JSDHashTable *table, JSDHashEntryHdr *entry);
-
 extern JS_PUBLIC_API(JSDHashNumber)
 JS_DHashVoidPtrKeyStub(JSDHashTable *table, const void *key);
 
 extern JS_PUBLIC_API(JSBool)
 JS_DHashMatchEntryStub(JSDHashTable *table,
                        const JSDHashEntryHdr *entry,
                        const void *key);
 
--- a/js/src/jsparse.c
+++ b/js/src/jsparse.c
@@ -2004,17 +2004,16 @@ MatchFindPropValEntry(JSDHashTable *tabl
            ((pnkey->pn_type == TOK_NUMBER)
             ? pnkey->pn_dval == fpve->pnkey->pn_dval
             : pnkey->pn_atom == fpve->pnkey->pn_atom);
 }
 
 static const JSDHashTableOps FindPropValOps = {
     JS_DHashAllocTable,
     JS_DHashFreeTable,
-    JS_DHashGetKeyStub,
     HashFindPropValKey,
     MatchFindPropValEntry,
     JS_DHashMoveEntryStub,
     JS_DHashClearEntryStub,
     JS_DHashFinalizeStub,
     NULL
 };
 
--- a/js/src/jsscope.c
+++ b/js/src/jsscope.c
@@ -434,17 +434,16 @@ js_MatchScopeProperty(JSDHashTable *tabl
     const JSScopeProperty *kprop = (const JSScopeProperty *)key;
 
     return SPROP_MATCH(sprop, kprop);
 }
 
 static const JSDHashTableOps PropertyTreeHashOps = {
     JS_DHashAllocTable,
     JS_DHashFreeTable,
-    JS_DHashGetKeyStub,
     js_HashScopeProperty,
     js_MatchScopeProperty,
     JS_DHashMoveEntryStub,
     JS_DHashClearEntryStub,
     JS_DHashFinalizeStub,
     NULL
 };
 
--- a/js/src/xpconnect/src/xpcmaps.cpp
+++ b/js/src/xpconnect/src/xpcmaps.cpp
@@ -200,17 +200,16 @@ Native2WrappedNativeMap::~Native2Wrapped
 
 /***************************************************************************/
 // implement IID2WrappedJSClassMap...
 
 struct JSDHashTableOps IID2WrappedJSClassMap::Entry::sOps =
 {
     JS_DHashAllocTable,
     JS_DHashFreeTable,
-    JS_DHashGetKeyStub,
     HashIIDPtrKey,
     MatchIIDPtrKey,
     JS_DHashMoveEntryStub,
     JS_DHashClearEntryStub,
     JS_DHashFinalizeStub
 };
 
 // static
@@ -238,17 +237,16 @@ IID2WrappedJSClassMap::~IID2WrappedJSCla
 
 /***************************************************************************/
 // implement IID2NativeInterfaceMap...
 
 struct JSDHashTableOps IID2NativeInterfaceMap::Entry::sOps =
 {
     JS_DHashAllocTable,
     JS_DHashFreeTable,
-    JS_DHashGetKeyStub,
     HashIIDPtrKey,
     MatchIIDPtrKey,
     JS_DHashMoveEntryStub,
     JS_DHashClearEntryStub,
     JS_DHashFinalizeStub
 };
 
 // static
@@ -406,17 +404,16 @@ NativeSetMap::Entry::Match(JSDHashTable 
 
     return JS_TRUE;
 }
 
 struct JSDHashTableOps NativeSetMap::Entry::sOps =
 {
     JS_DHashAllocTable,
     JS_DHashFreeTable,
-    JS_DHashGetKeyStub,
     HashNativeKey,
     Match,
     JS_DHashMoveEntryStub,
     JS_DHashClearEntryStub,
     JS_DHashFinalizeStub
 };
 
 // static
@@ -439,22 +436,16 @@ NativeSetMap::~NativeSetMap()
 {
     if(mTable)
         JS_DHashTableDestroy(mTable);
 }
 
 /***************************************************************************/
 // implement IID2ThisTranslatorMap...
 
-const void* JS_DLL_CALLBACK
-IID2ThisTranslatorMap::Entry::GetKey(JSDHashTable *table, JSDHashEntryHdr *entry)
-{
-    return &((Entry*)entry)->key;
-}
-
 JSBool JS_DLL_CALLBACK
 IID2ThisTranslatorMap::Entry::Match(JSDHashTable *table,
                                     const JSDHashEntryHdr *entry,
                                     const void *key)
 {
     return ((const nsID*)key)->Equals(((Entry*)entry)->key);
 }
 
@@ -464,17 +455,16 @@ IID2ThisTranslatorMap::Entry::Clear(JSDH
     NS_IF_RELEASE(((Entry*)entry)->value);
     memset(entry, 0, table->entrySize);
 }
 
 struct JSDHashTableOps IID2ThisTranslatorMap::Entry::sOps =
 {
     JS_DHashAllocTable,
     JS_DHashFreeTable,
-    GetKey,
     HashIIDPtrKey,
     Match,
     JS_DHashMoveEntryStub,
     Clear,
     JS_DHashFinalizeStub
 };
 
 // static
@@ -542,17 +532,16 @@ XPCNativeScriptableSharedMap::Entry::Mat
 
     return 0 == strcmp(name1, name2);
 }
 
 struct JSDHashTableOps XPCNativeScriptableSharedMap::Entry::sOps =
 {
     JS_DHashAllocTable,
     JS_DHashFreeTable,
-    JS_DHashGetKeyStub,
     Hash,
     Match,
     JS_DHashMoveEntryStub,
     JS_DHashClearEntryStub,
     JS_DHashFinalizeStub
 };
 
 // static
--- a/js/src/xpconnect/src/xpcmaps.h
+++ b/js/src/xpconnect/src/xpcmaps.h
@@ -514,19 +514,16 @@ private:
 class IID2ThisTranslatorMap
 {
 public:
     struct Entry : public JSDHashEntryHdr
     {
         nsIID                         key;
         nsIXPCFunctionThisTranslator* value;
 
-        static const void* JS_DLL_CALLBACK
-        GetKey(JSDHashTable *table, JSDHashEntryHdr *entry);
-
         static JSBool JS_DLL_CALLBACK
         Match(JSDHashTable *table,
               const JSDHashEntryHdr *entry,
               const void *key);
 
         static void JS_DLL_CALLBACK
         Clear(JSDHashTable *table, JSDHashEntryHdr *entry);
 
--- a/layout/base/nsFrameManager.cpp
+++ b/layout/base/nsFrameManager.cpp
@@ -118,42 +118,31 @@
 
 //----------------------------------------------------------------------
 
 struct PlaceholderMapEntry : public PLDHashEntryHdr {
   // key (the out of flow frame) can be obtained through placeholder frame
   nsPlaceholderFrame *placeholderFrame;
 };
 
-PR_STATIC_CALLBACK(const void *)
-PlaceholderMapGetKey(PLDHashTable *table, PLDHashEntryHdr *hdr)
-{
-  PlaceholderMapEntry *entry = NS_STATIC_CAST(PlaceholderMapEntry*, hdr);
-  NS_ASSERTION(entry->placeholderFrame->GetOutOfFlowFrame() !=
-               (void*)0xdddddddd,
-               "Dead placeholder in placeholder map");
-  return entry->placeholderFrame->GetOutOfFlowFrame();
-}
-
 PR_STATIC_CALLBACK(PRBool)
 PlaceholderMapMatchEntry(PLDHashTable *table, const PLDHashEntryHdr *hdr,
                          const void *key)
 {
   const PlaceholderMapEntry *entry =
     NS_STATIC_CAST(const PlaceholderMapEntry*, hdr);
   NS_ASSERTION(entry->placeholderFrame->GetOutOfFlowFrame() !=
                (void*)0xdddddddd,
                "Dead placeholder in placeholder map");
   return entry->placeholderFrame->GetOutOfFlowFrame() == key;
 }
 
 static PLDHashTableOps PlaceholderMapOps = {
   PL_DHashAllocTable,
   PL_DHashFreeTable,
-  PlaceholderMapGetKey,
   PL_DHashVoidPtrKeyStub,
   PlaceholderMapMatchEntry,
   PL_DHashMoveEntryStub,
   PL_DHashClearEntryStub,
   PL_DHashFinalizeStub,
   NULL
 };
 
@@ -166,36 +155,28 @@ struct PrimaryFrameMapEntry : public PLD
   // entry.
   nsIContent *content;
   nsIFrame *frame;
 };
 
   // These ops should be used if/when we switch back to a 2-word entry.
   // See comment in |PrimaryFrameMapEntry| above.
 #if 0
-PR_STATIC_CALLBACK(const void *)
-PrimaryFrameMapGetKey(PLDHashTable *table, PLDHashEntryHdr *hdr)
-{
-  PrimaryFrameMapEntry *entry = NS_STATIC_CAST(PrimaryFrameMapEntry*, hdr);
-  return entry->frame->GetContent();
-}
-
 PR_STATIC_CALLBACK(PRBool)
 PrimaryFrameMapMatchEntry(PLDHashTable *table, const PLDHashEntryHdr *hdr,
                          const void *key)
 {
   const PrimaryFrameMapEntry *entry =
     NS_STATIC_CAST(const PrimaryFrameMapEntry*, hdr);
   return entry->frame->GetContent() == key;
 }
 
 static PLDHashTableOps PrimaryFrameMapOps = {
   PL_DHashAllocTable,
   PL_DHashFreeTable,
-  PrimaryFrameMapGetKey,
   PL_DHashVoidPtrKeyStub,
   PrimaryFrameMapMatchEntry,
   PL_DHashMoveEntryStub,
   PL_DHashClearEntryStub,
   PL_DHashFinalizeStub,
   NULL
 };
 #endif /* 0 */
--- a/layout/style/nsCSSRuleProcessor.cpp
+++ b/layout/style/nsCSSRuleProcessor.cpp
@@ -133,26 +133,43 @@ RuleHash_CIHashKey(PLDHashTable *table, 
   nsIAtom *atom = NS_CONST_CAST(nsIAtom*, NS_STATIC_CAST(const nsIAtom*, key));
 
   nsAutoString str;
   atom->ToString(str);
   ToUpperCase(str);
   return HashString(str);
 }
 
+typedef nsIAtom*
+(* PR_CALLBACK RuleHashGetKey)    (PLDHashTable *table,
+                                   const PLDHashEntryHdr *entry);
+
+struct RuleHashTableOps {
+  PLDHashTableOps ops;
+  // Extra callback to avoid duplicating the matchEntry callback for
+  // each table.  (There used to be a getKey callback in
+  // PLDHashTableOps.)
+  RuleHashGetKey getKey;
+};
+
+inline const RuleHashTableOps*
+ToLocalOps(const PLDHashTableOps *aOps)
+{
+  return (const RuleHashTableOps*)
+           (((const char*) aOps) - offsetof(RuleHashTableOps, ops));
+}
+
 PR_STATIC_CALLBACK(PRBool)
 RuleHash_CIMatchEntry(PLDHashTable *table, const PLDHashEntryHdr *hdr,
                       const void *key)
 {
   nsIAtom *match_atom = NS_CONST_CAST(nsIAtom*, NS_STATIC_CAST(const nsIAtom*,
                             key));
-  // Use the |getKey| callback to avoid code duplication.
-  // XXX Ugh!  Why does |getKey| have different |const|-ness?
-  nsIAtom *entry_atom = NS_CONST_CAST(nsIAtom*, NS_STATIC_CAST(const nsIAtom*,
-             table->ops->getKey(table, NS_CONST_CAST(PLDHashEntryHdr*, hdr))));
+  // Use our extra |getKey| callback to avoid code duplication.
+  nsIAtom *entry_atom = ToLocalOps(table->ops)->getKey(table, hdr);
 
   // Check for case-sensitive match first.
   if (match_atom == entry_atom)
     return PR_TRUE;
 
   const char *match_str, *entry_str;
   match_atom->GetUTF8String(&match_str);
   entry_atom->GetUTF8String(&entry_str);
@@ -161,52 +178,46 @@ RuleHash_CIMatchEntry(PLDHashTable *tabl
 }
 
 PR_STATIC_CALLBACK(PRBool)
 RuleHash_CSMatchEntry(PLDHashTable *table, const PLDHashEntryHdr *hdr,
                       const void *key)
 {
   nsIAtom *match_atom = NS_CONST_CAST(nsIAtom*, NS_STATIC_CAST(const nsIAtom*,
                             key));
-  // Use the |getKey| callback to avoid code duplication.
-  // XXX Ugh!  Why does |getKey| have different |const|-ness?
-  nsIAtom *entry_atom = NS_CONST_CAST(nsIAtom*, NS_STATIC_CAST(const nsIAtom*,
-             table->ops->getKey(table, NS_CONST_CAST(PLDHashEntryHdr*, hdr))));
+  // Use our extra |getKey| callback to avoid code duplication.
+  nsIAtom *entry_atom = ToLocalOps(table->ops)->getKey(table, hdr);
 
   return match_atom == entry_atom;
 }
 
-PR_STATIC_CALLBACK(const void*)
-RuleHash_TagTable_GetKey(PLDHashTable *table, PLDHashEntryHdr *hdr)
+PR_STATIC_CALLBACK(nsIAtom*)
+RuleHash_TagTable_GetKey(PLDHashTable *table, const PLDHashEntryHdr *hdr)
 {
-  RuleHashTableEntry *entry = NS_STATIC_CAST(RuleHashTableEntry*, hdr);
+  const RuleHashTableEntry *entry =
+    NS_STATIC_CAST(const RuleHashTableEntry*, hdr);
   return entry->mRules->mSelector->mTag;
 }
 
-PR_STATIC_CALLBACK(const void*)
-RuleHash_ClassTable_GetKey(PLDHashTable *table, PLDHashEntryHdr *hdr)
+PR_STATIC_CALLBACK(nsIAtom*)
+RuleHash_ClassTable_GetKey(PLDHashTable *table, const PLDHashEntryHdr *hdr)
 {
-  RuleHashTableEntry *entry = NS_STATIC_CAST(RuleHashTableEntry*, hdr);
+  const RuleHashTableEntry *entry =
+    NS_STATIC_CAST(const RuleHashTableEntry*, hdr);
   return entry->mRules->mSelector->mClassList->mAtom;
 }
 
-PR_STATIC_CALLBACK(const void*)
-RuleHash_IdTable_GetKey(PLDHashTable *table, PLDHashEntryHdr *hdr)
+PR_STATIC_CALLBACK(nsIAtom*)
+RuleHash_IdTable_GetKey(PLDHashTable *table, const PLDHashEntryHdr *hdr)
 {
-  RuleHashTableEntry *entry = NS_STATIC_CAST(RuleHashTableEntry*, hdr);
+  const RuleHashTableEntry *entry =
+    NS_STATIC_CAST(const RuleHashTableEntry*, hdr);
   return entry->mRules->mSelector->mIDList->mAtom;
 }
 
-PR_STATIC_CALLBACK(const void*)
-RuleHash_NameSpaceTable_GetKey(PLDHashTable *table, PLDHashEntryHdr *hdr)
-{
-  RuleHashTableEntry *entry = NS_STATIC_CAST(RuleHashTableEntry*, hdr);
-  return NS_INT32_TO_PTR(entry->mRules->mSelector->mNameSpace);
-}
-
 PR_STATIC_CALLBACK(PLDHashNumber)
 RuleHash_NameSpaceTable_HashKey(PLDHashTable *table, const void *key)
 {
   return NS_PTR_TO_INT32(key);
 }
 
 PR_STATIC_CALLBACK(PRBool)
 RuleHash_NameSpaceTable_MatchEntry(PLDHashTable *table,
@@ -215,90 +226,99 @@ RuleHash_NameSpaceTable_MatchEntry(PLDHa
 {
   const RuleHashTableEntry *entry =
     NS_STATIC_CAST(const RuleHashTableEntry*, hdr);
 
   return NS_PTR_TO_INT32(key) ==
          entry->mRules->mSelector->mNameSpace;
 }
 
-static PLDHashTableOps RuleHash_TagTable_Ops = {
+static const RuleHashTableOps RuleHash_TagTable_Ops = {
+  {
   PL_DHashAllocTable,
   PL_DHashFreeTable,
-  RuleHash_TagTable_GetKey,
   PL_DHashVoidPtrKeyStub,
   RuleHash_CSMatchEntry,
   PL_DHashMoveEntryStub,
   PL_DHashClearEntryStub,
   PL_DHashFinalizeStub,
   NULL
+  },
+  RuleHash_TagTable_GetKey
 };
 
 // Case-sensitive ops.
-static PLDHashTableOps RuleHash_ClassTable_CSOps = {
+static const RuleHashTableOps RuleHash_ClassTable_CSOps = {
+  {
   PL_DHashAllocTable,
   PL_DHashFreeTable,
-  RuleHash_ClassTable_GetKey,
   PL_DHashVoidPtrKeyStub,
   RuleHash_CSMatchEntry,
   PL_DHashMoveEntryStub,
   PL_DHashClearEntryStub,
   PL_DHashFinalizeStub,
   NULL
+  },
+  RuleHash_ClassTable_GetKey
 };
 
 // Case-insensitive ops.
-static PLDHashTableOps RuleHash_ClassTable_CIOps = {
+static const RuleHashTableOps RuleHash_ClassTable_CIOps = {
+  {
   PL_DHashAllocTable,
   PL_DHashFreeTable,
-  RuleHash_ClassTable_GetKey,
   RuleHash_CIHashKey,
   RuleHash_CIMatchEntry,
   PL_DHashMoveEntryStub,
   PL_DHashClearEntryStub,
   PL_DHashFinalizeStub,
   NULL
+  },
+  RuleHash_ClassTable_GetKey
 };
 
 // Case-sensitive ops.
-static PLDHashTableOps RuleHash_IdTable_CSOps = {
+static const RuleHashTableOps RuleHash_IdTable_CSOps = {
+  {
   PL_DHashAllocTable,
   PL_DHashFreeTable,
-  RuleHash_IdTable_GetKey,
   PL_DHashVoidPtrKeyStub,
   RuleHash_CSMatchEntry,
   PL_DHashMoveEntryStub,
   PL_DHashClearEntryStub,
   PL_DHashFinalizeStub,
   NULL
+  },
+  RuleHash_IdTable_GetKey
 };
 
 // Case-insensitive ops.
-static PLDHashTableOps RuleHash_IdTable_CIOps = {
+static const RuleHashTableOps RuleHash_IdTable_CIOps = {
+  {
   PL_DHashAllocTable,
   PL_DHashFreeTable,
-  RuleHash_IdTable_GetKey,
   RuleHash_CIHashKey,
   RuleHash_CIMatchEntry,
   PL_DHashMoveEntryStub,
   PL_DHashClearEntryStub,
   PL_DHashFinalizeStub,
   NULL
+  },
+  RuleHash_IdTable_GetKey
 };
 
-static PLDHashTableOps RuleHash_NameSpaceTable_Ops = {
+static const PLDHashTableOps RuleHash_NameSpaceTable_Ops = {
   PL_DHashAllocTable,
   PL_DHashFreeTable,
-  RuleHash_NameSpaceTable_GetKey,
   RuleHash_NameSpaceTable_HashKey,
   RuleHash_NameSpaceTable_MatchEntry,
   PL_DHashMoveEntryStub,
   PL_DHashClearEntryStub,
   PL_DHashFinalizeStub,
-  NULL
+  NULL,
 };
 
 #undef RULE_HASH_STATS
 #undef PRINT_UNIVERSAL_RULES
 
 #ifdef DEBUG_dbaron
 #define RULE_HASH_STATS
 #define PRINT_UNIVERSAL_RULES
@@ -384,25 +404,25 @@ RuleHash::RuleHash(PRBool aQuirksMode)
     mElementClassCalls(0),
     mElementIdCalls(0),
     mPseudoTagCalls(0)
 #endif
 {
   // Initialize our arena
   PL_INIT_ARENA_POOL(&mArena, "RuleHashArena", NS_RULEHASH_ARENA_BLOCK_SIZE);
 
-  PL_DHashTableInit(&mTagTable, &RuleHash_TagTable_Ops, nsnull,
+  PL_DHashTableInit(&mTagTable, &RuleHash_TagTable_Ops.ops, nsnull,
                     sizeof(RuleHashTableEntry), 64);
   PL_DHashTableInit(&mIdTable,
-                    aQuirksMode ? &RuleHash_IdTable_CIOps
-                                : &RuleHash_IdTable_CSOps,
+                    aQuirksMode ? &RuleHash_IdTable_CIOps.ops
+                                : &RuleHash_IdTable_CSOps.ops,
                     nsnull, sizeof(RuleHashTableEntry), 16);
   PL_DHashTableInit(&mClassTable,
-                    aQuirksMode ? &RuleHash_ClassTable_CIOps
-                                : &RuleHash_ClassTable_CSOps,
+                    aQuirksMode ? &RuleHash_ClassTable_CIOps.ops
+                                : &RuleHash_ClassTable_CSOps.ops,
                     nsnull, sizeof(RuleHashTableEntry), 16);
   PL_DHashTableInit(&mNameSpaceTable, &RuleHash_NameSpaceTable_Ops, nsnull,
                     sizeof(RuleHashTableEntry), 16);
 }
 
 RuleHash::~RuleHash()
 {
 #ifdef RULE_HASH_STATS
@@ -631,20 +651,19 @@ struct AttributeSelectorEntry : public P
 PR_STATIC_CALLBACK(void)
 AttributeSelectorClearEntry(PLDHashTable *table, PLDHashEntryHdr *hdr)
 {
   AttributeSelectorEntry *entry = NS_STATIC_CAST(AttributeSelectorEntry*, hdr);
   delete entry->mSelectors;
   memset(entry, 0, table->entrySize);
 }
 
-static PLDHashTableOps AttributeSelectorOps = {
+static const PLDHashTableOps AttributeSelectorOps = {
   PL_DHashAllocTable,
   PL_DHashFreeTable,
-  PL_DHashGetKeyStub,
   PL_DHashVoidPtrKeyStub,
   PL_DHashMatchEntryStub,
   PL_DHashMoveEntryStub,
   AttributeSelectorClearEntry,
   PL_DHashFinalizeStub,
   NULL
 };
 
--- a/layout/style/nsHTMLStyleSheet.cpp
+++ b/layout/style/nsHTMLStyleSheet.cpp
@@ -328,17 +328,16 @@ MappedAttrTable_MatchEntry(PLDHashTable 
     NS_STATIC_CAST(const MappedAttrTableEntry*, hdr);
 
   return attributes->Equals(entry->mAttributes);
 }
 
 static PLDHashTableOps MappedAttrTable_Ops = {
   PL_DHashAllocTable,
   PL_DHashFreeTable,
-  PL_DHashGetKeyStub,
   MappedAttrTable_HashKey,
   MappedAttrTable_MatchEntry,
   PL_DHashMoveEntryStub,
   MappedAttrTable_ClearEntry,
   PL_DHashFinalizeStub,
   NULL
 };
 
--- a/layout/style/nsRuleNode.cpp
+++ b/layout/style/nsRuleNode.cpp
@@ -110,40 +110,32 @@ public:
  * For storage of an |nsRuleNode|'s children in a PLDHashTable.
  */
 
 struct ChildrenHashEntry : public PLDHashEntryHdr {
   // key (the rule) is |mRuleNode->GetRule()|
   nsRuleNode *mRuleNode;
 };
 
-PR_STATIC_CALLBACK(const void *)
-ChildrenHashGetKey(PLDHashTable *table, PLDHashEntryHdr *hdr)
-{
-  ChildrenHashEntry *entry = NS_STATIC_CAST(ChildrenHashEntry*, hdr);
-  return entry->mRuleNode->GetRule();
-}
-
 PR_STATIC_CALLBACK(PRBool)
 ChildrenHashMatchEntry(PLDHashTable *table, const PLDHashEntryHdr *hdr,
                          const void *key)
 {
   const ChildrenHashEntry *entry =
     NS_STATIC_CAST(const ChildrenHashEntry*, hdr);
   return entry->mRuleNode->GetRule() == key;
 }
 
 static PLDHashTableOps ChildrenHashOps = {
   // It's probably better to allocate the table itself using malloc and
   // free rather than the pres shell's arena because the table doesn't
   // grow very often and the pres shell's arena doesn't recycle very
   // large size allocations.
   PL_DHashAllocTable,
   PL_DHashFreeTable,
-  ChildrenHashGetKey,
   PL_DHashVoidPtrKeyStub,
   ChildrenHashMatchEntry,
   PL_DHashMoveEntryStub,
   PL_DHashClearEntryStub,
   PL_DHashFinalizeStub,
   NULL
 };
 
--- a/layout/tables/SpanningCellSorter.cpp
+++ b/layout/tables/SpanningCellSorter.cpp
@@ -64,33 +64,24 @@ SpanningCellSorter::~SpanningCellSorter(
     delete mSortedHashTable;
     mPresShell->PopStackMemory();
 }
 
 /* static */ PLDHashTableOps
 SpanningCellSorter::HashTableOps = {
     PL_DHashAllocTable,
     PL_DHashFreeTable,
-    HashTableGetKey,
     HashTableHashKey,
     HashTableMatchEntry,
     PL_DHashMoveEntryStub,
     PL_DHashClearEntryStub,
     PL_DHashFinalizeStub,
     nsnull
 };
 
-/* static */ PR_CALLBACK const void*
-SpanningCellSorter::HashTableGetKey(PLDHashTable *table,
-                                    PLDHashEntryHdr *hdr)
-{
-    HashTableEntry *entry = NS_STATIC_CAST(HashTableEntry*, hdr);
-    return NS_INT32_TO_PTR(entry->mColSpan);
-}
-
 /* static */ PR_CALLBACK PLDHashNumber
 SpanningCellSorter::HashTableHashKey(PLDHashTable *table, const void *key)
 {
     return NS_PTR_TO_INT32(key);
 }
 
 /* static */ PR_CALLBACK PRBool
 SpanningCellSorter::HashTableMatchEntry(PLDHashTable *table,
--- a/layout/tables/SpanningCellSorter.h
+++ b/layout/tables/SpanningCellSorter.h
@@ -94,18 +94,16 @@ private:
     PLDHashTable mHashTable;
     struct HashTableEntry : public PLDHashEntryHdr {
         PRInt32 mColSpan;
         Item *mItems;
     };
 
     static PLDHashTableOps HashTableOps;
 
-    PR_STATIC_CALLBACK(const void*)
-        HashTableGetKey(PLDHashTable *table, PLDHashEntryHdr *hdr);
     PR_STATIC_CALLBACK(PLDHashNumber)
         HashTableHashKey(PLDHashTable *table, const void *key);
     PR_STATIC_CALLBACK(PRBool)
         HashTableMatchEntry(PLDHashTable *table, const PLDHashEntryHdr *hdr,
                             const void *key);
 
     PR_STATIC_CALLBACK(PLDHashOperator)
         FillSortedArray(PLDHashTable *table, PLDHashEntryHdr *hdr,
--- a/modules/libpref/src/prefapi.cpp
+++ b/modules/libpref/src/prefapi.cpp
@@ -122,17 +122,16 @@ PRBool              gDirty = PR_FALSE;
 static struct CallbackNode* gCallbacks = NULL;
 static PRBool       gCallbacksEnabled = PR_TRUE;
 static PRBool       gIsAnyPrefLocked = PR_FALSE;
 
 
 static PLDHashTableOps     pref_HashTableOps = {
     PL_DHashAllocTable,
     PL_DHashFreeTable,
-    PL_DHashGetKeyStub,
     PL_DHashStringKey,
     matchPrefEntry,
     PL_DHashMoveEntryStub,
     clearPrefEntry,
     PL_DHashFinalizeStub,
     nsnull,
 };
 
--- a/modules/plugin/base/src/nsJSNPRuntime.cpp
+++ b/modules/plugin/base/src/nsJSNPRuntime.cpp
@@ -872,25 +872,16 @@ public:
 PR_STATIC_CALLBACK(PLDHashNumber)
 JSObjWrapperHash(PLDHashTable *table, const void *key)
 {
   const nsJSObjWrapperKey *e = NS_STATIC_CAST(const nsJSObjWrapperKey *, key);
 
   return (PLDHashNumber)((PRWord)e->mJSObj ^ (PRWord)e->mNpp) >> 2;
 }
 
-PR_STATIC_CALLBACK(const void *)
-JSObjWrapperHashGetKey(PLDHashTable *table, PLDHashEntryHdr *entry)
-{
-  JSObjWrapperHashEntry *e =
-    NS_STATIC_CAST(JSObjWrapperHashEntry *, entry);
-
-  return NS_STATIC_CAST(nsJSObjWrapperKey *, e->mJSObjWrapper);
-}
-
 PR_STATIC_CALLBACK(PRBool)
 JSObjWrapperHashMatchEntry(PLDHashTable *table, const PLDHashEntryHdr *entry,
                            const void *key)
 {
   const nsJSObjWrapperKey *objWrapperKey =
     NS_STATIC_CAST(const nsJSObjWrapperKey *, key);
   const JSObjWrapperHashEntry *e =
     NS_STATIC_CAST(const JSObjWrapperHashEntry *, entry);
@@ -936,17 +927,16 @@ nsJSObjWrapper::GetNewOrUsed(NPP npp, JS
 
   if (!sJSObjWrappers.ops) {
     // No hash yet (or any more), initialize it.
 
     static PLDHashTableOps ops =
       {
         PL_DHashAllocTable,
         PL_DHashFreeTable,
-        JSObjWrapperHashGetKey,
         JSObjWrapperHash,
         JSObjWrapperHashMatchEntry,
         PL_DHashMoveEntryStub,
         PL_DHashClearEntryStub,
         PL_DHashFinalizeStub
       };
 
     if (!PL_DHashTableInit(&sJSObjWrappers, &ops, nsnull,
--- a/netwerk/base/src/nsLoadGroup.cpp
+++ b/netwerk/base/src/nsLoadGroup.cpp
@@ -76,24 +76,16 @@ public:
     RequestMapEntry(nsIRequest *aRequest) :
         mKey(aRequest)
     {
     }
 
     nsCOMPtr<nsIRequest> mKey;
 };
 
-PR_STATIC_CALLBACK(const void *)
-RequestHashGetKey(PLDHashTable *table, PLDHashEntryHdr *entry)
-{
-    RequestMapEntry *e = NS_STATIC_CAST(RequestMapEntry *, entry);
-
-    return e->mKey.get();
-}
-
 PR_STATIC_CALLBACK(PRBool)
 RequestHashMatchEntry(PLDHashTable *table, const PLDHashEntryHdr *entry,
                       const void *key)
 {
     const RequestMapEntry *e =
         NS_STATIC_CAST(const RequestMapEntry *, entry);
     const nsIRequest *request = NS_STATIC_CAST(const nsIRequest *, key);
 
@@ -183,17 +175,16 @@ nsLoadGroup::~nsLoadGroup()
 
 
 nsresult nsLoadGroup::Init()
 {
     static PLDHashTableOps hash_table_ops =
     {
         PL_DHashAllocTable,
         PL_DHashFreeTable,
-        RequestHashGetKey,
         PL_DHashVoidPtrKeyStub,
         RequestHashMatchEntry,
         PL_DHashMoveEntryStub,
         RequestHashClearEntry,
         PL_DHashFinalizeStub,
         RequestHashInitEntry
     };
 
--- a/netwerk/cache/src/nsCacheEntry.cpp
+++ b/netwerk/cache/src/nsCacheEntry.cpp
@@ -392,17 +392,16 @@ nsCacheEntryInfo::IsStreamBased(PRBool *
  *  nsCacheEntryHashTable
  *****************************************************************************/
 
 PLDHashTableOps
 nsCacheEntryHashTable::ops =
 {
     PL_DHashAllocTable,
     PL_DHashFreeTable,
-    GetKey,
     HashKey,
     MatchEntry,
     MoveEntry,
     ClearEntry,
     PL_DHashFinalizeStub
 };
 
 
@@ -515,23 +514,16 @@ nsCacheEntryHashTable::VisitEntry(PLDHas
     nsCacheEntry *cacheEntry = ((nsCacheEntryHashTableEntry *)hashEntry)->cacheEntry;
     nsCacheEntryHashTable::Visitor *visitor = (nsCacheEntryHashTable::Visitor*) arg;
     return (visitor->VisitEntry(cacheEntry) ? PL_DHASH_NEXT : PL_DHASH_STOP);
 }
 
 /**
  *  hash table operation callback functions
  */
-const void * PR_CALLBACK
-nsCacheEntryHashTable::GetKey( PLDHashTable * /*table*/, PLDHashEntryHdr *hashEntry)
-{
-    nsCacheEntry *cacheEntry = ((nsCacheEntryHashTableEntry *)hashEntry)->cacheEntry;
-    return cacheEntry->mKey;
-}
-
 
 PLDHashNumber PR_CALLBACK
 nsCacheEntryHashTable::HashKey( PLDHashTable *table, const void *key)
 {
     return PL_DHashStringKey(table,((nsCString *)key)->get());
 }
 
 PRBool PR_CALLBACK
--- a/netwerk/cache/src/nsCacheEntry.h
+++ b/netwerk/cache/src/nsCacheEntry.h
@@ -302,18 +302,16 @@ public:
     };
     
     void          VisitEntries( Visitor *visitor);
     
 private:
     friend class nsCacheService; // XXX redefine interface so this isn't necessary
 
     // PLDHashTable operation callbacks
-    static const void *   PR_CALLBACK GetKey( PLDHashTable *table, PLDHashEntryHdr *entry);
-
     static PLDHashNumber  PR_CALLBACK HashKey( PLDHashTable *table, const void *key);
 
     static PRBool         PR_CALLBACK MatchEntry( PLDHashTable *           table,
                                                   const PLDHashEntryHdr *  entry,
                                                   const void *             key);
 
     static void           PR_CALLBACK MoveEntry( PLDHashTable *table,
                                                  const PLDHashEntryHdr *from,
--- a/netwerk/cache/src/nsDiskCacheBinding.cpp
+++ b/netwerk/cache/src/nsDiskCacheBinding.cpp
@@ -55,23 +55,16 @@
 #pragma mark HASHTABLE CALLBACKS
 #endif
 
 struct HashTableEntry : PLDHashEntryHdr {
     nsDiskCacheBinding *  mBinding;
 };
 
 
-static const void * PR_CALLBACK
-GetKey(PLDHashTable * /*table*/, PLDHashEntryHdr * header)
-{
-    return (void*) ((HashTableEntry *)header)->mBinding->mRecord.HashNumber();
-}
-
-
 static PLDHashNumber PR_CALLBACK
 HashKey( PLDHashTable *table, const void *key)
 {
     return (PLDHashNumber) NS_PTR_TO_INT32(key);
 }
 
 
 static PRBool PR_CALLBACK
@@ -163,17 +156,16 @@ nsDiskCacheBinding::EnsureStreamIO()
  *  Keeps track of bound disk cache entries to detect for collisions.
  *
  *****************************************************************************/
 
 PLDHashTableOps nsDiskCacheBindery::ops =
 {
     PL_DHashAllocTable,
     PL_DHashFreeTable,
-    GetKey,
     HashKey,
     MatchEntry,
     MoveEntry,
     ClearEntry,
     PL_DHashFinalizeStub
 };
 
 
--- a/netwerk/dns/src/nsHostResolver.cpp
+++ b/netwerk/dns/src/nsHostResolver.cpp
@@ -194,23 +194,16 @@ nsHostRecord::~nsHostRecord()
 
 //----------------------------------------------------------------------------
 
 struct nsHostDBEnt : PLDHashEntryHdr
 {
     nsHostRecord *rec;
 };
 
-PR_STATIC_CALLBACK(const void *)
-HostDB_GetKey(PLDHashTable *table, PLDHashEntryHdr *entry)
-{
-    nsHostDBEnt *he = NS_STATIC_CAST(nsHostDBEnt *, entry);
-    return NS_STATIC_CAST(const nsHostKey *, he->rec);
-}
-
 PR_STATIC_CALLBACK(PLDHashNumber)
 HostDB_HashKey(PLDHashTable *table, const void *key)
 {
     const nsHostKey *hk = NS_STATIC_CAST(const nsHostKey *, key);
     return PL_DHashStringKey(table, hk->host) ^ hk->flags ^ hk->af;
 }
 
 PR_STATIC_CALLBACK(PRBool)
@@ -274,17 +267,16 @@ HostDB_InitEntry(PLDHashTable *table,
     nsHostRecord::Create(NS_STATIC_CAST(const nsHostKey *, key), &he->rec);
     return PR_TRUE;
 }
 
 static PLDHashTableOps gHostDB_ops =
 {
     PL_DHashAllocTable,
     PL_DHashFreeTable,
-    HostDB_GetKey,
     HostDB_HashKey,
     HostDB_MatchEntry,
     HostDB_MoveEntry,
     HostDB_ClearEntry,
     PL_DHashFinalizeStub,
     HostDB_InitEntry,
 };
 
--- a/netwerk/protocol/http/src/nsHttp.cpp
+++ b/netwerk/protocol/http/src/nsHttp.cpp
@@ -108,17 +108,16 @@ StringCompare(PLDHashTable *table, const
 
     return PL_strcasecmp(NS_REINTERPRET_CAST(const char *, entryKey),
                          NS_REINTERPRET_CAST(const char *, testKey)) == 0;
 }
 
 static const PLDHashTableOps ops = {
     PL_DHashAllocTable,
     PL_DHashFreeTable,
-    PL_DHashGetKeyStub,
     StringHash,
     StringCompare,
     PL_DHashMoveEntryStub,
     PL_DHashClearEntryStub,
     PL_DHashFinalizeStub,
     nsnull
 };
 
--- a/parser/htmlparser/src/nsHTMLEntities.cpp
+++ b/parser/htmlparser/src/nsHTMLEntities.cpp
@@ -49,30 +49,16 @@ struct EntityNode {
   PRInt32       mUnicode;
 };
 
 struct EntityNodeEntry : public PLDHashEntryHdr
 {
   const EntityNode* node;
 }; 
 
-PR_STATIC_CALLBACK(const void*)
-  getStringKey(PLDHashTable*, PLDHashEntryHdr* aHdr)
-{
-  const EntityNodeEntry* entry = NS_STATIC_CAST(const EntityNodeEntry*, aHdr);
-  return entry->node->mStr;
-}
-
-PR_STATIC_CALLBACK(const void*)
-  getUnicodeKey(PLDHashTable*, PLDHashEntryHdr* aHdr)
-{
-  const EntityNodeEntry* entry = NS_STATIC_CAST(const EntityNodeEntry*, aHdr);
-  return NS_INT32_TO_PTR(entry->node->mUnicode);
-}
-
 PR_STATIC_CALLBACK(PRBool)
   matchNodeString(PLDHashTable*, const PLDHashEntryHdr* aHdr,
                   const void* key)
 {
   const EntityNodeEntry* entry = NS_STATIC_CAST(const EntityNodeEntry*, aHdr);
   const char* str = NS_STATIC_CAST(const char*, key);
   return (nsCRT::strcmp(entry->node->mStr, str) == 0);
 }
@@ -92,29 +78,27 @@ PR_STATIC_CALLBACK(PLDHashNumber)
   // key is actually the unicode value
   return PLDHashNumber(NS_PTR_TO_INT32(key));
   }
 
 
 static const PLDHashTableOps EntityToUnicodeOps = {
   PL_DHashAllocTable,
   PL_DHashFreeTable,
-  getStringKey,
   PL_DHashStringKey,
   matchNodeString,
   PL_DHashMoveEntryStub,
   PL_DHashClearEntryStub,
   PL_DHashFinalizeStub,
   nsnull,
 }; 
 
 static const PLDHashTableOps UnicodeToEntityOps = {
   PL_DHashAllocTable,
   PL_DHashFreeTable,
-  getUnicodeKey,
   hashUnicodeValue,
   matchNodeUnicode,
   PL_DHashMoveEntryStub,
   PL_DHashClearEntryStub,
   PL_DHashFinalizeStub,
   nsnull,
 };
 
--- a/rdf/base/src/nsRDFService.cpp
+++ b/rdf/base/src/nsRDFService.cpp
@@ -162,23 +162,16 @@ static PLHashAllocOps dataSourceHashAllo
 //
 // For the mResources hashtable.
 //
 
 struct ResourceHashEntry : public PLDHashEntryHdr {
     const char *mKey;
     nsIRDFResource *mResource;
 
-    static const void * PR_CALLBACK
-    GetKey(PLDHashTable *table, PLDHashEntryHdr *hdr)
-    {
-        ResourceHashEntry *entry = NS_STATIC_CAST(ResourceHashEntry *, hdr);
-        return entry->mKey;
-    }
-
     static PLDHashNumber PR_CALLBACK
     HashKey(PLDHashTable *table, const void *key)
     {
         return nsCRT::HashCode(NS_STATIC_CAST(const char *, key));
     }
 
     static PRBool PR_CALLBACK
     MatchEntry(PLDHashTable *table, const PLDHashEntryHdr *hdr,
@@ -190,17 +183,16 @@ struct ResourceHashEntry : public PLDHas
         return 0 == nsCRT::strcmp(NS_STATIC_CAST(const char *, key),
                                   entry->mKey);
     }
 };
 
 static PLDHashTableOps gResourceTableOps = {
     PL_DHashAllocTable,
     PL_DHashFreeTable,
-    ResourceHashEntry::GetKey,
     ResourceHashEntry::HashKey,
     ResourceHashEntry::MatchEntry,
     PL_DHashMoveEntryStub,
     PL_DHashClearEntryStub,
     PL_DHashFinalizeStub,
     nsnull
 };
 
@@ -208,23 +200,16 @@ static PLDHashTableOps gResourceTableOps
 //
 // For the mLiterals hashtable.
 //
 
 struct LiteralHashEntry : public PLDHashEntryHdr {
     nsIRDFLiteral *mLiteral;
     const PRUnichar *mKey;
 
-    static const void * PR_CALLBACK
-    GetKey(PLDHashTable *table, PLDHashEntryHdr *hdr)
-    {
-        LiteralHashEntry *entry = NS_STATIC_CAST(LiteralHashEntry *, hdr);
-        return entry->mKey;
-    }
-
     static PLDHashNumber PR_CALLBACK
     HashKey(PLDHashTable *table, const void *key)
     {
         return nsCRT::HashCode(NS_STATIC_CAST(const PRUnichar *, key));
     }
 
     static PRBool PR_CALLBACK
     MatchEntry(PLDHashTable *table, const PLDHashEntryHdr *hdr,
@@ -236,17 +221,16 @@ struct LiteralHashEntry : public PLDHash
         return 0 == nsCRT::strcmp(NS_STATIC_CAST(const PRUnichar *, key),
                                   entry->mKey);
     }
 };
 
 static PLDHashTableOps gLiteralTableOps = {
     PL_DHashAllocTable,
     PL_DHashFreeTable,
-    LiteralHashEntry::GetKey,
     LiteralHashEntry::HashKey,
     LiteralHashEntry::MatchEntry,
     PL_DHashMoveEntryStub,
     PL_DHashClearEntryStub,
     PL_DHashFinalizeStub,
     nsnull
 };
 
@@ -254,23 +238,16 @@ static PLDHashTableOps gLiteralTableOps 
 //
 // For the mInts hashtable.
 //
 
 struct IntHashEntry : public PLDHashEntryHdr {
     nsIRDFInt *mInt;
     PRInt32    mKey;
 
-    static const void * PR_CALLBACK
-    GetKey(PLDHashTable *table, PLDHashEntryHdr *hdr)
-    {
-        IntHashEntry *entry = NS_STATIC_CAST(IntHashEntry *, hdr);
-        return &entry->mKey;
-    }
-
     static PLDHashNumber PR_CALLBACK
     HashKey(PLDHashTable *table, const void *key)
     {
         return PLDHashNumber(*NS_STATIC_CAST(const PRInt32 *, key));
     }
 
     static PRBool PR_CALLBACK
     MatchEntry(PLDHashTable *table, const PLDHashEntryHdr *hdr,
@@ -281,17 +258,16 @@ struct IntHashEntry : public PLDHashEntr
 
         return *NS_STATIC_CAST(const PRInt32 *, key) == entry->mKey;
     }
 };
 
 static PLDHashTableOps gIntTableOps = {
     PL_DHashAllocTable,
     PL_DHashFreeTable,
-    IntHashEntry::GetKey,
     IntHashEntry::HashKey,
     IntHashEntry::MatchEntry,
     PL_DHashMoveEntryStub,
     PL_DHashClearEntryStub,
     PL_DHashFinalizeStub,
     nsnull
 };
 
@@ -299,23 +275,16 @@ static PLDHashTableOps gIntTableOps = {
 //
 // For the mDates hashtable.
 //
 
 struct DateHashEntry : public PLDHashEntryHdr {
     nsIRDFDate *mDate;
     PRTime      mKey;
 
-    static const void * PR_CALLBACK
-    GetKey(PLDHashTable *table, PLDHashEntryHdr *hdr)
-    {
-        DateHashEntry *entry = NS_STATIC_CAST(DateHashEntry *, hdr);
-        return &entry->mKey;
-    }
-
     static PLDHashNumber PR_CALLBACK
     HashKey(PLDHashTable *table, const void *key)
     {
         // xor the low 32 bits with the high 32 bits.
         PRTime t = *NS_STATIC_CAST(const PRTime *, key);
         PRInt64 h64, l64;
         LL_USHR(h64, t, 32);
         l64 = LL_INIT(0, 0xffffffff);
@@ -335,17 +304,16 @@ struct DateHashEntry : public PLDHashEnt
 
         return LL_EQ(*NS_STATIC_CAST(const PRTime *, key), entry->mKey);
     }
 };
 
 static PLDHashTableOps gDateTableOps = {
     PL_DHashAllocTable,
     PL_DHashFreeTable,
-    DateHashEntry::GetKey,
     DateHashEntry::HashKey,
     DateHashEntry::MatchEntry,
     PL_DHashMoveEntryStub,
     PL_DHashClearEntryStub,
     PL_DHashFinalizeStub,
     nsnull
 };
 
@@ -426,23 +394,16 @@ BlobImpl::GetLength(PRInt32 *aResult)
 // ----------------------------------------------------------------------
 //
 // For the mBlobs hashtable.
 //
 
 struct BlobHashEntry : public PLDHashEntryHdr {
     BlobImpl *mBlob;
 
-    static const void * PR_CALLBACK
-    GetKey(PLDHashTable *table, PLDHashEntryHdr *hdr)
-    {
-        BlobHashEntry *entry = NS_STATIC_CAST(BlobHashEntry *, hdr);
-        return &entry->mBlob->mData;
-    }
-
     static PLDHashNumber PR_CALLBACK
     HashKey(PLDHashTable *table, const void *key)
     {
         const BlobImpl::Data *data =
             NS_STATIC_CAST(const BlobImpl::Data *, key);
 
         const PRUint8 *p = data->mBytes, *limit = p + data->mLength;
         PLDHashNumber h = 0;
@@ -466,17 +427,16 @@ struct BlobHashEntry : public PLDHashEnt
         return (left->mLength == right->mLength)
             && 0 == memcmp(left->mBytes, right->mBytes, right->mLength);
     }
 };
 
 static PLDHashTableOps gBlobTableOps = {
     PL_DHashAllocTable,
     PL_DHashFreeTable,
-    BlobHashEntry::GetKey,
     BlobHashEntry::HashKey,
     BlobHashEntry::MatchEntry,
     PL_DHashMoveEntryStub,
     PL_DHashClearEntryStub,
     PL_DHashFinalizeStub,
     nsnull
 };
 
--- a/security/manager/boot/src/nsSecureBrowserUIImpl.cpp
+++ b/security/manager/boot/src/nsSecureBrowserUIImpl.cpp
@@ -99,23 +99,16 @@
 //
 PRLogModuleInfo* gSecureDocLog = nsnull;
 #endif /* PR_LOGGING */
 
 struct RequestHashEntry : PLDHashEntryHdr {
     void *r;
 };
 
-PR_STATIC_CALLBACK(const void *)
-RequestMapGetKey(PLDHashTable *table, PLDHashEntryHdr *hdr)
-{
-  RequestHashEntry *entry = NS_STATIC_CAST(RequestHashEntry*, hdr);
-  return entry->r;
-}
-
 PR_STATIC_CALLBACK(PRBool)
 RequestMapMatchEntry(PLDHashTable *table, const PLDHashEntryHdr *hdr,
                          const void *key)
 {
   const RequestHashEntry *entry = NS_STATIC_CAST(const RequestHashEntry*, hdr);
   return entry->r == key;
 }
 
@@ -126,17 +119,16 @@ RequestMapInitEntry(PLDHashTable *table,
   RequestHashEntry *entry = NS_STATIC_CAST(RequestHashEntry*, hdr);
   entry->r = (void*)key;
   return PR_TRUE;
 }
 
 static PLDHashTableOps gMapOps = {
   PL_DHashAllocTable,
   PL_DHashFreeTable,
-  RequestMapGetKey,
   PL_DHashVoidPtrKeyStub,
   RequestMapMatchEntry,
   PL_DHashMoveEntryStub,
   PL_DHashClearEntryStub,
   PL_DHashFinalizeStub,
   RequestMapInitEntry
 };
 
--- a/security/manager/ssl/src/nsCertTree.cpp
+++ b/security/manager/ssl/src/nsCertTree.cpp
@@ -86,23 +86,16 @@ CompareCacheHashEntryPtr::~CompareCacheH
 CompareCacheHashEntry::CompareCacheHashEntry()
 :key(nsnull)
 {
   for (int i = 0; i < max_criterions; ++i) {
     mCritInit[i] = PR_FALSE;
   }
 }
 
-PR_STATIC_CALLBACK(const void *)
-CompareCacheGetKey(PLDHashTable *table, PLDHashEntryHdr *hdr)
-{
-  CompareCacheHashEntryPtr *entryPtr = NS_STATIC_CAST(CompareCacheHashEntryPtr*, hdr);
-  return entryPtr->entry->key;
-}
-
 PR_STATIC_CALLBACK(PRBool)
 CompareCacheMatchEntry(PLDHashTable *table, const PLDHashEntryHdr *hdr,
                          const void *key)
 {
   const CompareCacheHashEntryPtr *entryPtr = NS_STATIC_CAST(const CompareCacheHashEntryPtr*, hdr);
   return entryPtr->entry->key == key;
 }
 
@@ -124,17 +117,16 @@ CompareCacheClearEntry(PLDHashTable *tab
 {
   CompareCacheHashEntryPtr *entryPtr = NS_STATIC_CAST(CompareCacheHashEntryPtr*, hdr);
   entryPtr->~CompareCacheHashEntryPtr();
 }
 
 static PLDHashTableOps gMapOps = {
   PL_DHashAllocTable,
   PL_DHashFreeTable,
-  CompareCacheGetKey,
   PL_DHashVoidPtrKeyStub,
   CompareCacheMatchEntry,
   PL_DHashMoveEntryStub,
   CompareCacheClearEntry,
   PL_DHashFinalizeStub,
   CompareCacheInitEntry
 };
 
--- a/security/manager/ssl/src/nsNSSShutDown.cpp
+++ b/security/manager/ssl/src/nsNSSShutDown.cpp
@@ -41,23 +41,16 @@
 #ifdef PR_LOGGING
 extern PRLogModuleInfo* gPIPNSSLog;
 #endif
 
 struct ObjectHashEntry : PLDHashEntryHdr {
   nsNSSShutDownObject *obj;
 };
 
-PR_STATIC_CALLBACK(const void *)
-ObjectSetGetKey(PLDHashTable *table, PLDHashEntryHdr *hdr)
-{
-  ObjectHashEntry *entry = NS_STATIC_CAST(ObjectHashEntry*, hdr);
-  return entry->obj;
-}
-
 PR_STATIC_CALLBACK(PRBool)
 ObjectSetMatchEntry(PLDHashTable *table, const PLDHashEntryHdr *hdr,
                          const void *key)
 {
   const ObjectHashEntry *entry = NS_STATIC_CAST(const ObjectHashEntry*, hdr);
   return entry->obj == NS_STATIC_CAST(const nsNSSShutDownObject*, key);
 }
 
@@ -68,17 +61,16 @@ ObjectSetInitEntry(PLDHashTable *table, 
   ObjectHashEntry *entry = NS_STATIC_CAST(ObjectHashEntry*, hdr);
   entry->obj = NS_CONST_CAST(nsNSSShutDownObject*, NS_STATIC_CAST(const nsNSSShutDownObject*, key));
   return PR_TRUE;
 }
 
 static PLDHashTableOps gSetOps = {
   PL_DHashAllocTable,
   PL_DHashFreeTable,
-  ObjectSetGetKey,
   PL_DHashVoidPtrKeyStub,
   ObjectSetMatchEntry,
   PL_DHashMoveEntryStub,
   PL_DHashClearEntryStub,
   PL_DHashFinalizeStub,
   ObjectSetInitEntry
 };
 
--- a/uriloader/base/nsDocLoader.cpp
+++ b/uriloader/base/nsDocLoader.cpp
@@ -143,17 +143,16 @@ nsDocLoader::nsDocLoader()
 
   mIsLoadingDocument = PR_FALSE;
   mIsRestoringDocument = PR_FALSE;
 
   static PLDHashTableOps hash_table_ops =
   {
     PL_DHashAllocTable,
     PL_DHashFreeTable,
-    PL_DHashGetKeyStub,
     PL_DHashVoidPtrKeyStub,
     PL_DHashMatchEntryStub,
     PL_DHashMoveEntryStub,
     PL_DHashClearEntryStub,
     PL_DHashFinalizeStub,
     RequestInfoHashInitEntry
   };
 
--- a/widget/src/gtk/nsWindow.cpp
+++ b/widget/src/gtk/nsWindow.cpp
@@ -132,17 +132,16 @@ struct IconEntry : public PLDHashEntryHd
   GdkBitmap* w_mask;
   GdkPixmap* w_minipixmap;
   GdkBitmap* w_minimask;
 };
 
 static PLDHashTableOps iconHashOps = {
   PL_DHashAllocTable,
   PL_DHashFreeTable,
-  PL_DHashGetKeyStub,
   PL_DHashStringKey,
   PL_DHashMatchStringKey,
   PL_DHashMoveEntryStub,
   nsWindow::ClearIconEntry,
   PL_DHashFinalizeStub,
   NULL
 };
 
--- a/xpcom/components/nsComponentManager.cpp
+++ b/xpcom/components/nsComponentManager.cpp
@@ -273,24 +273,16 @@ ArenaStrdup(const char *s, PLArenaPool *
 
 ////////////////////////////////////////////////////////////////////////////////
 // Hashtable Callbacks
 ////////////////////////////////////////////////////////////////////////////////
 
 PRBool PR_CALLBACK
 nsFactoryEntry_Destroy(nsHashKey *aKey, void *aData, void* closure);
 
-PR_STATIC_CALLBACK(const void *)
-factory_GetKey(PLDHashTable *aTable, PLDHashEntryHdr *aHdr)
-{
-    nsFactoryTableEntry* entry = NS_STATIC_CAST(nsFactoryTableEntry*, aHdr);
-
-    return &entry->mFactoryEntry->mCid;
-}
-
 PR_STATIC_CALLBACK(PLDHashNumber)
 factory_HashKey(PLDHashTable *aTable, const void *aKey)
 {
     const nsCID *cidp = NS_REINTERPRET_CAST(const nsCID*, aKey);
 
     return cidp->m0;
 }
 
@@ -313,17 +305,16 @@ factory_ClearEntry(PLDHashTable *aTable,
     // We call the destructor by hand.
     entry->mFactoryEntry->~nsFactoryEntry();
     PL_DHashClearEntryStub(aTable, aHdr);
 }
 
 static const PLDHashTableOps factory_DHashTableOps = {
     PL_DHashAllocTable,
     PL_DHashFreeTable,
-    factory_GetKey,
     factory_HashKey,
     factory_MatchEntry,
     PL_DHashMoveEntryStub,
     factory_ClearEntry,
     PL_DHashFinalizeStub,
 };
 
 PR_STATIC_CALLBACK(void)
@@ -341,17 +332,16 @@ contractID_ClearEntry(PLDHashTable *aTab
     // contractIDs are arena allocated. No need to free them.
 
     PL_DHashClearEntryStub(aTable, aHdr);
 }
 
 static const PLDHashTableOps contractID_DHashTableOps = {
     PL_DHashAllocTable,
     PL_DHashFreeTable,
-    PL_DHashGetKeyStub,
     PL_DHashStringKey,
     PL_DHashMatchStringKey,
     PL_DHashMoveEntryStub,
     contractID_ClearEntry,
     PL_DHashFinalizeStub,
 };
 
 ////////////////////////////////////////////////////////////////////////////////
--- a/xpcom/components/nsStaticComponentLoader.cpp
+++ b/xpcom/components/nsStaticComponentLoader.cpp
@@ -75,20 +75,24 @@ PR_STATIC_CALLBACK(PRBool)
 info_InitEntry(PLDHashTable *table, PLDHashEntryHdr *entry, const void *key)
 {
     // Construct so that our nsCOMPtr is zeroed, etc.
     new (NS_STATIC_CAST(void *, entry)) StaticModuleInfo();
     return PR_TRUE;
 }
 
 /* static */ PLDHashTableOps nsStaticModuleLoader::sInfoHashOps = {
-    PL_DHashAllocTable,    PL_DHashFreeTable,
-    PL_DHashGetKeyStub,    PL_DHashStringKey, PL_DHashMatchStringKey,
-    PL_DHashMoveEntryStub, info_ClearEntry,
-    PL_DHashFinalizeStub,  info_InitEntry
+    PL_DHashAllocTable,
+    PL_DHashFreeTable,
+    PL_DHashStringKey,
+    PL_DHashMatchStringKey,
+    PL_DHashMoveEntryStub,
+    info_ClearEntry,
+    PL_DHashFinalizeStub,
+    info_InitEntry
 };
 
 nsresult
 nsStaticModuleLoader::Init(nsStaticModuleInfo const *aStaticModules,
                            PRUint32 aModuleCount)
 {
     if (!PL_DHashTableInit(&mInfoHash, &sInfoHashOps, nsnull,
                            sizeof(StaticModuleInfo), 1024)) {
--- a/xpcom/ds/nsAtomTable.cpp
+++ b/xpcom/ds/nsAtomTable.cpp
@@ -109,16 +109,18 @@ private:
 // case mBits points to a UTF-8 encoded char *. If keyHash is 1 the
 // AtomTableEntry is a UTF-16 encoded string key and mBits points to a
 // UTF-16 encoded PRUnichar *.
 //
 // If keyHash is any other value (> 1), the AtomTableEntry is an
 // actual live entry in the table, and then mBits & ~0x1 in the
 // AtomTableEntry points to an AtomImpl or a nsStaticAtomWrapper,
 // indicated by the first bit of PtrBits.
+// XXX This whole mess could be vastly simplified now that pldhash
+// no longer has a getKey callback.
 typedef PRUword PtrBits;
 
 struct AtomTableEntry : public PLDHashEntryHdr {
   // If keyHash > 1, mBits & 0x1 means (mBits & ~0x1) points to an
   // nsStaticAtomWrapper else it points to an nsAtomImpl
   PtrBits mBits;
 
   inline AtomTableEntry(const char *aString)
@@ -235,24 +237,16 @@ struct AtomTableEntry : public PLDHashEn
       result = GetAtomImpl();
       NS_ADDREF(result);
     }
     
     return result;
   }
 };
 
-PR_STATIC_CALLBACK(const void *)
-AtomTableGetKey(PLDHashTable *table, PLDHashEntryHdr *entry)
-{
-  AtomTableEntry *he = NS_STATIC_CAST(AtomTableEntry*, entry);
-  NS_ASSERTION(he->HasValue(), "Empty atom. how did that happen?");
-  return he;
-}
-
 PR_STATIC_CALLBACK(PLDHashNumber)
 AtomTableGetHash(PLDHashTable *table, const void *key)
 {
   const AtomTableEntry *e = NS_STATIC_CAST(const AtomTableEntry*, key);
 
   if (e->IsUTF16String()) {
     return nsCRT::HashCodeAsUTF8(e->getUTF16String());
   }
@@ -309,17 +303,16 @@ AtomTableClearEntry(PLDHashTable *table,
   }
   
   he->ClearAtom();
 }
 
 static const PLDHashTableOps AtomTableOps = {
   PL_DHashAllocTable,
   PL_DHashFreeTable,
-  AtomTableGetKey,
   AtomTableGetHash,
   AtomTableMatchKey,
   PL_DHashMoveEntryStub,
   AtomTableClearEntry,
   PL_DHashFinalizeStub,
   NULL
 };
 
--- a/xpcom/ds/nsDoubleHashtable.h
+++ b/xpcom/ds/nsDoubleHashtable.h
@@ -200,22 +200,16 @@
 // DHASH_CALLBACKS
 //
 // Define the hashtable callback functions.  Do this in one place only, as you
 // will have redundant symbols otherwise.
 //
 // ENTRY_CLASS: the classname of the entry
 //
 #define DHASH_CALLBACKS(ENTRY_CLASS)                                          \
-PR_STATIC_CALLBACK(const void *)                                              \
-ENTRY_CLASS##GetKey(PLDHashTable* table, PLDHashEntryHdr* entry)              \
-{                                                                             \
-  ENTRY_CLASS* e = NS_STATIC_CAST(ENTRY_CLASS*, entry);                       \
-  return e->GetKey();                                                         \
-}                                                                             \
 PR_STATIC_CALLBACK(PLDHashNumber)                                             \
 ENTRY_CLASS##HashKey(PLDHashTable* table, const void* key)                    \
 {                                                                             \
   return ENTRY_CLASS::HashKey(key);                                           \
 }                                                                             \
 PR_STATIC_CALLBACK(PRBool)                                                    \
 ENTRY_CLASS##MatchEntry(PLDHashTable *table, const PLDHashEntryHdr *entry,    \
                         const void *key)                                      \
@@ -250,17 +244,16 @@ ENTRY_CLASS##InitEntry(PLDHashTable *tab
 //     Will be NS_ERROR_OUT_OF_MEMORY if failed, NS_OK otherwise.
 //
 #define DHASH_INIT(HASHTABLE,ENTRY_CLASS,NUM_INITIAL_ENTRIES,RV)              \
 PR_BEGIN_MACRO                                                                \
   static PLDHashTableOps hash_table_ops =                                     \
   {                                                                           \
     PL_DHashAllocTable,                                                       \
     PL_DHashFreeTable,                                                        \
-    ENTRY_CLASS##GetKey,                                                      \
     ENTRY_CLASS##HashKey,                                                     \
     ENTRY_CLASS##MatchEntry,                                                  \
     PL_DHashMoveEntryStub,                                                    \
     ENTRY_CLASS##ClearEntry,                                                  \
     PL_DHashFinalizeStub,                                                     \
     ENTRY_CLASS##InitEntry                                                    \
   };                                                                          \
   PRBool isLive = PL_DHashTableInit(&(HASHTABLE),                             \
--- a/xpcom/ds/nsHashtable.cpp
+++ b/xpcom/ds/nsHashtable.cpp
@@ -98,17 +98,16 @@ clearHashEntry(PLDHashTable* table, PLDH
     hashEntry->value = nsnull;  // probably not necessary, but for
                                 // sanity's sake
 }
 
 
 static const PLDHashTableOps hashtableOps = {
     PL_DHashAllocTable,
     PL_DHashFreeTable,
-    PL_DHashGetKeyStub,
     hashKey,
     matchKeyEntry,
     PL_DHashMoveEntryStub,
     clearHashEntry,
     PL_DHashFinalizeStub,
     nsnull,
 };
 
--- a/xpcom/ds/nsPersistentProperties.cpp
+++ b/xpcom/ds/nsPersistentProperties.cpp
@@ -84,17 +84,16 @@ ArenaStrdup(const nsAFlatCString& aStrin
   if (mem)
     memcpy(mem, aString.get(), len);
   return NS_STATIC_CAST(char*, mem);
 }
 
 static const struct PLDHashTableOps property_HashTableOps = {
   PL_DHashAllocTable,
   PL_DHashFreeTable,
-  PL_DHashGetKeyStub,
   PL_DHashStringKey,
   PL_DHashMatchStringKey,
   PL_DHashMoveEntryStub,
   PL_DHashClearEntryStub,
   PL_DHashFinalizeStub,
   nsnull,
 };
 
--- a/xpcom/ds/nsStaticNameTable.cpp
+++ b/xpcom/ds/nsStaticNameTable.cpp
@@ -67,40 +67,29 @@ struct NameTableKey
         const nsAFlatCString* m1b;
         const nsAFlatString* m2b;
     } mKeyStr;
 };
 
 struct NameTableEntry : public PLDHashEntryHdr
 {
     // no ownership here!
-    NameTableKey mKey;
+    const nsAFlatCString* mString;
     PRInt32 mIndex;
 };
 
-PR_STATIC_CALLBACK(const void *)
-nameTableGetKey(PLDHashTable *, PLDHashEntryHdr *aHdr)
-{
-    NameTableEntry* entry =
-        NS_STATIC_CAST(NameTableEntry *, aHdr);
-    return &(entry->mKey);
-}
-
 PR_STATIC_CALLBACK(PRBool)
 matchNameKeysCaseInsensitive(PLDHashTable*, const PLDHashEntryHdr* aHdr,
                              const void* key)
 {
     const NameTableEntry* entry =
         NS_STATIC_CAST(const NameTableEntry *, aHdr);
     const NameTableKey *keyValue = NS_STATIC_CAST(const NameTableKey*, key);
 
-    NS_ASSERTION(!entry->mKey.mIsUnichar,
-                 "Entry shouldn't have a unichar key!");
-
-    const nsAFlatCString* entryKey = entry->mKey.mKeyStr.m1b;
+    const nsAFlatCString* entryKey = entry->mString;
     
     if (keyValue->mIsUnichar) {
         return keyValue->mKeyStr.m2b->
             LowerCaseEqualsASCII(entryKey->get(), entryKey->Length());
     }
 
     return keyValue->mKeyStr.m1b->
         LowerCaseEqualsASCII(entryKey->get(), entryKey->Length());
@@ -133,17 +122,16 @@ caseInsensitiveStringHashKey(PLDHashTabl
             h = (h >> (PL_DHASH_BITS - 4)) ^ (h << 4) ^ (*s & ~0x20);
     }
     return h;
 }
 
 static const struct PLDHashTableOps nametable_CaseInsensitiveHashTableOps = {
     PL_DHashAllocTable,
     PL_DHashFreeTable,
-    nameTableGetKey,
     caseInsensitiveStringHashKey,
     matchNameKeysCaseInsensitive,
     PL_DHashMoveEntryStub,
     PL_DHashClearEntryStub,
     PL_DHashFinalizeStub,
     nsnull,
 };
 
@@ -210,20 +198,19 @@ nsStaticCaseInsensitiveNameTable::Init(c
 
         NameTableEntry *entry =
           NS_STATIC_CAST(NameTableEntry*,
                          PL_DHashTableOperate(&mNameTable, &key,
                                               PL_DHASH_ADD));
 
         if (!entry) continue;
 
-        NS_ASSERTION(entry->mKey.mKeyStr.m1b == 0, "Entry already exists!");
+        NS_ASSERTION(entry->mString == 0, "Entry already exists!");
 
-        entry->mKey.mIsUnichar = PR_FALSE;
-        entry->mKey.mKeyStr.m1b = strPtr;      // not owned!
+        entry->mString = strPtr;      // not owned!
         entry->mIndex = index;
     }
     return PR_TRUE;
 }
 
 PRInt32
 nsStaticCaseInsensitiveNameTable::Lookup(const nsACString& aName)
 {
--- a/xpcom/glue/nsTHashtable.h
+++ b/xpcom/glue/nsTHashtable.h
@@ -324,17 +324,16 @@ nsTHashtable<EntryType>::Init(PRUint32 i
     NS_ERROR("nsTHashtable::Init() should not be called twice.");
     return PR_TRUE;
   }
 
   static PLDHashTableOps sOps = 
   {
     ::PL_DHashAllocTable,
     ::PL_DHashFreeTable,
-    s_GetKey,
     s_HashKey,
     s_MatchEntry,
     ::PL_DHashMoveEntryStub,
     s_ClearEntry,
     ::PL_DHashFinalizeStub,
     s_InitEntry
   };
 
@@ -351,24 +350,16 @@ nsTHashtable<EntryType>::Init(PRUint32 i
   }
 
   return PR_TRUE;
 }
 
 // static definitions
 
 template<class EntryType>
-const void*
-nsTHashtable<EntryType>::s_GetKey(PLDHashTable    *table,
-                                  PLDHashEntryHdr *entry)
-{
-  return ((EntryType*) entry)->GetKeyPointer();
-}
-
-template<class EntryType>
 PLDHashNumber
 nsTHashtable<EntryType>::s_HashKey(PLDHashTable  *table,
                                    const void    *key)
 {
   return EntryType::HashKey(NS_REINTERPRET_CAST(const KeyTypePointer, key));
 }
 
 template<class EntryType>
--- a/xpcom/glue/pldhash.c
+++ b/xpcom/glue/pldhash.c
@@ -103,24 +103,16 @@ PL_DHashStringKey(PLDHashTable *table, c
     const unsigned char *s;
 
     h = 0;
     for (s = key; *s != '\0'; s++)
         h = (h >> (PL_DHASH_BITS - 4)) ^ (h << 4) ^ *s;
     return h;
 }
 
-const void *
-PL_DHashGetKeyStub(PLDHashTable *table, PLDHashEntryHdr *entry)
-{
-    PLDHashEntryStub *stub = (PLDHashEntryStub *)entry;
-
-    return stub->key;
-}
-
 PLDHashNumber
 PL_DHashVoidPtrKeyStub(PLDHashTable *table, const void *key)
 {
     return (PLDHashNumber)(unsigned long)key >> 2;
 }
 
 PRBool
 PL_DHashMatchEntryStub(PLDHashTable *table,
@@ -170,17 +162,16 @@ PL_DHashFreeStringKey(PLDHashTable *tabl
 void
 PL_DHashFinalizeStub(PLDHashTable *table)
 {
 }
 
 static const PLDHashTableOps stub_ops = {
     PL_DHashAllocTable,
     PL_DHashFreeTable,
-    PL_DHashGetKeyStub,
     PL_DHashVoidPtrKeyStub,
     PL_DHashMatchEntryStub,
     PL_DHashMoveEntryStub,
     PL_DHashClearEntryStub,
     PL_DHashFinalizeStub,
     NULL
 };
 
--- a/xpcom/glue/pldhash.h
+++ b/xpcom/glue/pldhash.h
@@ -82,21 +82,22 @@ typedef struct PLDHashEntryHdr  PLDHashE
 typedef struct PLDHashEntryStub PLDHashEntryStub;
 typedef struct PLDHashTable     PLDHashTable;
 typedef struct PLDHashTableOps  PLDHashTableOps;
 
 /*
  * Table entry header structure.
  *
  * In order to allow in-line allocation of key and value, we do not declare
- * either here.  Instead, the API uses const void *key as a formal parameter,
- * and asks each entry for its key when necessary via a getKey callback, used
- * when growing or shrinking the table.  Other callback types are defined
- * below and grouped into the PLDHashTableOps structure, for single static
- * initialization per hash table sub-type.
+ * either here.  Instead, the API uses const void *key as a formal parameter.
+ * The key need not be stored in the entry; it may be part of the value, but
+ * need not be stored at all.
+ *
+ * Callback types are defined below and grouped into the PLDHashTableOps
+ * structure, for single static initialization per hash table sub-type.
  *
  * Each hash table sub-type should nest the PLDHashEntryHdr structure at the
  * front of its particular entry type.  The keyHash member contains the result
  * of multiplying the hash code returned from the hashKey callback (see below)
  * by PL_DHASH_GOLDEN_RATIO, then constraining the result to avoid the magic 0
  * and 1 values.  The stored keyHash value is table size invariant, and it is
  * maintained automatically by PL_DHashTableOperate -- users should never set
  * it, and its only uses should be via the entry macros below.
@@ -239,26 +240,16 @@ struct PLDHashTable {
  */
 typedef void *
 (* PR_CALLBACK PLDHashAllocTable)(PLDHashTable *table, PRUint32 nbytes);
 
 typedef void
 (* PR_CALLBACK PLDHashFreeTable) (PLDHashTable *table, void *ptr);
 
 /*
- * When a table grows or shrinks, each entry is queried for its key using this
- * callback.  NB: in that event, entry is not in table any longer; it's in the
- * old entryStore vector, which is due to be freed once all entries have been
- * moved via moveEntry callbacks.
- */
-typedef const void *
-(* PR_CALLBACK PLDHashGetKey)    (PLDHashTable *table,
-                                      PLDHashEntryHdr *entry);
-
-/*
  * Compute the hash code for a given key to be looked up, added, or removed
  * from table.  A hash code may have any PLDHashNumber value.
  */
 typedef PLDHashNumber
 (* PR_CALLBACK PLDHashHashKey)   (PLDHashTable *table, const void *key);
 
 /*
  * Compare the key identifying entry in table with the provided key parameter.
@@ -335,17 +326,16 @@ typedef PRBool
  * course, the clearEntry hook must zero or null appropriately.
  *
  * XXX assumes 0 is null for pointer types.
  */
 struct PLDHashTableOps {
     /* Mandatory hooks.  All implementations must provide these. */
     PLDHashAllocTable   allocTable;
     PLDHashFreeTable    freeTable;
-    PLDHashGetKey       getKey;
     PLDHashHashKey      hashKey;
     PLDHashMatchEntry   matchEntry;
     PLDHashMoveEntry    moveEntry;
     PLDHashClearEntry   clearEntry;
     PLDHashFinalize     finalize;
 
     /* Optional hooks start here.  If null, these are not called. */
     PLDHashInitEntry    initEntry;
@@ -364,19 +354,16 @@ NS_COM_GLUE PLDHashNumber
 PL_DHashStringKey(PLDHashTable *table, const void *key);
 
 /* A minimal entry contains a keyHash header and a void key pointer. */
 struct PLDHashEntryStub {
     PLDHashEntryHdr hdr;
     const void      *key;
 };
 
-NS_COM_GLUE const void *
-PL_DHashGetKeyStub(PLDHashTable *table, PLDHashEntryHdr *entry);
-
 NS_COM_GLUE PLDHashNumber
 PL_DHashVoidPtrKeyStub(PLDHashTable *table, const void *key);
 
 NS_COM_GLUE PRBool
 PL_DHashMatchEntryStub(PLDHashTable *table,
                        const PLDHashEntryHdr *entry,
                        const void *key);
 
--- a/xpcom/io/nsFastLoadFile.cpp
+++ b/xpcom/io/nsFastLoadFile.cpp
@@ -335,17 +335,16 @@ strmap_ClearEntry(PLDHashTable *aTable, 
         nsMemory::Free((void*) entry->mString);
     NS_IF_RELEASE(entry->mURI);
     PL_DHashClearEntryStub(aTable, aHdr);
 }
 
 static const PLDHashTableOps strmap_DHashTableOps = {
     PL_DHashAllocTable,
     PL_DHashFreeTable,
-    PL_DHashGetKeyStub,
     PL_DHashStringKey,
     PL_DHashMatchStringKey,
     PL_DHashMoveEntryStub,
     strmap_ClearEntry,
     PL_DHashFinalizeStub,
     NULL
 };
 
@@ -371,17 +370,16 @@ objmap_ClearEntry(PLDHashTable *aTable, 
     if ((NS_PTR_TO_INT32(entry->mObject) & MFL_OBJECT_DEF_TAG) == 0)
         NS_IF_RELEASE(entry->mObject);
     PL_DHashClearEntryStub(aTable, aHdr);
 }
 
 static const PLDHashTableOps objmap_DHashTableOps = {
     PL_DHashAllocTable,
     PL_DHashFreeTable,
-    PL_DHashGetKeyStub,
     PL_DHashVoidPtrKeyStub,
     PL_DHashMatchEntryStub,
     PL_DHashMoveEntryStub,
     objmap_ClearEntry,
     PL_DHashFinalizeStub,
     NULL
 };
 
@@ -1242,24 +1240,16 @@ NS_IMPL_ISUPPORTS_INHERITED4(nsFastLoadF
                              nsIFastLoadWriteControl,
                              nsISeekableStream)
 
 struct nsIDMapEntry : public PLDHashEntryHdr {
     NSFastLoadID    mFastID;            // 1 + nsFastLoadFooter::mIDMap index
     nsID            mSlowID;            // key, used by PLDHashTableOps below
 };
 
-PR_STATIC_CALLBACK(const void *)
-idmap_GetKey(PLDHashTable *aTable, PLDHashEntryHdr *aHdr)
-{
-    nsIDMapEntry* entry = NS_STATIC_CAST(nsIDMapEntry*, aHdr);
-
-    return &entry->mSlowID;
-}
-
 PR_STATIC_CALLBACK(PLDHashNumber)
 idmap_HashKey(PLDHashTable *aTable, const void *aKey)
 {
     const nsID *idp = NS_REINTERPRET_CAST(const nsID*, aKey);
 
     return idp->m0;
 }
 
@@ -1272,17 +1262,16 @@ idmap_MatchEntry(PLDHashTable *aTable,
     const nsID *idp = NS_REINTERPRET_CAST(const nsID*, aKey);
 
     return memcmp(&entry->mSlowID, idp, sizeof(nsID)) == 0;
 }
 
 static const PLDHashTableOps idmap_DHashTableOps = {
     PL_DHashAllocTable,
     PL_DHashFreeTable,
-    idmap_GetKey,
     idmap_HashKey,
     idmap_MatchEntry,
     PL_DHashMoveEntryStub,
     PL_DHashClearEntryStub,
     PL_DHashFinalizeStub,
     NULL
 };
 
--- a/xpcom/reflect/xptinfo/src/xptiWorkingSet.cpp
+++ b/xpcom/reflect/xptinfo/src/xptiWorkingSet.cpp
@@ -43,22 +43,16 @@
 #include "nsString.h"
 
 #define XPTI_STRING_ARENA_BLOCK_SIZE    (1024 * 1)
 #define XPTI_STRUCT_ARENA_BLOCK_SIZE    (1024 * 1)
 #define XPTI_HASHTABLE_SIZE             128
 
 /***************************************************************************/
 
-PR_STATIC_CALLBACK(const void*)
-IIDGetKey(PLDHashTable *table, PLDHashEntryHdr *entry)
-{
-    return ((xptiHashEntry*)entry)->value->GetTheIID();
-}
-
 PR_STATIC_CALLBACK(PLDHashNumber)
 IIDHash(PLDHashTable *table, const void *key)
 {
     return (PLDHashNumber) ((const nsIID*)key)->m0;        
 }
 
 PR_STATIC_CALLBACK(PRBool)
 IIDMatch(PLDHashTable *table,
@@ -70,47 +64,39 @@ IIDMatch(PLDHashTable *table,
     
     return iid1 == iid2 || iid1->Equals(*iid2);
 }       
           
 const static struct PLDHashTableOps IIDTableOps =
 {
     PL_DHashAllocTable,
     PL_DHashFreeTable,
-    IIDGetKey,
     IIDHash,
     IIDMatch,
     PL_DHashMoveEntryStub,
     PL_DHashClearEntryStub,
     PL_DHashFinalizeStub
 };
 
 /***************************************************************************/
 
-PR_STATIC_CALLBACK(const void*)
-NameGetKey(PLDHashTable *table, PLDHashEntryHdr *entry)
-{
-    return ((xptiHashEntry*)entry)->value->GetTheName();
-}
-
 PR_STATIC_CALLBACK(PRBool)
 NameMatch(PLDHashTable *table,
           const PLDHashEntryHdr *entry,
           const void *key)
 {
     const char* str1 = ((xptiHashEntry*)entry)->value->GetTheName();
     const char* str2 = (const char*) key;
     return str1 == str2 || 0 == PL_strcmp(str1, str2);
 }       
 
 static const struct PLDHashTableOps NameTableOps =
 {
     PL_DHashAllocTable,
     PL_DHashFreeTable,
-    NameGetKey,
     PL_DHashStringKey,
     NameMatch,
     PL_DHashMoveEntryStub,
     PL_DHashClearEntryStub,
     PL_DHashFinalizeStub
 };
 
 /***************************************************************************/