Reviewers: mvstanton, Yang,
Description:
Take the build level into account for the version hash
build is the third number of the V8 version, and very likely to change
(in contrast to the patch level which typically is zero on canaries).
BUG=chromium:440984
[email protected],[email protected]
LOG=n
Please review this at https://codereview.chromium.org/802363002/
Base URL: https://chromium.googlesource.com/v8/v8.git@master
Affected files (+5, -1 lines):
M src/version.h
Index: src/version.h
diff --git a/src/version.h b/src/version.h
index
4f600054ec1d5b964c12ade3a1b38c57ed93af23..c02f96ad94a588e3d29a01c609a9ad6590b23eb1
100644
--- a/src/version.h
+++ b/src/version.h
@@ -5,6 +5,8 @@
#ifndef V8_VERSION_H_
#define V8_VERSION_H_
+#include "src/base/functional.h"
+
namespace v8 {
namespace internal {
@@ -16,7 +18,9 @@ class Version {
static int GetBuild() { return build_; }
static int GetPatch() { return patch_; }
static bool IsCandidate() { return candidate_; }
- static int Hash() { return (major_ << 20) ^ (minor_ << 10) ^ patch_; }
+ static int Hash() {
+ return base::hash_combine(major_, minor_, build_, patch_);
+ }
// Calculate the V8 version string.
static void GetString(Vector<char> str);
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.