Index: src/api.cc |
diff --git a/src/api.cc b/src/api.cc |
index 6be11f412dadf12b1846711160ad597cb7fb1e86..4a7c73409a195e8351c9ed0c217dfe7775df5e0a 100644 |
--- a/src/api.cc |
+++ b/src/api.cc |
@@ -2931,11 +2931,11 @@ Local<String> Value::ToDetailString(Isolate* isolate) const { |
MaybeLocal<Object> Value::ToObject(Local<Context> context) const { |
auto obj = Utils::OpenHandle(this); |
- if (obj->IsJSObject()) return ToApiHandle<Object>(obj); |
+ if (obj->IsJSReceiver()) return ToApiHandle<Object>(obj); |
PREPARE_FOR_EXECUTION(context, "ToObject", Object); |
Local<Object> result; |
has_pending_exception = |
- !ToLocal<Object>(i::Execution::ToObject(isolate, obj), &result); |
+ !ToLocal<Object>(i::Object::ToObject(isolate, obj), &result); |
RETURN_ON_FAILED_EXECUTION(Object); |
RETURN_ESCAPED(result); |
} |