Index: src/objects.cc |
diff --git a/src/objects.cc b/src/objects.cc |
index 06e130737616b84e7801f137cf34e72a85df17e9..dabc1f980050b1f77414e883c2011a6064fbe0d2 100644 |
--- a/src/objects.cc |
+++ b/src/objects.cc |
@@ -232,10 +232,10 @@ |
bool Object::BooleanValue() { |
if (IsSmi()) return Smi::cast(this)->value() != 0; |
+ if (IsBoolean()) return IsTrue(); |
DCHECK(IsHeapObject()); |
Isolate* isolate = HeapObject::cast(this)->GetIsolate(); |
- if (IsBoolean()) return IsTrue(isolate); |
- if (IsUndefined(isolate) || IsNull(isolate)) return false; |
+ if (IsUndefined(isolate) || IsNull()) return false; |
if (IsUndetectable()) return false; // Undetectable object is false. |
if (IsString()) return String::cast(this)->length() != 0; |
if (IsHeapNumber()) return HeapNumber::cast(this)->HeapNumberBooleanValue(); |
@@ -694,7 +694,7 @@ |
Isolate* isolate = receiver->GetIsolate(); |
ASSIGN_RETURN_ON_EXCEPTION(isolate, func, |
JSReceiver::GetProperty(receiver, name), Object); |
- if (func->IsNull(isolate) || func->IsUndefined(isolate)) { |
+ if (func->IsNull() || func->IsUndefined(isolate)) { |
return isolate->factory()->undefined_value(); |
} |
if (!func->IsCallable()) { |
@@ -1111,7 +1111,7 @@ |
isolate, handler_proto, |
Execution::Call(isolate, trap, handler, arraysize(argv), argv), Object); |
// 8. If Type(handlerProto) is neither Object nor Null, throw a TypeError. |
- if (!(handler_proto->IsJSReceiver() || handler_proto->IsNull(isolate))) { |
+ if (!(handler_proto->IsJSReceiver() || handler_proto->IsNull())) { |
THROW_NEW_ERROR(isolate, |
NewTypeError(MessageTemplate::kProxyGetPrototypeOfInvalid), |
Object); |
@@ -1693,7 +1693,7 @@ |
JSReceiver::GetProperty(Handle<JSReceiver>::cast(constructor), |
isolate->factory()->species_symbol()), |
Object); |
- if (constructor->IsNull(isolate)) { |
+ if (constructor->IsNull()) { |
constructor = isolate->factory()->undefined_value(); |
} |
} |
@@ -2326,11 +2326,11 @@ |
os << "<undefined>"; |
} else if (IsTheHole(isolate)) { |
os << "<the hole>"; |
- } else if (IsNull(isolate)) { |
+ } else if (IsNull()) { |
os << "<null>"; |
- } else if (IsTrue(isolate)) { |
+ } else if (IsTrue()) { |
os << "<true>"; |
- } else if (IsFalse(isolate)) { |
+ } else if (IsFalse()) { |
os << "<false>"; |
} else { |
os << "<Odd Oddball: "; |
@@ -6019,7 +6019,7 @@ |
DCHECK(result->IsBoolean()); |
// Rebox CustomArguments::kReturnValueOffset before returning. |
- return Just(result->IsTrue(isolate)); |
+ return Just(result->IsTrue()); |
} |
@@ -8426,9 +8426,9 @@ |
} |
DCHECK(getter->IsCallable() || getter->IsUndefined(isolate) || |
- getter->IsNull(isolate) || getter->IsFunctionTemplateInfo()); |
+ getter->IsNull() || getter->IsFunctionTemplateInfo()); |
DCHECK(setter->IsCallable() || setter->IsUndefined(isolate) || |
- setter->IsNull(isolate) || getter->IsFunctionTemplateInfo()); |
+ setter->IsNull() || getter->IsFunctionTemplateInfo()); |
it->TransitionToAccessorProperty(getter, setter, attributes); |
return isolate->factory()->undefined_value(); |
@@ -9249,7 +9249,7 @@ |
: &RuntimeCallStats::Map_TransitionToAccessorProperty); |
// At least one of the accessors needs to be a new value. |
- DCHECK(!getter->IsNull(isolate) || !setter->IsNull(isolate)); |
+ DCHECK(!getter->IsNull() || !setter->IsNull()); |
DCHECK(name->IsUniqueName()); |
// Dictionary maps can always have additional data properties. |
@@ -9310,13 +9310,11 @@ |
if (current_pair->Equals(*getter, *setter)) return map; |
bool overwriting_accessor = false; |
- if (!getter->IsNull(isolate) && |
- !current_pair->get(ACCESSOR_GETTER)->IsNull(isolate) && |
+ if (!getter->IsNull() && !current_pair->get(ACCESSOR_GETTER)->IsNull() && |
current_pair->get(ACCESSOR_GETTER) != *getter) { |
overwriting_accessor = true; |
} |
- if (!setter->IsNull(isolate) && |
- !current_pair->get(ACCESSOR_SETTER)->IsNull(isolate) && |
+ if (!setter->IsNull() && !current_pair->get(ACCESSOR_SETTER)->IsNull() && |
current_pair->get(ACCESSOR_SETTER) != *setter) { |
overwriting_accessor = true; |
} |
@@ -10092,7 +10090,7 @@ |
.ToHandleChecked(); |
} |
Isolate* isolate = accessor_pair->GetIsolate(); |
- if (accessor->IsNull(isolate)) { |
+ if (accessor->IsNull()) { |
return isolate->factory()->undefined_value(); |
} |
return handle(accessor, isolate); |
@@ -12129,9 +12127,8 @@ |
} |
map->set_has_hidden_prototype(is_hidden); |
- WriteBarrierMode wb_mode = prototype->IsNull(map->GetIsolate()) |
- ? SKIP_WRITE_BARRIER |
- : UPDATE_WRITE_BARRIER; |
+ WriteBarrierMode wb_mode = |
+ prototype->IsNull() ? SKIP_WRITE_BARRIER : UPDATE_WRITE_BARRIER; |
map->set_prototype(*prototype, wb_mode); |
} |
@@ -14805,7 +14802,7 @@ |
STACK_CHECK(isolate, Nothing<bool>()); |
Handle<Name> trap_name = isolate->factory()->setPrototypeOf_string(); |
// 1. Assert: Either Type(V) is Object or Type(V) is Null. |
- DCHECK(value->IsJSReceiver() || value->IsNull(isolate)); |
+ DCHECK(value->IsJSReceiver() || value->IsNull()); |
// 2. Let handler be the value of the [[ProxyHandler]] internal slot of O. |
Handle<Object> handler(proxy->handler(), isolate); |
// 3. If handler is null, throw a TypeError exception. |
@@ -14892,7 +14889,7 @@ |
Heap* heap = isolate->heap(); |
// Silently ignore the change if value is not a JSObject or null. |
// SpiderMonkey behaves this way. |
- if (!value->IsJSReceiver() && !value->IsNull(isolate)) return Just(true); |
+ if (!value->IsJSReceiver() && !value->IsNull()) return Just(true); |
bool dictionary_elements_in_chain = |
object->map()->DictionaryElementsInPrototypeChainOnly(); |