Index: src/runtime/runtime-debug.cc |
diff --git a/src/runtime/runtime-debug.cc b/src/runtime/runtime-debug.cc |
index a2144ebe7147bb0c917915092fcddcb5c69dbd3a..e59ed027078b7b1570a5d193aa3a26a195b6248d 100644 |
--- a/src/runtime/runtime-debug.cc |
+++ b/src/runtime/runtime-debug.cc |
@@ -1454,11 +1454,14 @@ RUNTIME_FUNCTION(Runtime_FunctionGetDebugName) { |
CONVERT_ARG_HANDLE_CHECKED(JSReceiver, function, 0); |
+ Handle<Object> name; |
if (function->IsJSBoundFunction()) { |
- return Handle<JSBoundFunction>::cast(function)->name(); |
+ ASSIGN_RETURN_FAILURE_ON_EXCEPTION( |
+ isolate, name, JSBoundFunction::GetName( |
+ isolate, Handle<JSBoundFunction>::cast(function))); |
+ } else { |
+ name = JSFunction::GetDebugName(Handle<JSFunction>::cast(function)); |
} |
- Handle<Object> name = |
- JSFunction::GetDebugName(Handle<JSFunction>::cast(function)); |
return *name; |
} |