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 716 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
727 HANDLESCOPE(T); | 727 HANDLESCOPE(T); |
728 JSONStream js; | 728 JSONStream js; |
729 js.Setup(zone.GetZone(), SendPort::Cast(reply_port).Id(), | 729 js.Setup(zone.GetZone(), SendPort::Cast(reply_port).Id(), |
730 id, method_name, parameter_keys, parameter_values); | 730 id, method_name, parameter_keys, parameter_values); |
731 js.PrintError(kExtensionError, | 731 js.PrintError(kExtensionError, |
732 "Error in extension `%s`: %s", | 732 "Error in extension `%s`: %s", |
733 js.method(), error.ToErrorCString()); | 733 js.method(), error.ToErrorCString()); |
734 js.PostReply(); | 734 js.PostReply(); |
735 } | 735 } |
736 | 736 |
737 | |
zra
2016/01/28 18:40:04
Restore newline.
Cutch
2016/01/28 23:49:45
Done.
| |
738 void Service::InvokeMethod(Isolate* I, const Array& msg) { | 737 void Service::InvokeMethod(Isolate* I, const Array& msg) { |
739 Thread* T = Thread::Current(); | 738 Thread* T = Thread::Current(); |
740 ASSERT(I == T->isolate()); | 739 ASSERT(I == T->isolate()); |
741 ASSERT(I != NULL); | 740 ASSERT(I != NULL); |
742 ASSERT(!msg.IsNull()); | 741 ASSERT(!msg.IsNull()); |
743 ASSERT(msg.Length() == 6); | 742 ASSERT(msg.Length() == 6); |
744 | 743 |
745 { | 744 { |
746 StackZone zone(T); | 745 StackZone zone(T); |
747 HANDLESCOPE(T); | 746 HANDLESCOPE(T); |
(...skipping 3118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3866 const ServiceMethodDescriptor& method = service_methods_[i]; | 3865 const ServiceMethodDescriptor& method = service_methods_[i]; |
3867 if (strcmp(method_name, method.name) == 0) { | 3866 if (strcmp(method_name, method.name) == 0) { |
3868 return &method; | 3867 return &method; |
3869 } | 3868 } |
3870 } | 3869 } |
3871 return NULL; | 3870 return NULL; |
3872 } | 3871 } |
3873 | 3872 |
3874 | 3873 |
3875 } // namespace dart | 3874 } // namespace dart |
OLD | NEW |