| 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 1053 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1064 | 1064 |
| 1065 Maybe<bool> JSObject::SetPropertyWithFailedAccessCheck( | 1065 Maybe<bool> JSObject::SetPropertyWithFailedAccessCheck( |
| 1066 LookupIterator* it, Handle<Object> value, ShouldThrow should_throw) { | 1066 LookupIterator* it, Handle<Object> value, ShouldThrow should_throw) { |
| 1067 Handle<JSObject> checked = it->GetHolder<JSObject>(); | 1067 Handle<JSObject> checked = it->GetHolder<JSObject>(); |
| 1068 if (AllCanWrite(it)) { | 1068 if (AllCanWrite(it)) { |
| 1069 return SetPropertyWithAccessor(it, value, should_throw); | 1069 return SetPropertyWithAccessor(it, value, should_throw); |
| 1070 } | 1070 } |
| 1071 | 1071 |
| 1072 it->isolate()->ReportFailedAccessCheck(checked); | 1072 it->isolate()->ReportFailedAccessCheck(checked); |
| 1073 RETURN_VALUE_IF_SCHEDULED_EXCEPTION(it->isolate(), Nothing<bool>()); | 1073 RETURN_VALUE_IF_SCHEDULED_EXCEPTION(it->isolate(), Nothing<bool>()); |
| 1074 UNREACHABLE(); | 1074 return Just(true); |
| 1075 it->isolate()->Throw( | |
| 1076 *it->isolate()->factory()->NewTypeError(MessageTemplate::kNoAccess)); | |
| 1077 return Nothing<bool>(); | |
| 1078 } | 1075 } |
| 1079 | 1076 |
| 1080 | 1077 |
| 1081 void JSObject::SetNormalizedProperty(Handle<JSObject> object, | 1078 void JSObject::SetNormalizedProperty(Handle<JSObject> object, |
| 1082 Handle<Name> name, | 1079 Handle<Name> name, |
| 1083 Handle<Object> value, | 1080 Handle<Object> value, |
| 1084 PropertyDetails details) { | 1081 PropertyDetails details) { |
| 1085 DCHECK(!object->HasFastProperties()); | 1082 DCHECK(!object->HasFastProperties()); |
| 1086 if (!name->IsUniqueName()) { | 1083 if (!name->IsUniqueName()) { |
| 1087 name = object->GetIsolate()->factory()->InternalizeString( | 1084 name = object->GetIsolate()->factory()->InternalizeString( |
| (...skipping 16921 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 18009 if (cell->value() != *new_value) { | 18006 if (cell->value() != *new_value) { |
| 18010 cell->set_value(*new_value); | 18007 cell->set_value(*new_value); |
| 18011 Isolate* isolate = cell->GetIsolate(); | 18008 Isolate* isolate = cell->GetIsolate(); |
| 18012 cell->dependent_code()->DeoptimizeDependentCodeGroup( | 18009 cell->dependent_code()->DeoptimizeDependentCodeGroup( |
| 18013 isolate, DependentCode::kPropertyCellChangedGroup); | 18010 isolate, DependentCode::kPropertyCellChangedGroup); |
| 18014 } | 18011 } |
| 18015 } | 18012 } |
| 18016 | 18013 |
| 18017 } // namespace internal | 18014 } // namespace internal |
| 18018 } // namespace v8 | 18015 } // namespace v8 |
| OLD | NEW |