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 1909 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1920 | 1920 |
1921 // TODO(turnidge): Consider whether the 'Success' type is proper. | 1921 // TODO(turnidge): Consider whether the 'Success' type is proper. |
1922 JSONObject jsobj(js); | 1922 JSONObject jsobj(js); |
1923 jsobj.AddProperty("type", "Success"); | 1923 jsobj.AddProperty("type", "Success"); |
1924 return true; | 1924 return true; |
1925 } | 1925 } |
1926 | 1926 |
1927 | 1927 |
1928 static RawClass* GetMetricsClass(Isolate* isolate) { | 1928 static RawClass* GetMetricsClass(Isolate* isolate) { |
1929 const Library& prof_lib = | 1929 const Library& prof_lib = |
1930 Library::Handle(isolate, Library::DeveloperLibrary()); | 1930 Library::Handle(isolate, Library::ProfilerLibrary()); |
1931 ASSERT(!prof_lib.IsNull()); | 1931 ASSERT(!prof_lib.IsNull()); |
1932 const String& metrics_cls_name = | 1932 const String& metrics_cls_name = |
1933 String::Handle(isolate, String::New("Metrics")); | 1933 String::Handle(isolate, String::New("Metrics")); |
1934 ASSERT(!metrics_cls_name.IsNull()); | 1934 ASSERT(!metrics_cls_name.IsNull()); |
1935 const Class& metrics_cls = | 1935 const Class& metrics_cls = |
1936 Class::Handle(isolate, prof_lib.LookupClass(metrics_cls_name)); | 1936 Class::Handle(isolate, prof_lib.LookupClass(metrics_cls_name)); |
1937 ASSERT(!metrics_cls.IsNull()); | 1937 ASSERT(!metrics_cls.IsNull()); |
1938 return metrics_cls.raw(); | 1938 return metrics_cls.raw(); |
1939 } | 1939 } |
1940 | 1940 |
(...skipping 757 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2698 ServiceMethodDescriptor& method = service_methods_[i]; | 2698 ServiceMethodDescriptor& method = service_methods_[i]; |
2699 if (strcmp(method_name, method.name) == 0) { | 2699 if (strcmp(method_name, method.name) == 0) { |
2700 return &method; | 2700 return &method; |
2701 } | 2701 } |
2702 } | 2702 } |
2703 return NULL; | 2703 return NULL; |
2704 } | 2704 } |
2705 | 2705 |
2706 | 2706 |
2707 } // namespace dart | 2707 } // namespace dart |
OLD | NEW |