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

Side by Side Diff: src/lookup.cc

Issue 1398093002: Pass the context from which a given receiver is accessed explicitly (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 2 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/isolate.cc ('k') | src/objects.cc » ('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 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 PrototypeIterator iter(isolate(), receiver_); 127 PrototypeIterator iter(isolate(), receiver_);
128 if (iter.IsAtEnd()) return Handle<JSGlobalProxy>::cast(receiver_); 128 if (iter.IsAtEnd()) return Handle<JSGlobalProxy>::cast(receiver_);
129 return PrototypeIterator::GetCurrent<JSGlobalObject>(iter); 129 return PrototypeIterator::GetCurrent<JSGlobalObject>(iter);
130 } 130 }
131 return Handle<JSObject>::cast(receiver_); 131 return Handle<JSObject>::cast(receiver_);
132 } 132 }
133 133
134 134
135 bool LookupIterator::HasAccess() const { 135 bool LookupIterator::HasAccess() const {
136 DCHECK_EQ(ACCESS_CHECK, state_); 136 DCHECK_EQ(ACCESS_CHECK, state_);
137 return isolate_->MayAccess(GetHolder<JSObject>()); 137 return isolate_->MayAccess(handle(isolate_->context()),
138 GetHolder<JSObject>());
138 } 139 }
139 140
140 141
141 void LookupIterator::ReloadPropertyInformation() { 142 void LookupIterator::ReloadPropertyInformation() {
142 state_ = BEFORE_PROPERTY; 143 state_ = BEFORE_PROPERTY;
143 interceptor_state_ = InterceptorState::kUninitialized; 144 interceptor_state_ = InterceptorState::kUninitialized;
144 state_ = LookupInHolder(*holder_map_, *holder_); 145 state_ = LookupInHolder(*holder_map_, *holder_);
145 DCHECK(IsFound() || holder_map_->is_dictionary_map()); 146 DCHECK(IsFound() || holder_map_->is_dictionary_map());
146 } 147 }
147 148
(...skipping 566 matching lines...) Expand 10 before | Expand all | Expand 10 after
714 // Fall through. 715 // Fall through.
715 default: 716 default:
716 return NOT_FOUND; 717 return NOT_FOUND;
717 } 718 }
718 UNREACHABLE(); 719 UNREACHABLE();
719 return state_; 720 return state_;
720 } 721 }
721 722
722 } // namespace internal 723 } // namespace internal
723 } // namespace v8 724 } // namespace v8
OLDNEW
« no previous file with comments | « src/isolate.cc ('k') | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698