Index: src/objects-inl.h |
diff --git a/src/objects-inl.h b/src/objects-inl.h |
index 244e66d4d116514df95ea8d47bc4e25345218c98..5a37c5003d5a330f90d2695c176644a2cbe863c7 100644 |
--- a/src/objects-inl.h |
+++ b/src/objects-inl.h |
@@ -218,6 +218,16 @@ HEAP_OBJECT_TYPE_LIST(IS_TYPE_FUNCTION_DEF) |
ODDBALL_LIST(IS_TYPE_FUNCTION_DEF) |
#undef IS_TYPE_FUNCTION_DEF |
+bool Object::IsNullOrUndefined(Isolate* isolate) const { |
+ Heap* heap = isolate->heap(); |
+ return this == heap->null_value() || this == heap->undefined_value(); |
+} |
+ |
+bool HeapObject::IsNullOrUndefined(Isolate* isolate) const { |
+ Heap* heap = isolate->heap(); |
+ return this == heap->null_value() || this == heap->undefined_value(); |
+} |
+ |
bool HeapObject::IsString() const { |
return map()->instance_type() < FIRST_NONSTRING_TYPE; |
} |