Index: src/objects-inl.h |
diff --git a/src/objects-inl.h b/src/objects-inl.h |
index 57750c3459187f53f3bf43bda562d0bf3baeeaac..a37fcd58369c83a7fcb4be93efa62cd8eb658656 100644 |
--- a/src/objects-inl.h |
+++ b/src/objects-inl.h |
@@ -1132,6 +1132,7 @@ bool Object::FitsRepresentation(Representation representation) { |
} |
+// static |
MaybeHandle<JSReceiver> Object::ToObject(Isolate* isolate, |
Handle<Object> object) { |
return ToObject( |
@@ -1139,6 +1140,21 @@ MaybeHandle<JSReceiver> Object::ToObject(Isolate* isolate, |
} |
+// static |
+MaybeHandle<Name> Object::ToName(Isolate* isolate, Handle<Object> input) { |
+ if (input->IsName()) return Handle<Name>::cast(input); |
+ return ToString(isolate, input); |
+} |
+ |
+ |
+// static |
+MaybeHandle<Object> Object::ToPrimitive(Handle<Object> input, |
+ ToPrimitiveHint hint) { |
+ if (input->IsPrimitive()) return input; |
+ return JSReceiver::ToPrimitive(Handle<JSReceiver>::cast(input), hint); |
+} |
+ |
+ |
bool Object::HasSpecificClassOf(String* name) { |
return this->IsJSObject() && (JSObject::cast(this)->class_name() == name); |
} |