Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1)

Side by Side Diff: src/lookup.cc

Issue 1492923002: [proxies] do not leak private symbols to proxy traps (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Move check to LookupIterator Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | test/mjsunit/harmony/proxies-get.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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/lookup.h" 5 #include "src/lookup.h"
6 6
7 #include "src/bootstrapper.h" 7 #include "src/bootstrapper.h"
8 #include "src/deoptimizer.h" 8 #include "src/deoptimizer.h"
9 #include "src/elements.h" 9 #include "src/elements.h"
10 #include "src/isolate-inl.h" 10 #include "src/isolate-inl.h"
(...skipping 591 matching lines...) Expand 10 before | Expand all | Expand 10 after
602 602
603 LookupIterator::State LookupIterator::LookupInHolder(Map* const map, 603 LookupIterator::State LookupIterator::LookupInHolder(Map* const map,
604 JSReceiver* const holder) { 604 JSReceiver* const holder) {
605 STATIC_ASSERT(INTERCEPTOR == BEFORE_PROPERTY); 605 STATIC_ASSERT(INTERCEPTOR == BEFORE_PROPERTY);
606 DisallowHeapAllocation no_gc; 606 DisallowHeapAllocation no_gc;
607 if (interceptor_state_ == InterceptorState::kProcessNonMasking) { 607 if (interceptor_state_ == InterceptorState::kProcessNonMasking) {
608 return LookupNonMaskingInterceptorInHolder(map, holder); 608 return LookupNonMaskingInterceptorInHolder(map, holder);
609 } 609 }
610 switch (state_) { 610 switch (state_) {
611 case NOT_FOUND: 611 case NOT_FOUND:
612 if (map->IsJSProxyMap()) return JSPROXY; 612 if (map->IsJSProxyMap()) {
613 if (!name_.is_null() && name_->IsPrivate()) return NOT_FOUND;
614 return JSPROXY;
615 }
613 if (map->is_access_check_needed() && 616 if (map->is_access_check_needed() &&
614 (IsElement() || !isolate_->IsInternallyUsedPropertyName(name_))) { 617 (IsElement() || !isolate_->IsInternallyUsedPropertyName(name_))) {
615 return ACCESS_CHECK; 618 return ACCESS_CHECK;
616 } 619 }
617 // Fall through. 620 // Fall through.
618 case ACCESS_CHECK: 621 case ACCESS_CHECK:
619 if (exotic_index_state_ != ExoticIndexState::kNotExotic && 622 if (exotic_index_state_ != ExoticIndexState::kNotExotic &&
620 holder->IsJSTypedArray() && IsIntegerIndexedExotic(holder)) { 623 holder->IsJSTypedArray() && IsIntegerIndexedExotic(holder)) {
621 return INTEGER_INDEXED_EXOTIC; 624 return INTEGER_INDEXED_EXOTIC;
622 } 625 }
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
699 // Fall through. 702 // Fall through.
700 default: 703 default:
701 return NOT_FOUND; 704 return NOT_FOUND;
702 } 705 }
703 UNREACHABLE(); 706 UNREACHABLE();
704 return state_; 707 return state_;
705 } 708 }
706 709
707 } // namespace internal 710 } // namespace internal
708 } // namespace v8 711 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | test/mjsunit/harmony/proxies-get.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698