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 <iomanip> | 5 #include <iomanip> |
6 #include <sstream> | 6 #include <sstream> |
7 | 7 |
8 #include "src/v8.h" | 8 #include "src/v8.h" |
9 | 9 |
10 #include "src/accessors.h" | 10 #include "src/accessors.h" |
(...skipping 460 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
471 // which have already been checked. | 471 // which have already been checked. |
472 DCHECK(it->state() == LookupIterator::ACCESS_CHECK || | 472 DCHECK(it->state() == LookupIterator::ACCESS_CHECK || |
473 it->state() == LookupIterator::INTERCEPTOR); | 473 it->state() == LookupIterator::INTERCEPTOR); |
474 for (it->Next(); it->IsFound(); it->Next()) { | 474 for (it->Next(); it->IsFound(); it->Next()) { |
475 if (it->state() == LookupIterator::ACCESSOR) { | 475 if (it->state() == LookupIterator::ACCESSOR) { |
476 auto accessors = it->GetAccessors(); | 476 auto accessors = it->GetAccessors(); |
477 if (accessors->IsAccessorInfo()) { | 477 if (accessors->IsAccessorInfo()) { |
478 if (AccessorInfo::cast(*accessors)->all_can_read()) return true; | 478 if (AccessorInfo::cast(*accessors)->all_can_read()) return true; |
479 } | 479 } |
480 } else if (it->state() == LookupIterator::INTERCEPTOR) { | 480 } else if (it->state() == LookupIterator::INTERCEPTOR) { |
481 auto holder = it->GetHolder<JSObject>(); | 481 if (it->GetInterceptor()->all_can_read()) return true; |
482 if (holder->GetNamedInterceptor()->all_can_read()) return true; | |
483 } | 482 } |
484 } | 483 } |
485 return false; | 484 return false; |
486 } | 485 } |
487 | 486 |
488 | 487 |
489 MaybeHandle<Object> JSObject::GetPropertyWithFailedAccessCheck( | 488 MaybeHandle<Object> JSObject::GetPropertyWithFailedAccessCheck( |
490 LookupIterator* it) { | 489 LookupIterator* it) { |
491 Handle<JSObject> checked = it->GetHolder<JSObject>(); | 490 Handle<JSObject> checked = it->GetHolder<JSObject>(); |
492 while (FindAllCanReadHolder(it)) { | 491 while (FindAllCanReadHolder(it)) { |
(...skipping 16833 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
17326 void PropertyCell::SetValueWithInvalidation(Handle<PropertyCell> cell, | 17325 void PropertyCell::SetValueWithInvalidation(Handle<PropertyCell> cell, |
17327 Handle<Object> new_value) { | 17326 Handle<Object> new_value) { |
17328 if (cell->value() != *new_value) { | 17327 if (cell->value() != *new_value) { |
17329 cell->set_value(*new_value); | 17328 cell->set_value(*new_value); |
17330 Isolate* isolate = cell->GetIsolate(); | 17329 Isolate* isolate = cell->GetIsolate(); |
17331 cell->dependent_code()->DeoptimizeDependentCodeGroup( | 17330 cell->dependent_code()->DeoptimizeDependentCodeGroup( |
17332 isolate, DependentCode::kPropertyCellChangedGroup); | 17331 isolate, DependentCode::kPropertyCellChangedGroup); |
17333 } | 17332 } |
17334 } | 17333 } |
17335 } } // namespace v8::internal | 17334 } } // namespace v8::internal |
OLD | NEW |