Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(171)

Unified Diff: src/objects-inl.h

Issue 1698463002: [runtime] Speed up Object::ToObject with JSReceiver argument. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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());
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698