src: support GlobalDictionary in SetHashAndUpdateProperties
GetIdentityHashHelper function can return hash from GlobalDictionary, but SetHashAndUpdateProperties crashes on DCHECK on attempt to set this hash (it works when DCHECKs are disabled because SetHash is defined on base class for NameDictionary and GlobalDictionary). R=yangguo@chromium.org Bug: none Change-Id: I740fa6a3232f7db8e4396b9a5e4664b8ab81969a Reviewed-on: https://chromium-review.googlesource.com/1198765 Reviewed-by: Yang Guo <yangguo@chromium.org> Commit-Queue: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org> Cr-Commit-Position: refs/heads/master@{#55551}
This commit is contained in:
parent
215608f453
commit
bd9df9a797
@ -6715,6 +6715,11 @@ Object* SetHashAndUpdateProperties(Isolate* isolate, HeapObject* properties,
|
||||
return properties;
|
||||
}
|
||||
|
||||
if (properties->IsGlobalDictionary()) {
|
||||
GlobalDictionary::cast(properties)->SetHash(hash);
|
||||
return properties;
|
||||
}
|
||||
|
||||
DCHECK(properties->IsNameDictionary());
|
||||
NameDictionary::cast(properties)->SetHash(hash);
|
||||
return properties;
|
||||
|
Loading…
Reference in New Issue
Block a user