Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(93)

Side by Side Diff: src/objects.cc

Issue 1491743008: [proxies] Add all-can-read/String/Symbol filtering support to GetKeys() (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: critical correctness fix ;-) Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/key-accumulator.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/objects.h" 5 #include "src/objects.h"
6 6
7 #include <cmath> 7 #include <cmath>
8 #include <iomanip> 8 #include <iomanip>
9 #include <sstream> 9 #include <sstream>
10 10
(...skipping 8083 matching lines...) Expand 10 before | Expand all | Expand 10 after
8094 if (length == 0) { 8094 if (length == 0) {
8095 return Handle<FixedArray>(isolate->heap()->empty_fixed_array()); 8095 return Handle<FixedArray>(isolate->heap()->empty_fixed_array());
8096 } 8096 }
8097 Handle<FixedArray> storage = isolate->factory()->NewFixedArray(length); 8097 Handle<FixedArray> storage = isolate->factory()->NewFixedArray(length);
8098 dictionary->CopyEnumKeysTo(*storage); 8098 dictionary->CopyEnumKeysTo(*storage);
8099 return storage; 8099 return storage;
8100 } 8100 }
8101 } 8101 }
8102 8102
8103 8103
8104 enum IndexedOrNamed { kIndexed, kNamed };
8105
8106
8107 // Returns false iff there was an exception.
8108 template <class Callback, IndexedOrNamed type>
8109 static bool GetKeysFromInterceptor(Isolate* isolate,
8110 Handle<JSReceiver> receiver,
8111 Handle<JSObject> object,
8112 PropertyFilter filter,
8113 KeyAccumulator* accumulator) {
8114 if (type == kIndexed) {
8115 if (!object->HasIndexedInterceptor()) return true;
8116 } else {
8117 if (!object->HasNamedInterceptor()) return true;
8118 }
8119 Handle<InterceptorInfo> interceptor(type == kIndexed
8120 ? object->GetIndexedInterceptor()
8121 : object->GetNamedInterceptor(),
8122 isolate);
8123 if ((filter & ONLY_ALL_CAN_READ) && !interceptor->all_can_read()) {
8124 return true;
8125 }
8126 PropertyCallbackArguments args(isolate, interceptor->data(), *receiver,
8127 *object);
8128 v8::Local<v8::Object> result;
8129 if (!interceptor->enumerator()->IsUndefined()) {
8130 Callback enum_fun = v8::ToCData<Callback>(interceptor->enumerator());
8131 const char* log_tag = type == kIndexed ? "interceptor-indexed-enum"
8132 : "interceptor-named-enum";
8133 LOG(isolate, ApiObjectAccess(log_tag, *object));
8134 result = args.Call(enum_fun);
8135 }
8136 RETURN_VALUE_IF_SCHEDULED_EXCEPTION(isolate, false);
8137 if (result.IsEmpty()) return true;
8138 DCHECK(v8::Utils::OpenHandle(*result)->IsJSArray() ||
8139 (v8::Utils::OpenHandle(*result)->IsJSObject() &&
8140 Handle<JSObject>::cast(v8::Utils::OpenHandle(*result))
8141 ->HasSloppyArgumentsElements()));
8142 // The accumulator takes care of string/symbol filtering.
8143 if (type == kIndexed) {
8144 accumulator->AddElementKeysFromInterceptor(
8145 Handle<JSObject>::cast(v8::Utils::OpenHandle(*result)));
8146 } else {
8147 accumulator->AddKeys(
8148 Handle<JSObject>::cast(v8::Utils::OpenHandle(*result)));
8149 }
8150 return true;
8151 }
8152
8153
8104 static bool GetKeysFromJSObject(Isolate* isolate, Handle<JSReceiver> receiver, 8154 static bool GetKeysFromJSObject(Isolate* isolate, Handle<JSReceiver> receiver,
8105 Handle<JSObject> object, PropertyFilter filter, 8155 Handle<JSObject> object, PropertyFilter filter,
8156 JSReceiver::KeyCollectionType type,
8106 KeyAccumulator* accumulator) { 8157 KeyAccumulator* accumulator) {
8107 accumulator->NextPrototype(); 8158 accumulator->NextPrototype();
8159 bool keep_going = true;
8108 // Check access rights if required. 8160 // Check access rights if required.
8109 if (object->IsAccessCheckNeeded() && 8161 if (object->IsAccessCheckNeeded() &&
8110 !isolate->MayAccess(handle(isolate->context()), object)) { 8162 !isolate->MayAccess(handle(isolate->context()), object)) {
8111 // TODO(jkummerow): Get whitelisted (all-can-read) keys. 8163 // The cross-origin spec says that [[Enumerate]] shall return an empty
8112 // It's probably best to implement a "GetKeysWithFailedAccessCheck" 8164 // iterator when it doesn't have access...
8113 // helper, which will need to look at both interceptors and accessors. 8165 if (type == JSReceiver::INCLUDE_PROTOS) {
8114 return false; 8166 return false;
8167 }
8168 // ...whereas [[OwnPropertyKeys]] shall return whitelisted properties.
8169 DCHECK(type == JSReceiver::OWN_ONLY);
8170 filter = static_cast<PropertyFilter>(filter | ONLY_ALL_CAN_READ);
8171 keep_going = false;
8115 } 8172 }
8116 8173
8117 JSObject::CollectOwnElementKeys(object, accumulator, filter); 8174 JSObject::CollectOwnElementKeys(object, accumulator, filter);
8118 8175
8119 // Add the element keys from the interceptor. 8176 // Add the element keys from the interceptor.
8120 if (object->HasIndexedInterceptor()) { 8177 if (!GetKeysFromInterceptor<v8::IndexedPropertyEnumeratorCallback, kIndexed>(
8121 Handle<JSObject> result; 8178 isolate, receiver, object, filter, accumulator)) {
8122 if (JSObject::GetKeysForIndexedInterceptor(object, receiver) 8179 DCHECK(isolate->has_pending_exception());
8123 .ToHandle(&result)) { 8180 return false;
8124 accumulator->AddElementKeysFromInterceptor(result);
8125 }
8126 RETURN_VALUE_IF_SCHEDULED_EXCEPTION(isolate, false);
8127 } 8181 }
8128 8182
8129 if (filter == ENUMERABLE_STRINGS) { 8183 if (filter == ENUMERABLE_STRINGS) {
8130 // We can cache the computed property keys if access checks are 8184 // We can cache the computed property keys if access checks are
8131 // not needed and no interceptors are involved. 8185 // not needed and no interceptors are involved.
8132 // 8186 //
8133 // We do not use the cache if the object has elements and 8187 // We do not use the cache if the object has elements and
8134 // therefore it does not make sense to cache the property names 8188 // therefore it does not make sense to cache the property names
8135 // for arguments objects. Arguments objects will always have 8189 // for arguments objects. Arguments objects will always have
8136 // elements. 8190 // elements.
8137 // Wrapped strings have elements, but don't have an elements 8191 // Wrapped strings have elements, but don't have an elements
8138 // array or dictionary. So the fast inline test for whether to 8192 // array or dictionary. So the fast inline test for whether to
8139 // use the cache says yes, so we should not create a cache. 8193 // use the cache says yes, so we should not create a cache.
8140 Handle<JSFunction> arguments_function( 8194 Handle<JSFunction> arguments_function(
8141 JSFunction::cast(isolate->sloppy_arguments_map()->GetConstructor())); 8195 JSFunction::cast(isolate->sloppy_arguments_map()->GetConstructor()));
8142 bool cache_enum_length = 8196 bool cache_enum_length =
8143 ((object->map()->GetConstructor() != *arguments_function) && 8197 ((object->map()->GetConstructor() != *arguments_function) &&
8144 !object->IsJSValue() && !object->IsAccessCheckNeeded() && 8198 !object->IsJSValue() && !object->IsAccessCheckNeeded() &&
8145 !object->HasNamedInterceptor() && !object->HasIndexedInterceptor()); 8199 !object->HasNamedInterceptor() && !object->HasIndexedInterceptor());
8146 // Compute the property keys and cache them if possible. 8200 // Compute the property keys and cache them if possible.
8147 Handle<FixedArray> enum_keys = 8201 Handle<FixedArray> enum_keys =
8148 JSObject::GetEnumPropertyKeys(object, cache_enum_length); 8202 JSObject::GetEnumPropertyKeys(object, cache_enum_length);
8149 accumulator->AddKeys(enum_keys); 8203 accumulator->AddKeys(enum_keys);
8150 } else { 8204 } else {
8151 object->CollectOwnPropertyNames(accumulator, filter); 8205 object->CollectOwnPropertyNames(accumulator, filter);
8152 } 8206 }
8153 8207
8154 // Add the property keys from the interceptor. 8208 // Add the property keys from the interceptor.
8155 if (object->HasNamedInterceptor()) { 8209 if (!GetKeysFromInterceptor<v8::GenericNamedPropertyEnumeratorCallback,
8156 Handle<JSObject> result; 8210 kNamed>(isolate, receiver, object, filter,
8157 if (JSObject::GetKeysForNamedInterceptor(object, receiver) 8211 accumulator)) {
8158 .ToHandle(&result)) { 8212 DCHECK(isolate->has_pending_exception());
8159 accumulator->AddKeys(result); 8213 return false;
8160 }
8161 RETURN_VALUE_IF_SCHEDULED_EXCEPTION(isolate, false);
8162 } 8214 }
8163 return true; 8215 return keep_going;
8164 } 8216 }
8165 8217
8166 8218
8167 // Helper function for JSReceiver::GetKeys() below. Can be called recursively. 8219 // Helper function for JSReceiver::GetKeys() below. Can be called recursively.
8168 // Returns false iff an exception was thrown. 8220 // Returns false iff an exception was thrown.
8169 static bool GetKeys_Internal(Isolate* isolate, Handle<JSReceiver> receiver, 8221 static bool GetKeys_Internal(Isolate* isolate, Handle<JSReceiver> receiver,
8170 Handle<JSReceiver> object, 8222 Handle<JSReceiver> object,
8171 JSReceiver::KeyCollectionType type, 8223 JSReceiver::KeyCollectionType type,
8172 PropertyFilter filter, 8224 PropertyFilter filter,
8173 KeyAccumulator* accumulator) { 8225 KeyAccumulator* accumulator) {
(...skipping 13 matching lines...) Expand all
8187 filter, accumulator); 8239 filter, accumulator);
8188 } else { 8240 } else {
8189 DCHECK(type == JSReceiver::INCLUDE_PROTOS); 8241 DCHECK(type == JSReceiver::INCLUDE_PROTOS);
8190 result = JSProxy::Enumerate( 8242 result = JSProxy::Enumerate(
8191 isolate, receiver, Handle<JSProxy>::cast(current), accumulator); 8243 isolate, receiver, Handle<JSProxy>::cast(current), accumulator);
8192 } 8244 }
8193 } else { 8245 } else {
8194 DCHECK(current->IsJSObject()); 8246 DCHECK(current->IsJSObject());
8195 result = GetKeysFromJSObject(isolate, receiver, 8247 result = GetKeysFromJSObject(isolate, receiver,
8196 Handle<JSObject>::cast(current), filter, 8248 Handle<JSObject>::cast(current), filter,
8197 accumulator); 8249 type, accumulator);
8198 } 8250 }
8199 if (!result) { 8251 if (!result) {
8200 if (isolate->has_pending_exception()) { 8252 if (isolate->has_pending_exception()) {
8201 return false; 8253 return false;
8202 } 8254 }
8203 // If there was no exception, then "false" means "stop iterating". 8255 // If there was no exception, then "false" means "stop iterating".
8204 break; 8256 break;
8205 } 8257 }
8206 } 8258 }
8207 return true; 8259 return true;
(...skipping 7381 matching lines...) Expand 10 before | Expand all | Expand 10 after
15589 if (result.IsEmpty()) return isolate->factory()->undefined_value(); 15641 if (result.IsEmpty()) return isolate->factory()->undefined_value();
15590 Handle<Object> result_internal = v8::Utils::OpenHandle(*result); 15642 Handle<Object> result_internal = v8::Utils::OpenHandle(*result);
15591 result_internal->VerifyApiCallResultType(); 15643 result_internal->VerifyApiCallResultType();
15592 *done = true; 15644 *done = true;
15593 // Rebox handle before return 15645 // Rebox handle before return
15594 return handle(*result_internal, isolate); 15646 return handle(*result_internal, isolate);
15595 } 15647 }
15596 15648
15597 15649
15598 // Compute the property keys from the interceptor. 15650 // Compute the property keys from the interceptor.
15651 // TODO(jkummerow): Deprecated.
15599 MaybeHandle<JSObject> JSObject::GetKeysForNamedInterceptor( 15652 MaybeHandle<JSObject> JSObject::GetKeysForNamedInterceptor(
15600 Handle<JSObject> object, Handle<JSReceiver> receiver) { 15653 Handle<JSObject> object, Handle<JSReceiver> receiver) {
15601 Isolate* isolate = receiver->GetIsolate(); 15654 Isolate* isolate = receiver->GetIsolate();
15602 Handle<InterceptorInfo> interceptor(object->GetNamedInterceptor()); 15655 Handle<InterceptorInfo> interceptor(object->GetNamedInterceptor());
15603 PropertyCallbackArguments 15656 PropertyCallbackArguments
15604 args(isolate, interceptor->data(), *receiver, *object); 15657 args(isolate, interceptor->data(), *receiver, *object);
15605 v8::Local<v8::Object> result; 15658 v8::Local<v8::Object> result;
15606 if (!interceptor->enumerator()->IsUndefined()) { 15659 if (!interceptor->enumerator()->IsUndefined()) {
15607 v8::GenericNamedPropertyEnumeratorCallback enum_fun = 15660 v8::GenericNamedPropertyEnumeratorCallback enum_fun =
15608 v8::ToCData<v8::GenericNamedPropertyEnumeratorCallback>( 15661 v8::ToCData<v8::GenericNamedPropertyEnumeratorCallback>(
15609 interceptor->enumerator()); 15662 interceptor->enumerator());
15610 LOG(isolate, ApiObjectAccess("interceptor-named-enum", *object)); 15663 LOG(isolate, ApiObjectAccess("interceptor-named-enum", *object));
15611 result = args.Call(enum_fun); 15664 result = args.Call(enum_fun);
15612 } 15665 }
15613 if (result.IsEmpty()) return MaybeHandle<JSObject>(); 15666 if (result.IsEmpty()) return MaybeHandle<JSObject>();
15614 DCHECK(v8::Utils::OpenHandle(*result)->IsJSArray() || 15667 DCHECK(v8::Utils::OpenHandle(*result)->IsJSArray() ||
15615 (v8::Utils::OpenHandle(*result)->IsJSObject() && 15668 (v8::Utils::OpenHandle(*result)->IsJSObject() &&
15616 Handle<JSObject>::cast(v8::Utils::OpenHandle(*result)) 15669 Handle<JSObject>::cast(v8::Utils::OpenHandle(*result))
15617 ->HasSloppyArgumentsElements())); 15670 ->HasSloppyArgumentsElements()));
15618 // Rebox before returning. 15671 // Rebox before returning.
15619 return handle(JSObject::cast(*v8::Utils::OpenHandle(*result)), isolate); 15672 return handle(JSObject::cast(*v8::Utils::OpenHandle(*result)), isolate);
15620 } 15673 }
15621 15674
15622 15675
15623 // Compute the element keys from the interceptor. 15676 // Compute the element keys from the interceptor.
15677 // TODO(jkummerow): Deprecated.
15624 MaybeHandle<JSObject> JSObject::GetKeysForIndexedInterceptor( 15678 MaybeHandle<JSObject> JSObject::GetKeysForIndexedInterceptor(
15625 Handle<JSObject> object, Handle<JSReceiver> receiver) { 15679 Handle<JSObject> object, Handle<JSReceiver> receiver) {
15626 Isolate* isolate = receiver->GetIsolate(); 15680 Isolate* isolate = receiver->GetIsolate();
15627 Handle<InterceptorInfo> interceptor(object->GetIndexedInterceptor()); 15681 Handle<InterceptorInfo> interceptor(object->GetIndexedInterceptor());
15628 PropertyCallbackArguments 15682 PropertyCallbackArguments
15629 args(isolate, interceptor->data(), *receiver, *object); 15683 args(isolate, interceptor->data(), *receiver, *object);
15630 v8::Local<v8::Object> result; 15684 v8::Local<v8::Object> result;
15631 if (!interceptor->enumerator()->IsUndefined()) { 15685 if (!interceptor->enumerator()->IsUndefined()) {
15632 v8::IndexedPropertyEnumeratorCallback enum_fun = 15686 v8::IndexedPropertyEnumeratorCallback enum_fun =
15633 v8::ToCData<v8::IndexedPropertyEnumeratorCallback>( 15687 v8::ToCData<v8::IndexedPropertyEnumeratorCallback>(
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
15830 } 15884 }
15831 } 15885 }
15832 15886
15833 15887
15834 void JSObject::CollectOwnPropertyNames(KeyAccumulator* keys, 15888 void JSObject::CollectOwnPropertyNames(KeyAccumulator* keys,
15835 PropertyFilter filter) { 15889 PropertyFilter filter) {
15836 if (HasFastProperties()) { 15890 if (HasFastProperties()) {
15837 int real_size = map()->NumberOfOwnDescriptors(); 15891 int real_size = map()->NumberOfOwnDescriptors();
15838 Handle<DescriptorArray> descs(map()->instance_descriptors()); 15892 Handle<DescriptorArray> descs(map()->instance_descriptors());
15839 for (int i = 0; i < real_size; i++) { 15893 for (int i = 0; i < real_size; i++) {
15840 if ((descs->GetDetails(i).attributes() & filter) != 0) continue; 15894 PropertyDetails details = descs->GetDetails(i);
15895 if ((details.attributes() & filter) != 0) continue;
15896 if (filter & ONLY_ALL_CAN_READ) {
15897 if (details.kind() != kAccessor) continue;
15898 Object* accessors = descs->GetValue(i);
15899 if (!accessors->IsAccessorInfo()) continue;
15900 if (!AccessorInfo::cast(accessors)->all_can_read()) continue;
15901 }
15841 Name* key = descs->GetKey(i); 15902 Name* key = descs->GetKey(i);
15842 if (key->FilterKey(filter)) continue; 15903 if (key->FilterKey(filter)) continue;
15843 keys->AddKey(key); 15904 keys->AddKey(key);
15844 } 15905 }
15845 } else if (IsJSGlobalObject()) { 15906 } else if (IsJSGlobalObject()) {
15846 GlobalDictionary::CollectKeysTo(handle(global_dictionary()), keys, filter); 15907 GlobalDictionary::CollectKeysTo(handle(global_dictionary()), keys, filter);
15847 } else { 15908 } else {
15848 NameDictionary::CollectKeysTo(handle(property_dictionary()), keys, filter); 15909 NameDictionary::CollectKeysTo(handle(property_dictionary()), keys, filter);
15849 } 15910 }
15850 } 15911 }
(...skipping 15 matching lines...) Expand all
15866 15927
15867 15928
15868 int JSObject::NumberOfEnumElements() { 15929 int JSObject::NumberOfEnumElements() {
15869 return NumberOfOwnElements(ONLY_ENUMERABLE); 15930 return NumberOfOwnElements(ONLY_ENUMERABLE);
15870 } 15931 }
15871 15932
15872 15933
15873 void JSObject::CollectOwnElementKeys(Handle<JSObject> object, 15934 void JSObject::CollectOwnElementKeys(Handle<JSObject> object,
15874 KeyAccumulator* keys, 15935 KeyAccumulator* keys,
15875 PropertyFilter filter) { 15936 PropertyFilter filter) {
15937 if (filter & SKIP_STRINGS) return;
15876 uint32_t string_keys = 0; 15938 uint32_t string_keys = 0;
15877 15939
15878 // If this is a String wrapper, add the string indices first, 15940 // If this is a String wrapper, add the string indices first,
15879 // as they're guaranteed to precede the elements in numerical order 15941 // as they're guaranteed to precede the elements in numerical order
15880 // and ascending order is required by ECMA-262, 6th, 9.1.12. 15942 // and ascending order is required by ECMA-262, 6th, 9.1.12.
15881 if (object->IsJSValue()) { 15943 if (object->IsJSValue()) {
15882 Object* val = JSValue::cast(*object)->value(); 15944 Object* val = JSValue::cast(*object)->value();
15883 if (val->IsString()) { 15945 if (val->IsString() && (filter & ONLY_ALL_CAN_READ) == 0) {
15884 String* str = String::cast(val); 15946 String* str = String::cast(val);
15885 string_keys = str->length(); 15947 string_keys = str->length();
15886 for (uint32_t i = 0; i < string_keys; i++) { 15948 for (uint32_t i = 0; i < string_keys; i++) {
15887 keys->AddKey(i); 15949 keys->AddKey(i);
15888 } 15950 }
15889 } 15951 }
15890 } 15952 }
15891 ElementsAccessor* accessor = object->GetElementsAccessor(); 15953 ElementsAccessor* accessor = object->GetElementsAccessor();
15892 accessor->CollectElementIndices(object, keys, kMaxUInt32, filter, 0); 15954 accessor->CollectElementIndices(object, keys, kMaxUInt32, filter, 0);
15893 } 15955 }
(...skipping 1935 matching lines...) Expand 10 before | Expand all | Expand 10 after
17829 int array_size = 0; 17891 int array_size = 0;
17830 17892
17831 { 17893 {
17832 DisallowHeapAllocation no_gc; 17894 DisallowHeapAllocation no_gc;
17833 Dictionary<Derived, Shape, Key>* raw_dict = *dictionary; 17895 Dictionary<Derived, Shape, Key>* raw_dict = *dictionary;
17834 for (int i = 0; i < capacity; i++) { 17896 for (int i = 0; i < capacity; i++) {
17835 Object* k = raw_dict->KeyAt(i); 17897 Object* k = raw_dict->KeyAt(i);
17836 if (!raw_dict->IsKey(k) || k->FilterKey(filter)) continue; 17898 if (!raw_dict->IsKey(k) || k->FilterKey(filter)) continue;
17837 if (raw_dict->IsDeleted(i)) continue; 17899 if (raw_dict->IsDeleted(i)) continue;
17838 PropertyDetails details = raw_dict->DetailsAt(i); 17900 PropertyDetails details = raw_dict->DetailsAt(i);
17839 PropertyAttributes attr = details.attributes(); 17901 if ((details.attributes() & filter) != 0) continue;
17840 if ((attr & filter) != 0) continue; 17902 if (filter & ONLY_ALL_CAN_READ) {
17903 if (details.kind() != kAccessor) continue;
17904 Object* accessors = raw_dict->ValueAt(i);
17905 if (!accessors->IsAccessorInfo()) continue;
17906 if (!AccessorInfo::cast(accessors)->all_can_read()) continue;
17907 }
17841 array->set(array_size++, Smi::FromInt(i)); 17908 array->set(array_size++, Smi::FromInt(i));
17842 } 17909 }
17843 17910
17844 EnumIndexComparator<Derived> cmp(static_cast<Derived*>(raw_dict)); 17911 EnumIndexComparator<Derived> cmp(static_cast<Derived*>(raw_dict));
17845 Smi** start = reinterpret_cast<Smi**>(array->GetFirstElementAddress()); 17912 Smi** start = reinterpret_cast<Smi**>(array->GetFirstElementAddress());
17846 std::sort(start, start + array_size, cmp); 17913 std::sort(start, start + array_size, cmp);
17847 } 17914 }
17848 17915
17849 for (int i = 0; i < array_size; i++) { 17916 for (int i = 0; i < array_size; i++) {
17850 int index = Smi::cast(array->get(i))->value(); 17917 int index = Smi::cast(array->get(i))->value();
(...skipping 1204 matching lines...) Expand 10 before | Expand all | Expand 10 after
19055 if (cell->value() != *new_value) { 19122 if (cell->value() != *new_value) {
19056 cell->set_value(*new_value); 19123 cell->set_value(*new_value);
19057 Isolate* isolate = cell->GetIsolate(); 19124 Isolate* isolate = cell->GetIsolate();
19058 cell->dependent_code()->DeoptimizeDependentCodeGroup( 19125 cell->dependent_code()->DeoptimizeDependentCodeGroup(
19059 isolate, DependentCode::kPropertyCellChangedGroup); 19126 isolate, DependentCode::kPropertyCellChangedGroup);
19060 } 19127 }
19061 } 19128 }
19062 19129
19063 } // namespace internal 19130 } // namespace internal
19064 } // namespace v8 19131 } // namespace v8
OLDNEW
« no previous file with comments | « src/key-accumulator.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698