Index: src/objects.cc |
diff --git a/src/objects.cc b/src/objects.cc |
index 30a9f30bbd2db2149e96e092742c858e91b41137..d8b66f1ca003379d2c639f6a3a0b50d163d7f1f1 100644 |
--- a/src/objects.cc |
+++ b/src/objects.cc |
@@ -636,9 +636,8 @@ MaybeHandle<Object> Object::GetMethod(Handle<JSReceiver> receiver, |
return isolate->factory()->undefined_value(); |
} |
if (!func->IsCallable()) { |
- // TODO(bmeurer): Better error message here? |
- THROW_NEW_ERROR(isolate, |
- NewTypeError(MessageTemplate::kCalledNonCallable, func), |
+ THROW_NEW_ERROR(isolate, NewTypeError(MessageTemplate::kPropertyNotFunction, |
+ func, name, receiver), |
Object); |
} |
return func; |