Index: src/objects-inl.h |
diff --git a/src/objects-inl.h b/src/objects-inl.h |
index fd330074aa910e556b05fb899aaa058d4eae4d7d..a8c5baf5104d1f739997209c84a7387fdd42132f 100644 |
--- a/src/objects-inl.h |
+++ b/src/objects-inl.h |
@@ -1143,8 +1143,8 @@ bool Object::FitsRepresentation(Representation representation) { |
// static |
MaybeHandle<JSReceiver> Object::ToObject(Isolate* isolate, |
Handle<Object> object) { |
- return ToObject( |
- isolate, object, handle(isolate->context()->native_context(), isolate)); |
+ if (object->IsJSReceiver()) return Handle<JSReceiver>::cast(object); |
+ return ToObject(isolate, object, isolate->native_context()); |
} |