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

Side by Side Diff: runtime/vm/service.cc

Issue 2438613002: Provide an API to dart:developer to control the web server hosting the Service Protocol (Closed)
Patch Set: CHANGELOG.md merge and fatal error Created 4 years, 1 month 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 unified diff | Download patch
« no previous file with comments | « runtime/vm/service.h ('k') | runtime/vm/service_isolate.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 3815 matching lines...) Expand 10 before | Expand all | Expand 10 after
3826 3826
3827 static const MethodParameter* get_version_params[] = { 3827 static const MethodParameter* get_version_params[] = {
3828 NO_ISOLATE_PARAMETER, 3828 NO_ISOLATE_PARAMETER,
3829 NULL, 3829 NULL,
3830 }; 3830 };
3831 3831
3832 3832
3833 static bool GetVersion(Thread* thread, JSONStream* js) { 3833 static bool GetVersion(Thread* thread, JSONStream* js) {
3834 JSONObject jsobj(js); 3834 JSONObject jsobj(js);
3835 jsobj.AddProperty("type", "Version"); 3835 jsobj.AddProperty("type", "Version");
3836 jsobj.AddProperty("major", static_cast<intptr_t>(3)); 3836 jsobj.AddProperty("major",
3837 jsobj.AddProperty("minor", static_cast<intptr_t>(5)); 3837 static_cast<intptr_t>(SERVICE_PROTOCOL_MAJOR_VERSION));
3838 jsobj.AddProperty("minor",
3839 static_cast<intptr_t>(SERVICE_PROTOCOL_MINOR_VERSION));
3838 jsobj.AddProperty("_privateMajor", static_cast<intptr_t>(0)); 3840 jsobj.AddProperty("_privateMajor", static_cast<intptr_t>(0));
3839 jsobj.AddProperty("_privateMinor", static_cast<intptr_t>(0)); 3841 jsobj.AddProperty("_privateMinor", static_cast<intptr_t>(0));
3840 return true; 3842 return true;
3841 } 3843 }
3842 3844
3843 3845
3844 class ServiceIsolateVisitor : public IsolateVisitor { 3846 class ServiceIsolateVisitor : public IsolateVisitor {
3845 public: 3847 public:
3846 explicit ServiceIsolateVisitor(JSONArray* jsarr) 3848 explicit ServiceIsolateVisitor(JSONArray* jsarr)
3847 : jsarr_(jsarr) { 3849 : jsarr_(jsarr) {
(...skipping 381 matching lines...) Expand 10 before | Expand all | Expand 10 after
4229 if (strcmp(method_name, method.name) == 0) { 4231 if (strcmp(method_name, method.name) == 0) {
4230 return &method; 4232 return &method;
4231 } 4233 }
4232 } 4234 }
4233 return NULL; 4235 return NULL;
4234 } 4236 }
4235 4237
4236 #endif // !PRODUCT 4238 #endif // !PRODUCT
4237 4239
4238 } // namespace dart 4240 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/service.h ('k') | runtime/vm/service_isolate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698