Adapt to changes on hash functions of Chrome 50

This commit is contained in:
Cheng Zhao 2016-05-11 22:15:24 +09:00
parent 08779eb6d9
commit f1142cf2b5

View file

@ -14,22 +14,6 @@
#include "native_mate/dictionary.h"
#include "v8/include/v8-profiler.h"
// Following code should be removed after we upgraded to Chrome 50.
#if !defined(COMPILER_MSVC)
namespace base {
template <typename T1, typename T2>
inline size_t HashInts(T1 value1, T2 value2) {
// This condition is expected to be compile-time evaluated and optimised away
// in release builds.
if (sizeof(T1) > sizeof(uint32_t) || (sizeof(T2) > sizeof(uint32_t)))
return HashInts64(value1, value2);
return HashInts32(value1, value2);
}
} // namespace base
namespace std {
// The hash function used by DoubleIDWeakMap.
@ -41,7 +25,6 @@ struct hash<std::pair<Type1, Type2>> {
};
} // namespace std
#endif // defined(COMPILER_MSVC)
namespace mate {