OLD | NEW |
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 #include "vm/service.h" | 5 #include "vm/service.h" |
6 | 6 |
7 #include "include/dart_api.h" | 7 #include "include/dart_api.h" |
8 #include "platform/globals.h" | 8 #include "platform/globals.h" |
9 | 9 |
10 #include "vm/compiler.h" | 10 #include "vm/compiler.h" |
(...skipping 1155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1166 JSONObject jsobj(js); | 1166 JSONObject jsobj(js); |
1167 jsobj.AddProperty("type", "Sentinel"); | 1167 jsobj.AddProperty("type", "Sentinel"); |
1168 jsobj.AddProperty("id", id); | 1168 jsobj.AddProperty("id", id); |
1169 jsobj.AddProperty("valueAsString", preview); | 1169 jsobj.AddProperty("valueAsString", preview); |
1170 } | 1170 } |
1171 | 1171 |
1172 | 1172 |
1173 static SourceBreakpoint* LookupBreakpoint(Isolate* isolate, const char* id) { | 1173 static SourceBreakpoint* LookupBreakpoint(Isolate* isolate, const char* id) { |
1174 size_t end_pos = strcspn(id, "/"); | 1174 size_t end_pos = strcspn(id, "/"); |
1175 if (end_pos == strlen(id)) { | 1175 if (end_pos == strlen(id)) { |
1176 return false; | 1176 return NULL; |
1177 } | 1177 } |
1178 const char* rest = id + end_pos + 1; // +1 for '/'. | 1178 const char* rest = id + end_pos + 1; // +1 for '/'. |
1179 if (strncmp("breakpoints", id, end_pos) == 0) { | 1179 if (strncmp("breakpoints", id, end_pos) == 0) { |
1180 intptr_t bpt_id = 0; | 1180 intptr_t bpt_id = 0; |
1181 SourceBreakpoint* bpt = NULL; | 1181 SourceBreakpoint* bpt = NULL; |
1182 if (GetIntegerId(rest, &bpt_id)) { | 1182 if (GetIntegerId(rest, &bpt_id)) { |
1183 bpt = isolate->debugger()->GetBreakpointById(bpt_id); | 1183 bpt = isolate->debugger()->GetBreakpointById(bpt_id); |
1184 } | 1184 } |
1185 return bpt; | 1185 return bpt; |
1186 } | 1186 } |
(...skipping 1439 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2626 ServiceMethodDescriptor& method = service_methods_[i]; | 2626 ServiceMethodDescriptor& method = service_methods_[i]; |
2627 if (strcmp(method_name, method.name) == 0) { | 2627 if (strcmp(method_name, method.name) == 0) { |
2628 return &method; | 2628 return &method; |
2629 } | 2629 } |
2630 } | 2630 } |
2631 return NULL; | 2631 return NULL; |
2632 } | 2632 } |
2633 | 2633 |
2634 | 2634 |
2635 } // namespace dart | 2635 } // namespace dart |
OLD | NEW |