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

Unified Diff: src/objects.cc

Issue 1484393002: [runtime] Adding more detailed error message for Object::GetMethod. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fixing test error strings Created 5 years 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 | « src/messages.h ('k') | test/cctest/test-strings.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
« no previous file with comments | « src/messages.h ('k') | test/cctest/test-strings.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698