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

Side by Side Diff: src/lookup.cc

Issue 1705713002: [runtime] Replace hidden_string with a 0-hash-code private symbol (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 10 months 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
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/field-type.h" 10 #include "src/field-type.h"
(...skipping 588 matching lines...) Expand 10 before | Expand all | Expand 10 after
599 DisallowHeapAllocation no_gc; 599 DisallowHeapAllocation no_gc;
600 if (interceptor_state_ == InterceptorState::kProcessNonMasking) { 600 if (interceptor_state_ == InterceptorState::kProcessNonMasking) {
601 return LookupNonMaskingInterceptorInHolder(map, holder); 601 return LookupNonMaskingInterceptorInHolder(map, holder);
602 } 602 }
603 switch (state_) { 603 switch (state_) {
604 case NOT_FOUND: 604 case NOT_FOUND:
605 if (map->IsJSProxyMap()) { 605 if (map->IsJSProxyMap()) {
606 // Do not leak private property names. 606 // Do not leak private property names.
607 if (IsElement() || !name_->IsPrivate()) return JSPROXY; 607 if (IsElement() || !name_->IsPrivate()) return JSPROXY;
608 } 608 }
609 if (map->is_access_check_needed() && 609 if (map->is_access_check_needed()) {
610 (IsElement() || !isolate_->IsInternallyUsedPropertyName(name_))) { 610 if (IsElement() || !name_->IsPrivate()) return ACCESS_CHECK;
611 return ACCESS_CHECK;
612 } 611 }
613 // Fall through. 612 // Fall through.
614 case ACCESS_CHECK: 613 case ACCESS_CHECK:
615 if (check_interceptor() && HasInterceptor(map) && 614 if (check_interceptor() && HasInterceptor(map) &&
616 !SkipInterceptor(JSObject::cast(holder))) { 615 !SkipInterceptor(JSObject::cast(holder))) {
617 // Do not leak private property names. 616 // Do not leak private property names.
618 if (!name_.is_null() && name_->IsPrivate()) return NOT_FOUND; 617 if (!name_.is_null() && name_->IsPrivate()) return NOT_FOUND;
619 return INTERCEPTOR; 618 return INTERCEPTOR;
620 } 619 }
621 // Fall through. 620 // Fall through.
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
682 // Fall through. 681 // Fall through.
683 default: 682 default:
684 return NOT_FOUND; 683 return NOT_FOUND;
685 } 684 }
686 UNREACHABLE(); 685 UNREACHABLE();
687 return state_; 686 return state_;
688 } 687 }
689 688
690 } // namespace internal 689 } // namespace internal
691 } // namespace v8 690 } // namespace v8
OLDNEW
« src/heap/heap.cc ('K') | « src/lookup.h ('k') | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698