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 1145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1156 | 1156 |
1157 Handle<Object> argv[] = { value }; | 1157 Handle<Object> argv[] = { value }; |
1158 RETURN_ON_EXCEPTION_VALUE(isolate, Execution::Call(isolate, setter, receiver, | 1158 RETURN_ON_EXCEPTION_VALUE(isolate, Execution::Call(isolate, setter, receiver, |
1159 arraysize(argv), argv), | 1159 arraysize(argv), argv), |
1160 Nothing<bool>()); | 1160 Nothing<bool>()); |
1161 return Just(true); | 1161 return Just(true); |
1162 } | 1162 } |
1163 | 1163 |
1164 | 1164 |
1165 // static | 1165 // static |
| 1166 bool Object::IsErrorObject(Isolate* isolate, Handle<Object> object) { |
| 1167 if (!object->IsJSObject()) return false; |
| 1168 // Use stack_trace_symbol as proxy for [[ErrorData]]. |
| 1169 Handle<Name> symbol = isolate->factory()->stack_trace_symbol(); |
| 1170 Maybe<bool> has_stack_trace = |
| 1171 JSReceiver::HasOwnProperty(Handle<JSReceiver>::cast(object), symbol); |
| 1172 DCHECK(!has_stack_trace.IsNothing()); |
| 1173 return has_stack_trace.FromJust(); |
| 1174 } |
| 1175 |
| 1176 |
| 1177 // static |
1166 bool JSObject::AllCanRead(LookupIterator* it) { | 1178 bool JSObject::AllCanRead(LookupIterator* it) { |
1167 // Skip current iteration, it's in state ACCESS_CHECK or INTERCEPTOR, both of | 1179 // Skip current iteration, it's in state ACCESS_CHECK or INTERCEPTOR, both of |
1168 // which have already been checked. | 1180 // which have already been checked. |
1169 DCHECK(it->state() == LookupIterator::ACCESS_CHECK || | 1181 DCHECK(it->state() == LookupIterator::ACCESS_CHECK || |
1170 it->state() == LookupIterator::INTERCEPTOR); | 1182 it->state() == LookupIterator::INTERCEPTOR); |
1171 for (it->Next(); it->IsFound(); it->Next()) { | 1183 for (it->Next(); it->IsFound(); it->Next()) { |
1172 if (it->state() == LookupIterator::ACCESSOR) { | 1184 if (it->state() == LookupIterator::ACCESSOR) { |
1173 auto accessors = it->GetAccessors(); | 1185 auto accessors = it->GetAccessors(); |
1174 if (accessors->IsAccessorInfo()) { | 1186 if (accessors->IsAccessorInfo()) { |
1175 if (AccessorInfo::cast(*accessors)->all_can_read()) return true; | 1187 if (AccessorInfo::cast(*accessors)->all_can_read()) return true; |
(...skipping 17997 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
19173 if (cell->value() != *new_value) { | 19185 if (cell->value() != *new_value) { |
19174 cell->set_value(*new_value); | 19186 cell->set_value(*new_value); |
19175 Isolate* isolate = cell->GetIsolate(); | 19187 Isolate* isolate = cell->GetIsolate(); |
19176 cell->dependent_code()->DeoptimizeDependentCodeGroup( | 19188 cell->dependent_code()->DeoptimizeDependentCodeGroup( |
19177 isolate, DependentCode::kPropertyCellChangedGroup); | 19189 isolate, DependentCode::kPropertyCellChangedGroup); |
19178 } | 19190 } |
19179 } | 19191 } |
19180 | 19192 |
19181 } // namespace internal | 19193 } // namespace internal |
19182 } // namespace v8 | 19194 } // namespace v8 |
OLD | NEW |