| OLD | NEW |
| 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 993 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1004 | 1004 |
| 1005 // Cross-Origin [[Get]] of Well-Known Symbols does not throw, and returns | 1005 // Cross-Origin [[Get]] of Well-Known Symbols does not throw, and returns |
| 1006 // undefined. | 1006 // undefined. |
| 1007 Handle<Name> name = it->GetName(); | 1007 Handle<Name> name = it->GetName(); |
| 1008 if (name->IsSymbol() && Symbol::cast(*name)->is_well_known_symbol()) { | 1008 if (name->IsSymbol() && Symbol::cast(*name)->is_well_known_symbol()) { |
| 1009 return it->factory()->undefined_value(); | 1009 return it->factory()->undefined_value(); |
| 1010 } | 1010 } |
| 1011 | 1011 |
| 1012 it->isolate()->ReportFailedAccessCheck(checked); | 1012 it->isolate()->ReportFailedAccessCheck(checked); |
| 1013 RETURN_EXCEPTION_IF_SCHEDULED_EXCEPTION(it->isolate(), Object); | 1013 RETURN_EXCEPTION_IF_SCHEDULED_EXCEPTION(it->isolate(), Object); |
| 1014 UNREACHABLE(); | 1014 return it->factory()->undefined_value(); |
| 1015 return MaybeHandle<Object>(); | |
| 1016 } | 1015 } |
| 1017 | 1016 |
| 1018 | 1017 |
| 1019 Maybe<PropertyAttributes> JSObject::GetPropertyAttributesWithFailedAccessCheck( | 1018 Maybe<PropertyAttributes> JSObject::GetPropertyAttributesWithFailedAccessCheck( |
| 1020 LookupIterator* it) { | 1019 LookupIterator* it) { |
| 1021 Handle<JSObject> checked = it->GetHolder<JSObject>(); | 1020 Handle<JSObject> checked = it->GetHolder<JSObject>(); |
| 1022 while (AllCanRead(it)) { | 1021 while (AllCanRead(it)) { |
| 1023 if (it->state() == LookupIterator::ACCESSOR) { | 1022 if (it->state() == LookupIterator::ACCESSOR) { |
| 1024 return Just(it->property_details().attributes()); | 1023 return Just(it->property_details().attributes()); |
| 1025 } | 1024 } |
| 1026 DCHECK_EQ(LookupIterator::INTERCEPTOR, it->state()); | 1025 DCHECK_EQ(LookupIterator::INTERCEPTOR, it->state()); |
| 1027 auto result = GetPropertyAttributesWithInterceptor(it); | 1026 auto result = GetPropertyAttributesWithInterceptor(it); |
| 1028 if (it->isolate()->has_scheduled_exception()) break; | 1027 if (it->isolate()->has_scheduled_exception()) break; |
| 1029 if (result.IsJust() && result.FromJust() != ABSENT) return result; | 1028 if (result.IsJust() && result.FromJust() != ABSENT) return result; |
| 1030 } | 1029 } |
| 1031 it->isolate()->ReportFailedAccessCheck(checked); | 1030 it->isolate()->ReportFailedAccessCheck(checked); |
| 1032 RETURN_VALUE_IF_SCHEDULED_EXCEPTION(it->isolate(), | 1031 RETURN_VALUE_IF_SCHEDULED_EXCEPTION(it->isolate(), |
| 1033 Nothing<PropertyAttributes>()); | 1032 Nothing<PropertyAttributes>()); |
| 1034 UNREACHABLE(); | 1033 return Just(ABSENT); |
| 1035 return Nothing<PropertyAttributes>(); | |
| 1036 } | 1034 } |
| 1037 | 1035 |
| 1038 | 1036 |
| 1039 // static | 1037 // static |
| 1040 bool JSObject::AllCanWrite(LookupIterator* it) { | 1038 bool JSObject::AllCanWrite(LookupIterator* it) { |
| 1041 for (; it->IsFound(); it->Next()) { | 1039 for (; it->IsFound(); it->Next()) { |
| 1042 if (it->state() == LookupIterator::ACCESSOR) { | 1040 if (it->state() == LookupIterator::ACCESSOR) { |
| 1043 Handle<Object> accessors = it->GetAccessors(); | 1041 Handle<Object> accessors = it->GetAccessors(); |
| 1044 if (accessors->IsAccessorInfo()) { | 1042 if (accessors->IsAccessorInfo()) { |
| 1045 if (AccessorInfo::cast(*accessors)->all_can_write()) return true; | 1043 if (AccessorInfo::cast(*accessors)->all_can_write()) return true; |
| 1046 } | 1044 } |
| 1047 } | 1045 } |
| 1048 } | 1046 } |
| 1049 return false; | 1047 return false; |
| 1050 } | 1048 } |
| 1051 | 1049 |
| 1052 | 1050 |
| 1053 Maybe<bool> JSObject::SetPropertyWithFailedAccessCheck( | 1051 Maybe<bool> JSObject::SetPropertyWithFailedAccessCheck( |
| 1054 LookupIterator* it, Handle<Object> value, ShouldThrow should_throw) { | 1052 LookupIterator* it, Handle<Object> value, ShouldThrow should_throw) { |
| 1055 Handle<JSObject> checked = it->GetHolder<JSObject>(); | 1053 Handle<JSObject> checked = it->GetHolder<JSObject>(); |
| 1056 if (AllCanWrite(it)) { | 1054 if (AllCanWrite(it)) { |
| 1057 // The supplied language-mode is ignored by SetPropertyWithAccessor. | 1055 // The supplied language-mode is ignored by SetPropertyWithAccessor. |
| 1058 return SetPropertyWithAccessor(it, value, SLOPPY, should_throw); | 1056 return SetPropertyWithAccessor(it, value, SLOPPY, should_throw); |
| 1059 } | 1057 } |
| 1060 | 1058 |
| 1061 it->isolate()->ReportFailedAccessCheck(checked); | 1059 it->isolate()->ReportFailedAccessCheck(checked); |
| 1062 RETURN_VALUE_IF_SCHEDULED_EXCEPTION(it->isolate(), Nothing<bool>()); | 1060 RETURN_VALUE_IF_SCHEDULED_EXCEPTION(it->isolate(), Nothing<bool>()); |
| 1063 UNREACHABLE(); | 1061 UNREACHABLE(); |
| 1062 it->isolate()->Throw( |
| 1063 *it->isolate()->factory()->NewTypeError(MessageTemplate::kNoAccess)); |
| 1064 return Nothing<bool>(); | 1064 return Nothing<bool>(); |
| 1065 } | 1065 } |
| 1066 | 1066 |
| 1067 | 1067 |
| 1068 void JSObject::SetNormalizedProperty(Handle<JSObject> object, | 1068 void JSObject::SetNormalizedProperty(Handle<JSObject> object, |
| 1069 Handle<Name> name, | 1069 Handle<Name> name, |
| 1070 Handle<Object> value, | 1070 Handle<Object> value, |
| 1071 PropertyDetails details) { | 1071 PropertyDetails details) { |
| 1072 DCHECK(!object->HasFastProperties()); | 1072 DCHECK(!object->HasFastProperties()); |
| 1073 if (!name->IsUniqueName()) { | 1073 if (!name->IsUniqueName()) { |
| (...skipping 3711 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4785 switch (it->state()) { | 4785 switch (it->state()) { |
| 4786 case LookupIterator::JSPROXY: | 4786 case LookupIterator::JSPROXY: |
| 4787 case LookupIterator::NOT_FOUND: | 4787 case LookupIterator::NOT_FOUND: |
| 4788 case LookupIterator::TRANSITION: | 4788 case LookupIterator::TRANSITION: |
| 4789 UNREACHABLE(); | 4789 UNREACHABLE(); |
| 4790 | 4790 |
| 4791 case LookupIterator::ACCESS_CHECK: | 4791 case LookupIterator::ACCESS_CHECK: |
| 4792 if (!it->HasAccess()) { | 4792 if (!it->HasAccess()) { |
| 4793 it->isolate()->ReportFailedAccessCheck(it->GetHolder<JSObject>()); | 4793 it->isolate()->ReportFailedAccessCheck(it->GetHolder<JSObject>()); |
| 4794 RETURN_EXCEPTION_IF_SCHEDULED_EXCEPTION(it->isolate(), Object); | 4794 RETURN_EXCEPTION_IF_SCHEDULED_EXCEPTION(it->isolate(), Object); |
| 4795 UNREACHABLE(); | 4795 return value; |
| 4796 } | 4796 } |
| 4797 break; | 4797 break; |
| 4798 | 4798 |
| 4799 // If there's an interceptor, try to store the property with the | 4799 // If there's an interceptor, try to store the property with the |
| 4800 // interceptor. | 4800 // interceptor. |
| 4801 // In case of success, the attributes will have been reset to the default | 4801 // In case of success, the attributes will have been reset to the default |
| 4802 // attributes of the interceptor, rather than the incoming attributes. | 4802 // attributes of the interceptor, rather than the incoming attributes. |
| 4803 // | 4803 // |
| 4804 // TODO(verwaest): JSProxy afterwards verify the attributes that the | 4804 // TODO(verwaest): JSProxy afterwards verify the attributes that the |
| 4805 // JSProxy claims it has, and verifies that they are compatible. If not, | 4805 // JSProxy claims it has, and verifies that they are compatible. If not, |
| (...skipping 1008 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5814 for (; it->IsFound(); it->Next()) { | 5814 for (; it->IsFound(); it->Next()) { |
| 5815 switch (it->state()) { | 5815 switch (it->state()) { |
| 5816 case LookupIterator::JSPROXY: | 5816 case LookupIterator::JSPROXY: |
| 5817 case LookupIterator::NOT_FOUND: | 5817 case LookupIterator::NOT_FOUND: |
| 5818 case LookupIterator::TRANSITION: | 5818 case LookupIterator::TRANSITION: |
| 5819 UNREACHABLE(); | 5819 UNREACHABLE(); |
| 5820 case LookupIterator::ACCESS_CHECK: | 5820 case LookupIterator::ACCESS_CHECK: |
| 5821 if (it->HasAccess()) break; | 5821 if (it->HasAccess()) break; |
| 5822 isolate->ReportFailedAccessCheck(it->GetHolder<JSObject>()); | 5822 isolate->ReportFailedAccessCheck(it->GetHolder<JSObject>()); |
| 5823 RETURN_EXCEPTION_IF_SCHEDULED_EXCEPTION(isolate, Object); | 5823 RETURN_EXCEPTION_IF_SCHEDULED_EXCEPTION(isolate, Object); |
| 5824 UNREACHABLE(); | 5824 return it->factory()->false_value(); |
| 5825 case LookupIterator::INTERCEPTOR: { | 5825 case LookupIterator::INTERCEPTOR: { |
| 5826 MaybeHandle<Object> maybe_result = | 5826 MaybeHandle<Object> maybe_result = |
| 5827 JSObject::DeletePropertyWithInterceptor(it); | 5827 JSObject::DeletePropertyWithInterceptor(it); |
| 5828 // Delete with interceptor succeeded. Return result. | 5828 // Delete with interceptor succeeded. Return result. |
| 5829 if (!maybe_result.is_null()) return maybe_result; | 5829 if (!maybe_result.is_null()) return maybe_result; |
| 5830 // An exception was thrown in the interceptor. Propagate. | 5830 // An exception was thrown in the interceptor. Propagate. |
| 5831 if (isolate->has_pending_exception()) return maybe_result; | 5831 if (isolate->has_pending_exception()) return maybe_result; |
| 5832 break; | 5832 break; |
| 5833 } | 5833 } |
| 5834 case LookupIterator::INTEGER_INDEXED_EXOTIC: | 5834 case LookupIterator::INTEGER_INDEXED_EXOTIC: |
| (...skipping 940 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6775 | 6775 |
| 6776 if (!object->HasSloppyArgumentsElements() && !object->map()->is_observed()) { | 6776 if (!object->HasSloppyArgumentsElements() && !object->map()->is_observed()) { |
| 6777 return PreventExtensionsWithTransition<NONE>(object, should_throw); | 6777 return PreventExtensionsWithTransition<NONE>(object, should_throw); |
| 6778 } | 6778 } |
| 6779 | 6779 |
| 6780 if (object->IsAccessCheckNeeded() && | 6780 if (object->IsAccessCheckNeeded() && |
| 6781 !isolate->MayAccess(handle(isolate->context()), object)) { | 6781 !isolate->MayAccess(handle(isolate->context()), object)) { |
| 6782 isolate->ReportFailedAccessCheck(object); | 6782 isolate->ReportFailedAccessCheck(object); |
| 6783 RETURN_VALUE_IF_SCHEDULED_EXCEPTION(isolate, Nothing<bool>()); | 6783 RETURN_VALUE_IF_SCHEDULED_EXCEPTION(isolate, Nothing<bool>()); |
| 6784 UNREACHABLE(); | 6784 UNREACHABLE(); |
| 6785 RETURN_FAILURE(isolate, should_throw, |
| 6786 NewTypeError(MessageTemplate::kNoAccess)); |
| 6785 } | 6787 } |
| 6786 | 6788 |
| 6787 if (object->IsJSGlobalProxy()) { | 6789 if (object->IsJSGlobalProxy()) { |
| 6788 PrototypeIterator iter(isolate, object); | 6790 PrototypeIterator iter(isolate, object); |
| 6789 if (iter.IsAtEnd()) return Just(true); | 6791 if (iter.IsAtEnd()) return Just(true); |
| 6790 DCHECK(PrototypeIterator::GetCurrent(iter)->IsJSGlobalObject()); | 6792 DCHECK(PrototypeIterator::GetCurrent(iter)->IsJSGlobalObject()); |
| 6791 return PreventExtensions(PrototypeIterator::GetCurrent<JSObject>(iter), | 6793 return PreventExtensions(PrototypeIterator::GetCurrent<JSObject>(iter), |
| 6792 should_throw); | 6794 should_throw); |
| 6793 } | 6795 } |
| 6794 | 6796 |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6874 // Sealing/freezing sloppy arguments should be handled elsewhere. | 6876 // Sealing/freezing sloppy arguments should be handled elsewhere. |
| 6875 DCHECK(!object->HasSloppyArgumentsElements()); | 6877 DCHECK(!object->HasSloppyArgumentsElements()); |
| 6876 DCHECK(!object->map()->is_observed()); | 6878 DCHECK(!object->map()->is_observed()); |
| 6877 | 6879 |
| 6878 Isolate* isolate = object->GetIsolate(); | 6880 Isolate* isolate = object->GetIsolate(); |
| 6879 if (object->IsAccessCheckNeeded() && | 6881 if (object->IsAccessCheckNeeded() && |
| 6880 !isolate->MayAccess(handle(isolate->context()), object)) { | 6882 !isolate->MayAccess(handle(isolate->context()), object)) { |
| 6881 isolate->ReportFailedAccessCheck(object); | 6883 isolate->ReportFailedAccessCheck(object); |
| 6882 RETURN_VALUE_IF_SCHEDULED_EXCEPTION(isolate, Nothing<bool>()); | 6884 RETURN_VALUE_IF_SCHEDULED_EXCEPTION(isolate, Nothing<bool>()); |
| 6883 UNREACHABLE(); | 6885 UNREACHABLE(); |
| 6886 RETURN_FAILURE(isolate, should_throw, |
| 6887 NewTypeError(MessageTemplate::kNoAccess)); |
| 6884 } | 6888 } |
| 6885 | 6889 |
| 6886 if (object->IsJSGlobalProxy()) { | 6890 if (object->IsJSGlobalProxy()) { |
| 6887 PrototypeIterator iter(isolate, object); | 6891 PrototypeIterator iter(isolate, object); |
| 6888 if (iter.IsAtEnd()) return Just(true); | 6892 if (iter.IsAtEnd()) return Just(true); |
| 6889 DCHECK(PrototypeIterator::GetCurrent(iter)->IsJSGlobalObject()); | 6893 DCHECK(PrototypeIterator::GetCurrent(iter)->IsJSGlobalObject()); |
| 6890 return PreventExtensionsWithTransition<attrs>( | 6894 return PreventExtensionsWithTransition<attrs>( |
| 6891 PrototypeIterator::GetCurrent<JSObject>(iter), should_throw); | 6895 PrototypeIterator::GetCurrent<JSObject>(iter), should_throw); |
| 6892 } | 6896 } |
| 6893 | 6897 |
| (...skipping 873 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7767 } | 7771 } |
| 7768 | 7772 |
| 7769 Handle<JSObject> current = PrototypeIterator::GetCurrent<JSObject>(iter); | 7773 Handle<JSObject> current = PrototypeIterator::GetCurrent<JSObject>(iter); |
| 7770 | 7774 |
| 7771 // Check access rights if required. | 7775 // Check access rights if required. |
| 7772 if (current->IsAccessCheckNeeded() && | 7776 if (current->IsAccessCheckNeeded() && |
| 7773 !isolate->MayAccess(handle(isolate->context()), current)) { | 7777 !isolate->MayAccess(handle(isolate->context()), current)) { |
| 7774 if (iter.IsAtEnd(PrototypeIterator::END_AT_NON_HIDDEN)) { | 7778 if (iter.IsAtEnd(PrototypeIterator::END_AT_NON_HIDDEN)) { |
| 7775 isolate->ReportFailedAccessCheck(current); | 7779 isolate->ReportFailedAccessCheck(current); |
| 7776 RETURN_EXCEPTION_IF_SCHEDULED_EXCEPTION(isolate, FixedArray); | 7780 RETURN_EXCEPTION_IF_SCHEDULED_EXCEPTION(isolate, FixedArray); |
| 7777 UNREACHABLE(); | |
| 7778 } | 7781 } |
| 7779 break; | 7782 break; |
| 7780 } | 7783 } |
| 7781 | 7784 |
| 7782 JSObject::CollectOwnElementKeys(current, &accumulator, | 7785 JSObject::CollectOwnElementKeys(current, &accumulator, |
| 7783 static_cast<PropertyAttributes>(DONT_ENUM)); | 7786 static_cast<PropertyAttributes>(DONT_ENUM)); |
| 7784 | 7787 |
| 7785 // Add the element keys from the interceptor. | 7788 // Add the element keys from the interceptor. |
| 7786 if (current->HasIndexedInterceptor()) { | 7789 if (current->HasIndexedInterceptor()) { |
| 7787 Handle<JSObject> result; | 7790 Handle<JSObject> result; |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7880 MaybeHandle<Object> JSObject::DefineAccessor(LookupIterator* it, | 7883 MaybeHandle<Object> JSObject::DefineAccessor(LookupIterator* it, |
| 7881 Handle<Object> getter, | 7884 Handle<Object> getter, |
| 7882 Handle<Object> setter, | 7885 Handle<Object> setter, |
| 7883 PropertyAttributes attributes) { | 7886 PropertyAttributes attributes) { |
| 7884 Isolate* isolate = it->isolate(); | 7887 Isolate* isolate = it->isolate(); |
| 7885 | 7888 |
| 7886 if (it->state() == LookupIterator::ACCESS_CHECK) { | 7889 if (it->state() == LookupIterator::ACCESS_CHECK) { |
| 7887 if (!it->HasAccess()) { | 7890 if (!it->HasAccess()) { |
| 7888 isolate->ReportFailedAccessCheck(it->GetHolder<JSObject>()); | 7891 isolate->ReportFailedAccessCheck(it->GetHolder<JSObject>()); |
| 7889 RETURN_EXCEPTION_IF_SCHEDULED_EXCEPTION(isolate, Object); | 7892 RETURN_EXCEPTION_IF_SCHEDULED_EXCEPTION(isolate, Object); |
| 7890 UNREACHABLE(); | 7893 return isolate->factory()->undefined_value(); |
| 7891 } | 7894 } |
| 7892 it->Next(); | 7895 it->Next(); |
| 7893 } | 7896 } |
| 7894 | 7897 |
| 7895 Handle<JSObject> object = Handle<JSObject>::cast(it->GetReceiver()); | 7898 Handle<JSObject> object = Handle<JSObject>::cast(it->GetReceiver()); |
| 7896 // Ignore accessors on typed arrays. | 7899 // Ignore accessors on typed arrays. |
| 7897 if (it->IsElement() && object->HasFixedTypedArrayElements()) { | 7900 if (it->IsElement() && object->HasFixedTypedArrayElements()) { |
| 7898 return it->factory()->undefined_value(); | 7901 return it->factory()->undefined_value(); |
| 7899 } | 7902 } |
| 7900 | 7903 |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7945 | 7948 |
| 7946 // Duplicate ACCESS_CHECK outside of GetPropertyAttributes for the case that | 7949 // Duplicate ACCESS_CHECK outside of GetPropertyAttributes for the case that |
| 7947 // the FailedAccessCheckCallbackFunction doesn't throw an exception. | 7950 // the FailedAccessCheckCallbackFunction doesn't throw an exception. |
| 7948 // | 7951 // |
| 7949 // TODO(verwaest): Force throw an exception if the callback doesn't, so we can | 7952 // TODO(verwaest): Force throw an exception if the callback doesn't, so we can |
| 7950 // remove reliance on default return values. | 7953 // remove reliance on default return values. |
| 7951 if (it.state() == LookupIterator::ACCESS_CHECK) { | 7954 if (it.state() == LookupIterator::ACCESS_CHECK) { |
| 7952 if (!it.HasAccess()) { | 7955 if (!it.HasAccess()) { |
| 7953 isolate->ReportFailedAccessCheck(object); | 7956 isolate->ReportFailedAccessCheck(object); |
| 7954 RETURN_EXCEPTION_IF_SCHEDULED_EXCEPTION(isolate, Object); | 7957 RETURN_EXCEPTION_IF_SCHEDULED_EXCEPTION(isolate, Object); |
| 7955 UNREACHABLE(); | 7958 return it.factory()->undefined_value(); |
| 7956 } | 7959 } |
| 7957 it.Next(); | 7960 it.Next(); |
| 7958 } | 7961 } |
| 7959 | 7962 |
| 7960 // Ignore accessors on typed arrays. | 7963 // Ignore accessors on typed arrays. |
| 7961 if (it.IsElement() && object->HasFixedTypedArrayElements()) { | 7964 if (it.IsElement() && object->HasFixedTypedArrayElements()) { |
| 7962 return it.factory()->undefined_value(); | 7965 return it.factory()->undefined_value(); |
| 7963 } | 7966 } |
| 7964 | 7967 |
| 7965 CHECK(GetPropertyAttributes(&it).IsJust()); | 7968 CHECK(GetPropertyAttributes(&it).IsJust()); |
| (...skipping 26 matching lines...) Expand all Loading... |
| 7992 switch (it.state()) { | 7995 switch (it.state()) { |
| 7993 case LookupIterator::INTERCEPTOR: | 7996 case LookupIterator::INTERCEPTOR: |
| 7994 case LookupIterator::NOT_FOUND: | 7997 case LookupIterator::NOT_FOUND: |
| 7995 case LookupIterator::TRANSITION: | 7998 case LookupIterator::TRANSITION: |
| 7996 UNREACHABLE(); | 7999 UNREACHABLE(); |
| 7997 | 8000 |
| 7998 case LookupIterator::ACCESS_CHECK: | 8001 case LookupIterator::ACCESS_CHECK: |
| 7999 if (it.HasAccess()) continue; | 8002 if (it.HasAccess()) continue; |
| 8000 isolate->ReportFailedAccessCheck(it.GetHolder<JSObject>()); | 8003 isolate->ReportFailedAccessCheck(it.GetHolder<JSObject>()); |
| 8001 RETURN_EXCEPTION_IF_SCHEDULED_EXCEPTION(isolate, Object); | 8004 RETURN_EXCEPTION_IF_SCHEDULED_EXCEPTION(isolate, Object); |
| 8002 UNREACHABLE(); | 8005 return isolate->factory()->undefined_value(); |
| 8003 | 8006 |
| 8004 case LookupIterator::JSPROXY: | 8007 case LookupIterator::JSPROXY: |
| 8005 return isolate->factory()->undefined_value(); | 8008 return isolate->factory()->undefined_value(); |
| 8006 | 8009 |
| 8007 case LookupIterator::INTEGER_INDEXED_EXOTIC: | 8010 case LookupIterator::INTEGER_INDEXED_EXOTIC: |
| 8008 return isolate->factory()->undefined_value(); | 8011 return isolate->factory()->undefined_value(); |
| 8009 case LookupIterator::DATA: | 8012 case LookupIterator::DATA: |
| 8010 continue; | 8013 continue; |
| 8011 case LookupIterator::ACCESSOR: { | 8014 case LookupIterator::ACCESSOR: { |
| 8012 Handle<Object> maybe_pair = it.GetAccessors(); | 8015 Handle<Object> maybe_pair = it.GetAccessors(); |
| (...skipping 9831 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 17844 if (cell->value() != *new_value) { | 17847 if (cell->value() != *new_value) { |
| 17845 cell->set_value(*new_value); | 17848 cell->set_value(*new_value); |
| 17846 Isolate* isolate = cell->GetIsolate(); | 17849 Isolate* isolate = cell->GetIsolate(); |
| 17847 cell->dependent_code()->DeoptimizeDependentCodeGroup( | 17850 cell->dependent_code()->DeoptimizeDependentCodeGroup( |
| 17848 isolate, DependentCode::kPropertyCellChangedGroup); | 17851 isolate, DependentCode::kPropertyCellChangedGroup); |
| 17849 } | 17852 } |
| 17850 } | 17853 } |
| 17851 | 17854 |
| 17852 } // namespace internal | 17855 } // namespace internal |
| 17853 } // namespace v8 | 17856 } // namespace v8 |
| OLD | NEW |