summaryrefslogtreecommitdiff
path: root/chromium/v8/src/objects/dictionary.h
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2017-12-08 13:24:59 +0100
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2017-12-08 13:24:59 +0100
commitcd7832ee326b0c424d4ad1538efd074c86a68f9b (patch)
tree158872ea92d5df96b1290b578cbe574aaa2acfd5 /chromium/v8/src/objects/dictionary.h
parent93cdb9906305e23304d9ff55350b7557fc1850cb (diff)
parent69b8f9169ffd66fdeca1ac60a4bc06b91d106186 (diff)
downloadqtwebengine-chromium-cd7832ee326b0c424d4ad1538efd074c86a68f9b.tar.gz
Merge remote-tracking branch 'origin/upstream-master' into 63-based
Change-Id: I4d88054034fccbb7409fa65c37d4498b74ec0578
Diffstat (limited to 'chromium/v8/src/objects/dictionary.h')
-rw-r--r--chromium/v8/src/objects/dictionary.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/chromium/v8/src/objects/dictionary.h b/chromium/v8/src/objects/dictionary.h
index 0297a7f28b3..11cf8b11639 100644
--- a/chromium/v8/src/objects/dictionary.h
+++ b/chromium/v8/src/objects/dictionary.h
@@ -138,14 +138,16 @@ class BaseNameDictionary : public Dictionary<Derived, Shape> {
return Smi::ToInt(this->get(kNextEnumerationIndexIndex));
}
- void SetHash(int masked_hash) {
- DCHECK_EQ(masked_hash & JSReceiver::kHashMask, masked_hash);
- this->set(kObjectHashIndex, Smi::FromInt(masked_hash));
+ void SetHash(int hash) {
+ DCHECK(PropertyArray::HashField::is_valid(hash));
+ this->set(kObjectHashIndex, Smi::FromInt(hash));
}
int Hash() const {
Object* hash_obj = this->get(kObjectHashIndex);
- return Smi::ToInt(hash_obj);
+ int hash = Smi::ToInt(hash_obj);
+ DCHECK(PropertyArray::HashField::is_valid(hash));
+ return hash;
}
// Creates a new dictionary.