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 R=mvstanton@chromium.org,yangguo@chromium.org LOG=n Review URL: https://codereview.chromium.org/802363002 Cr-Commit-Position: refs/heads/master@{#25820}
This commit is contained in:
parent
e3479c553c
commit
a8045635cb
@ -5,6 +5,8 @@
|
|||||||
#ifndef V8_VERSION_H_
|
#ifndef V8_VERSION_H_
|
||||||
#define V8_VERSION_H_
|
#define V8_VERSION_H_
|
||||||
|
|
||||||
|
#include "src/base/functional.h"
|
||||||
|
|
||||||
namespace v8 {
|
namespace v8 {
|
||||||
namespace internal {
|
namespace internal {
|
||||||
|
|
||||||
@ -16,7 +18,9 @@ class Version {
|
|||||||
static int GetBuild() { return build_; }
|
static int GetBuild() { return build_; }
|
||||||
static int GetPatch() { return patch_; }
|
static int GetPatch() { return patch_; }
|
||||||
static bool IsCandidate() { return candidate_; }
|
static bool IsCandidate() { return candidate_; }
|
||||||
static int Hash() { return (major_ << 20) ^ (minor_ << 10) ^ patch_; }
|
static int Hash() {
|
||||||
|
return static_cast<int>(base::hash_combine(major_, minor_, build_, patch_));
|
||||||
|
}
|
||||||
|
|
||||||
// Calculate the V8 version string.
|
// Calculate the V8 version string.
|
||||||
static void GetString(Vector<char> str);
|
static void GetString(Vector<char> str);
|
||||||
|
Loading…
Reference in New Issue
Block a user