Chromium Code Reviews| 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 1170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1181 DCHECK(it->state() == LookupIterator::ACCESS_CHECK || | 1181 DCHECK(it->state() == LookupIterator::ACCESS_CHECK || |
| 1182 it->state() == LookupIterator::INTERCEPTOR); | 1182 it->state() == LookupIterator::INTERCEPTOR); |
| 1183 for (it->Next(); it->IsFound(); it->Next()) { | 1183 for (it->Next(); it->IsFound(); it->Next()) { |
| 1184 if (it->state() == LookupIterator::ACCESSOR) { | 1184 if (it->state() == LookupIterator::ACCESSOR) { |
| 1185 auto accessors = it->GetAccessors(); | 1185 auto accessors = it->GetAccessors(); |
| 1186 if (accessors->IsAccessorInfo()) { | 1186 if (accessors->IsAccessorInfo()) { |
| 1187 if (AccessorInfo::cast(*accessors)->all_can_read()) return true; | 1187 if (AccessorInfo::cast(*accessors)->all_can_read()) return true; |
| 1188 } | 1188 } |
| 1189 } else if (it->state() == LookupIterator::INTERCEPTOR) { | 1189 } else if (it->state() == LookupIterator::INTERCEPTOR) { |
| 1190 if (it->GetInterceptor()->all_can_read()) return true; | 1190 if (it->GetInterceptor()->all_can_read()) return true; |
| 1191 } else if (it->state() == LookupIterator::JSPROXY) { | |
| 1192 // Stop lookupiterating. And no, AllCanNotRead. | |
|
Jakob Kummerow
2015/12/11 14:52:28
Do you like this comment, or is it too friday?
| |
| 1193 return false; | |
| 1191 } | 1194 } |
| 1192 } | 1195 } |
| 1193 return false; | 1196 return false; |
| 1194 } | 1197 } |
| 1195 | 1198 |
| 1196 | 1199 |
| 1197 MaybeHandle<Object> JSObject::GetPropertyWithFailedAccessCheck( | 1200 MaybeHandle<Object> JSObject::GetPropertyWithFailedAccessCheck( |
| 1198 LookupIterator* it) { | 1201 LookupIterator* it) { |
| 1199 Handle<JSObject> checked = it->GetHolder<JSObject>(); | 1202 Handle<JSObject> checked = it->GetHolder<JSObject>(); |
| 1200 while (AllCanRead(it)) { | 1203 while (AllCanRead(it)) { |
| (...skipping 18049 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 19250 if (cell->value() != *new_value) { | 19253 if (cell->value() != *new_value) { |
| 19251 cell->set_value(*new_value); | 19254 cell->set_value(*new_value); |
| 19252 Isolate* isolate = cell->GetIsolate(); | 19255 Isolate* isolate = cell->GetIsolate(); |
| 19253 cell->dependent_code()->DeoptimizeDependentCodeGroup( | 19256 cell->dependent_code()->DeoptimizeDependentCodeGroup( |
| 19254 isolate, DependentCode::kPropertyCellChangedGroup); | 19257 isolate, DependentCode::kPropertyCellChangedGroup); |
| 19255 } | 19258 } |
| 19256 } | 19259 } |
| 19257 | 19260 |
| 19258 } // namespace internal | 19261 } // namespace internal |
| 19259 } // namespace v8 | 19262 } // namespace v8 |
| OLD | NEW |