Index: src/objects.cc |
diff --git a/src/objects.cc b/src/objects.cc |
index e6fc951513ce89e4fc91cfbfa1c400309c67a52b..f78fe228ff792eddc2423d65c4ca7e56e0004a84 100644 |
--- a/src/objects.cc |
+++ b/src/objects.cc |
@@ -412,10 +412,10 @@ bool Object::StrictEquals(Object* that) { |
// static |
Handle<String> Object::TypeOf(Isolate* isolate, Handle<Object> object) { |
if (object->IsNumber()) return isolate->factory()->number_string(); |
- if (object->IsUndefined() || object->IsUndetectableObject()) { |
+ if (object->IsOddball()) return handle(Oddball::cast(*object)->type_of()); |
+ if (object->IsUndetectableObject()) { |
return isolate->factory()->undefined_string(); |
} |
- if (object->IsBoolean()) return isolate->factory()->boolean_string(); |
if (object->IsString()) return isolate->factory()->string_string(); |
if (object->IsSymbol()) return isolate->factory()->symbol_string(); |
if (object->IsString()) return isolate->factory()->string_string(); |