| 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 "include/dart_native_api.h" | 8 #include "include/dart_native_api.h" |
| 9 #include "platform/globals.h" | 9 #include "platform/globals.h" |
| 10 | 10 |
| (...skipping 3809 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3820 | 3820 |
| 3821 static const MethodParameter* get_version_params[] = { | 3821 static const MethodParameter* get_version_params[] = { |
| 3822 NO_ISOLATE_PARAMETER, | 3822 NO_ISOLATE_PARAMETER, |
| 3823 NULL, | 3823 NULL, |
| 3824 }; | 3824 }; |
| 3825 | 3825 |
| 3826 | 3826 |
| 3827 static bool GetVersion(Thread* thread, JSONStream* js) { | 3827 static bool GetVersion(Thread* thread, JSONStream* js) { |
| 3828 JSONObject jsobj(js); | 3828 JSONObject jsobj(js); |
| 3829 jsobj.AddProperty("type", "Version"); | 3829 jsobj.AddProperty("type", "Version"); |
| 3830 jsobj.AddProperty("major", static_cast<intptr_t>(3)); | 3830 jsobj.AddProperty("major", |
| 3831 jsobj.AddProperty("minor", static_cast<intptr_t>(5)); | 3831 static_cast<intptr_t>(SERVICE_PROTOCOL_MAJOR_VERSION)); |
| 3832 jsobj.AddProperty("minor", |
| 3833 static_cast<intptr_t>(SERVICE_PROTOCOL_MINOR_VERSION)); |
| 3832 jsobj.AddProperty("_privateMajor", static_cast<intptr_t>(0)); | 3834 jsobj.AddProperty("_privateMajor", static_cast<intptr_t>(0)); |
| 3833 jsobj.AddProperty("_privateMinor", static_cast<intptr_t>(0)); | 3835 jsobj.AddProperty("_privateMinor", static_cast<intptr_t>(0)); |
| 3834 return true; | 3836 return true; |
| 3835 } | 3837 } |
| 3836 | 3838 |
| 3837 | 3839 |
| 3838 class ServiceIsolateVisitor : public IsolateVisitor { | 3840 class ServiceIsolateVisitor : public IsolateVisitor { |
| 3839 public: | 3841 public: |
| 3840 explicit ServiceIsolateVisitor(JSONArray* jsarr) | 3842 explicit ServiceIsolateVisitor(JSONArray* jsarr) |
| 3841 : jsarr_(jsarr) { | 3843 : jsarr_(jsarr) { |
| (...skipping 381 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4223 if (strcmp(method_name, method.name) == 0) { | 4225 if (strcmp(method_name, method.name) == 0) { |
| 4224 return &method; | 4226 return &method; |
| 4225 } | 4227 } |
| 4226 } | 4228 } |
| 4227 return NULL; | 4229 return NULL; |
| 4228 } | 4230 } |
| 4229 | 4231 |
| 4230 #endif // !PRODUCT | 4232 #endif // !PRODUCT |
| 4231 | 4233 |
| 4232 } // namespace dart | 4234 } // namespace dart |
| OLD | NEW |