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

Side by Side Diff: src/lookup.cc

Issue 2087823002: Optionally invoke an interceptor on failed access checks (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: updates Created 4 years, 5 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
« no previous file with comments | « src/lookup.h ('k') | src/objects.h » ('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/field-type.h" 10 #include "src/field-type.h"
(...skipping 739 matching lines...) Expand 10 before | Expand all | Expand 10 after
750 case v8::internal::kData: 750 case v8::internal::kData:
751 return DATA; 751 return DATA;
752 case v8::internal::kAccessor: 752 case v8::internal::kAccessor:
753 return ACCESSOR; 753 return ACCESSOR;
754 } 754 }
755 755
756 UNREACHABLE(); 756 UNREACHABLE();
757 return state_; 757 return state_;
758 } 758 }
759 759
760 Handle<InterceptorInfo> LookupIterator::GetInterceptorForFailedAccessCheck()
761 const {
762 DCHECK_EQ(ACCESS_CHECK, state_);
763 DisallowHeapAllocation no_gc;
764 AccessCheckInfo* access_check_info =
765 AccessCheckInfo::Get(isolate_, Handle<JSObject>::cast(holder_));
766 if (access_check_info) {
767 Object* interceptor = IsElement() ? access_check_info->indexed_interceptor()
768 : access_check_info->named_interceptor();
769 if (interceptor) {
770 return handle(InterceptorInfo::cast(interceptor), isolate_);
771 }
772 }
773 return Handle<InterceptorInfo>();
774 }
775
760 } // namespace internal 776 } // namespace internal
761 } // namespace v8 777 } // namespace v8
OLDNEW
« no previous file with comments | « src/lookup.h ('k') | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698