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

Unified Diff: src/lookup.cc

Issue 1148583002: Simplify GetProperty helpers to ease element support (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: More comments Created 5 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/lookup.h ('k') | src/objects.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/lookup.cc
diff --git a/src/lookup.cc b/src/lookup.cc
index 8eb5571e51e8dec93eae765b6bc79da9dd877097..79407d93ee6b4a398c0d6c25c3084f27580a5d31 100644
--- a/src/lookup.cc
+++ b/src/lookup.cc
@@ -355,7 +355,7 @@ void LookupIterator::WriteDataValue(Handle<Object> value) {
bool LookupIterator::IsIntegerIndexedExotic(JSReceiver* holder) {
- DCHECK(ExoticIndexState::kNotExotic != exotic_index_state_);
+ DCHECK(exotic_index_state_ != ExoticIndexState::kNotExotic);
// Currently typed arrays are the only such objects.
if (!holder->IsJSTypedArray()) return false;
if (exotic_index_state_ == ExoticIndexState::kExotic) return true;
@@ -386,6 +386,14 @@ bool LookupIterator::HasInterceptor(Map* map) const {
}
+Handle<InterceptorInfo> LookupIterator::GetInterceptor() const {
+ DCHECK_EQ(INTERCEPTOR, state_);
+ Handle<JSObject> js_holder = Handle<JSObject>::cast(holder_);
+ if (IsElement()) return handle(js_holder->GetIndexedInterceptor(), isolate_);
+ return handle(js_holder->GetNamedInterceptor(), isolate_);
+}
+
+
bool LookupIterator::SkipInterceptor(JSObject* holder) {
auto info = holder->GetNamedInterceptor();
// TODO(dcarney): check for symbol/can_intercept_symbols here as well.
« 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