Commit a8045635 authored by jochen's avatar jochen Committed by Commit bot

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}
parent e3479c55
......@@ -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 static_cast<int>(base::hash_combine(major_, minor_, build_, patch_));
}
// Calculate the V8 version string.
static void GetString(Vector<char> str);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment