Chromium Code Reviews| Index: runtime/vm/service.cc |
| =================================================================== |
| --- runtime/vm/service.cc (revision 39179) |
| +++ runtime/vm/service.cc (working copy) |
| @@ -1139,19 +1139,15 @@ |
| static bool HandleClassesFunctions(Isolate* isolate, const Class& cls, |
| JSONStream* js) { |
| - intptr_t id; |
| - if (js->num_arguments() > 5) { |
| - PrintError(js, "Command too long"); |
| + if (js->num_arguments() != 4 && js->num_arguments() != 5) { |
| + PrintError(js, "Command should have 4 or 5 arguments"); |
| return true; |
| } |
| - if (!GetIntegerId(js->GetArgument(3), &id)) { |
| - PrintError(js, "Must specify collection object id: functions/id"); |
| - return true; |
| - } |
| - Function& func = Function::Handle(); |
| - func ^= cls.FunctionFromIndex(id); |
| + String& id = String::Handle(isolate, String::New(js->GetArgument(3))); |
| + id = String::DecodeIRI(id); |
| + Function& func = Function::Handle(cls.LookupFunction(id)); |
| if (func.IsNull()) { |
| - PrintError(js, "Function %" Pd " not found", id); |
| + PrintError(js, "Function %s not found", id.ToCString()); |
|
Cutch
2014/08/13 18:01:47
Should we report the undecoded id (so that it matc
koda
2014/08/13 18:18:35
Good idea; changed to report the id from the reque
|
| return true; |
| } |
| if (js->num_arguments() == 4) { |