summaryrefslogtreecommitdiff
path: root/chromium/v8/src/objects/dictionary.h
diff options
context:
space:
mode:
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.