Bug 1382339 - Improve SpiderMonkey hashing functions by using MFBT's HashGeneric more; r=jandem

This commit is contained in:
Ehsan Akhgari
2017-07-19 15:29:55 -04:00
parent a81153de51
commit 7ee3166230
10 changed files with 28 additions and 22 deletions

View File

@@ -8,6 +8,7 @@
#ifndef mozilla_jsipc_JavaScriptShared_h__
#define mozilla_jsipc_JavaScriptShared_h__
#include "mozilla/HashFunctions.h"
#include "mozilla/dom/DOMTypes.h"
#include "mozilla/jsipc/CrossProcessObjectWrappers.h"
#include "mozilla/jsipc/PJavaScript.h"
@@ -72,7 +73,7 @@ struct ObjectIdHasher
{
typedef ObjectId Lookup;
static js::HashNumber hash(const Lookup& l) {
return l.serialize();
return mozilla::HashGeneric(l.serialize());
}
static bool match(const ObjectId& k, const ObjectId& l) {
return k == l;