Index: src/runtime/runtime-object.cc |
diff --git a/src/runtime/runtime-object.cc b/src/runtime/runtime-object.cc |
index 761008aa63d69504a66a0db284b6561135fbae8f..bfc35907cfd064ef41b5acaa47144d77e08dd759 100644 |
--- a/src/runtime/runtime-object.cc |
+++ b/src/runtime/runtime-object.cc |
@@ -758,6 +758,16 @@ RUNTIME_FUNCTION(Runtime_GetDataProperty) { |
return *JSReceiver::GetDataProperty(object, name); |
} |
+RUNTIME_FUNCTION(Runtime_GetConstructorName) { |
+ HandleScope scope(isolate); |
+ DCHECK(args.length() == 1); |
+ CONVERT_ARG_HANDLE_CHECKED(Object, object, 0); |
+ |
+ Handle<JSReceiver> recv; |
+ ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, recv, |
Yang
2016/07/04 10:55:38
Can this actually throw? If it does, should we cat
jgruber
2016/07/04 12:40:19
Apparently, Object::ToObject() throws if null or u
|
+ Object::ToObject(isolate, object)); |
+ return *JSReceiver::GetConstructorName(recv); |
+} |
RUNTIME_FUNCTION(Runtime_HasFastPackedElements) { |
SealHandleScope shs(isolate); |