Index: src/objects.cc |
diff --git a/src/objects.cc b/src/objects.cc |
index 5ab7b99e0618108b43e1268237647de529bfd55a..90ea972d01957401f49ab10bbd893640c6af2f99 100644 |
--- a/src/objects.cc |
+++ b/src/objects.cc |
@@ -5112,8 +5112,13 @@ void JSObject::SetIdentityHash(Handle<JSObject> object, Handle<Smi> hash) { |
Object* JSObject::GetIdentityHash() { |
- Object* stored_value = GetHiddenProperty(GetHeap()->identity_hash_string()); |
- return stored_value->IsSmi() ? stored_value : GetHeap()->undefined_value(); |
+ DisallowHeapAllocation no_gc; |
+ Isolate* isolate = GetIsolate(); |
+ Object* stored_value = |
+ GetHiddenProperty(isolate->factory()->identity_hash_string()); |
+ return stored_value->IsSmi() |
+ ? stored_value |
+ : isolate->heap()->undefined_value(); |
} |
@@ -5155,7 +5160,8 @@ Handle<Object> JSProxy::GetOrCreateIdentityHash(Handle<JSProxy> proxy) { |
} |
-Object* JSObject::GetHiddenProperty(Name* key) { |
+Object* JSObject::GetHiddenProperty(Handle<Name> key) { |
+ DisallowHeapAllocation no_gc; |
ASSERT(key->IsUniqueName()); |
if (IsJSGlobalProxy()) { |
// For a proxy, use the prototype as target object. |
@@ -5170,7 +5176,7 @@ Object* JSObject::GetHiddenProperty(Name* key) { |
if (inline_value->IsSmi()) { |
// Handle inline-stored identity hash. |
- if (key == GetHeap()->identity_hash_string()) { |
+ if (*key == GetHeap()->identity_hash_string()) { |
return inline_value; |
} else { |
return GetHeap()->the_hole_value(); |
@@ -5180,7 +5186,7 @@ Object* JSObject::GetHiddenProperty(Name* key) { |
if (inline_value->IsUndefined()) return GetHeap()->the_hole_value(); |
ObjectHashTable* hashtable = ObjectHashTable::cast(inline_value); |
- Object* entry = hashtable->Lookup(key); |
+ Object* entry = hashtable->Lookup(*key); |
return entry; |
} |