| Index: src/objects.cc
|
| diff --git a/src/objects.cc b/src/objects.cc
|
| index 5faa79ef646162a8e4cf71c41a0f4748fcd1ccec..8800b99e22300c06b4a8a21392b6c544ecb0aa8a 100644
|
| --- a/src/objects.cc
|
| +++ b/src/objects.cc
|
| @@ -836,14 +836,6 @@ MaybeHandle<Object> JSProxy::GetProperty(Isolate* isolate,
|
| }
|
|
|
|
|
| -Handle<Object> JSReceiver::GetDataProperty(Handle<JSReceiver> object,
|
| - Handle<Name> name) {
|
| - LookupIterator it(object, name,
|
| - LookupIterator::PROTOTYPE_CHAIN_SKIP_INTERCEPTOR);
|
| - return GetDataProperty(&it);
|
| -}
|
| -
|
| -
|
| Handle<Object> JSReceiver::GetDataProperty(LookupIterator* it) {
|
| for (; it->IsFound(); it->Next()) {
|
| switch (it->state()) {
|
| @@ -5856,14 +5848,6 @@ static Smi* GenerateIdentityHash(Isolate* isolate) {
|
| }
|
|
|
|
|
| -void JSObject::SetIdentityHash(Handle<JSObject> object, Handle<Smi> hash) {
|
| - DCHECK(!object->IsJSGlobalProxy());
|
| - Isolate* isolate = object->GetIsolate();
|
| - Handle<Name> hash_code_symbol = isolate->factory()->hash_code_symbol();
|
| - JSObject::AddProperty(object, hash_code_symbol, hash, NONE);
|
| -}
|
| -
|
| -
|
| template<typename ProxyType>
|
| static Handle<Smi> GetOrCreateIdentityHashHelper(Handle<ProxyType> proxy) {
|
| Isolate* isolate = proxy->GetIsolate();
|
| @@ -5893,11 +5877,18 @@ Handle<Smi> JSObject::GetOrCreateIdentityHash(Handle<JSObject> object) {
|
| }
|
| Isolate* isolate = object->GetIsolate();
|
|
|
| - Handle<Object> maybe_hash = JSObject::GetIdentityHash(isolate, object);
|
| - if (maybe_hash->IsSmi()) return Handle<Smi>::cast(maybe_hash);
|
| + Handle<Name> hash_code_symbol = isolate->factory()->hash_code_symbol();
|
| + LookupIterator it(object, hash_code_symbol, LookupIterator::OWN);
|
| + if (it.IsFound()) {
|
| + DCHECK_EQ(LookupIterator::DATA, it.state());
|
| + Handle<Object> maybe_hash = it.GetDataValue();
|
| + if (maybe_hash->IsSmi()) return Handle<Smi>::cast(maybe_hash);
|
| + }
|
|
|
| Handle<Smi> hash(GenerateIdentityHash(isolate), isolate);
|
| - SetIdentityHash(object, hash);
|
| + CHECK(AddDataProperty(&it, hash, NONE, THROW_ON_ERROR,
|
| + CERTAINLY_NOT_STORE_FROM_KEYED)
|
| + .IsJust());
|
| return hash;
|
| }
|
|
|
|
|