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

Unified Diff: src/ic/ic.cc

Issue 2028983002: Introduce IsUndefined(Isolate*) and IsTheHole(Isolate*) (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fixing wrongly wrapped lines Created 4 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
Index: src/ic/ic.cc
diff --git a/src/ic/ic.cc b/src/ic/ic.cc
index 307a290bc47bb111efa25962767bf48273894867..e4b8edbe80be61b6d71984150f1134c8679f8b35 100644
--- a/src/ic/ic.cc
+++ b/src/ic/ic.cc
@@ -235,7 +235,8 @@ static void LookupForRead(LookupIterator* it) {
case LookupIterator::INTERCEPTOR: {
// If there is a getter, return; otherwise loop to perform the lookup.
Handle<JSObject> holder = it->GetHolder<JSObject>();
- if (!holder->GetNamedInterceptor()->getter()->IsUndefined()) {
+ if (!holder->GetNamedInterceptor()->getter()->IsUndefined(
+ it->isolate())) {
return;
}
break;
@@ -588,7 +589,7 @@ void IC::ConfigureVectorState(MapHandleList* maps,
MaybeHandle<Object> LoadIC::Load(Handle<Object> object, Handle<Name> name) {
// If the object is undefined or null it's illegal to try to get any
// of its properties; throw a TypeError in that case.
- if (object->IsUndefined() || object->IsNull()) {
+ if (object->IsUndefined(isolate()) || object->IsNull()) {
return TypeError(MessageTemplate::kNonObjectPropertyLoad, object, name);
}
@@ -1264,7 +1265,7 @@ static Handle<Object> TryConvertKey(Handle<Object> key, Isolate* isolate) {
key = handle(Smi::FromInt(int_value), isolate);
}
}
- } else if (key->IsUndefined()) {
+ } else if (key->IsUndefined(isolate)) {
key = isolate->factory()->undefined_string();
}
return key;
@@ -1404,9 +1405,9 @@ bool StoreIC::LookupForWrite(LookupIterator* it, Handle<Object> value,
InterceptorInfo* info = holder->GetNamedInterceptor();
if (it->HolderIsReceiverOrHiddenPrototype()) {
return !info->non_masking() && receiver.is_identical_to(holder) &&
- !info->setter()->IsUndefined();
- } else if (!info->getter()->IsUndefined() ||
- !info->query()->IsUndefined()) {
+ !info->setter()->IsUndefined(it->isolate());
+ } else if (!info->getter()->IsUndefined(it->isolate()) ||
+ !info->query()->IsUndefined(it->isolate())) {
return false;
}
break;
@@ -1521,7 +1522,7 @@ MaybeHandle<Object> StoreIC::Store(Handle<Object> object, Handle<Name> name,
// If the object is undefined or null it's illegal to try to set any
// properties on it; throw a TypeError in that case.
- if (object->IsUndefined() || object->IsNull()) {
+ if (object->IsUndefined(isolate()) || object->IsNull()) {
return TypeError(MessageTemplate::kNonObjectPropertyStore, object, name);
}

Powered by Google App Engine
This is Rietveld 408576698