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 #ifndef VM_ISOLATE_H_ | 5 #ifndef VM_ISOLATE_H_ |
6 #define VM_ISOLATE_H_ | 6 #define VM_ISOLATE_H_ |
7 | 7 |
8 #include "include/dart_api.h" | 8 #include "include/dart_api.h" |
9 #include "platform/assert.h" | 9 #include "platform/assert.h" |
10 #include "vm/base_isolate.h" | 10 #include "vm/base_isolate.h" |
(...skipping 808 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
819 }; | 819 }; |
820 | 820 |
821 | 821 |
822 class IsolateSpawnState { | 822 class IsolateSpawnState { |
823 public: | 823 public: |
824 IsolateSpawnState(Dart_Port parent_port, | 824 IsolateSpawnState(Dart_Port parent_port, |
825 const Function& func, | 825 const Function& func, |
826 const Instance& message); | 826 const Instance& message); |
827 IsolateSpawnState(Dart_Port parent_port, | 827 IsolateSpawnState(Dart_Port parent_port, |
828 const char* script_url, | 828 const char* script_url, |
| 829 const char* package_root, |
829 const Instance& args, | 830 const Instance& args, |
830 const Instance& message); | 831 const Instance& message); |
831 ~IsolateSpawnState(); | 832 ~IsolateSpawnState(); |
832 | 833 |
833 Isolate* isolate() const { return isolate_; } | 834 Isolate* isolate() const { return isolate_; } |
834 void set_isolate(Isolate* value) { isolate_ = value; } | 835 void set_isolate(Isolate* value) { isolate_ = value; } |
835 | 836 |
836 Dart_Port parent_port() const { return parent_port_; } | 837 Dart_Port parent_port() const { return parent_port_; } |
837 char* script_url() const { return script_url_; } | 838 char* script_url() const { return script_url_; } |
| 839 char* package_root() const { return package_root_; } |
838 char* library_url() const { return library_url_; } | 840 char* library_url() const { return library_url_; } |
839 char* class_name() const { return class_name_; } | 841 char* class_name() const { return class_name_; } |
840 char* function_name() const { return function_name_; } | 842 char* function_name() const { return function_name_; } |
841 char* exception_callback_name() const { return exception_callback_name_; } | 843 char* exception_callback_name() const { return exception_callback_name_; } |
842 bool is_spawn_uri() const { return library_url_ == NULL; } | 844 bool is_spawn_uri() const { return library_url_ == NULL; } |
843 | 845 |
844 RawObject* ResolveFunction(); | 846 RawObject* ResolveFunction(); |
845 RawInstance* BuildArgs(); | 847 RawInstance* BuildArgs(); |
846 RawInstance* BuildMessage(); | 848 RawInstance* BuildMessage(); |
847 void Cleanup(); | 849 void Cleanup(); |
848 | 850 |
849 private: | 851 private: |
850 Isolate* isolate_; | 852 Isolate* isolate_; |
851 Dart_Port parent_port_; | 853 Dart_Port parent_port_; |
852 char* script_url_; | 854 char* script_url_; |
| 855 char* package_root_; |
853 char* library_url_; | 856 char* library_url_; |
854 char* class_name_; | 857 char* class_name_; |
855 char* function_name_; | 858 char* function_name_; |
856 char* exception_callback_name_; | 859 char* exception_callback_name_; |
857 uint8_t* serialized_args_; | 860 uint8_t* serialized_args_; |
858 intptr_t serialized_args_len_; | 861 intptr_t serialized_args_len_; |
859 uint8_t* serialized_message_; | 862 uint8_t* serialized_message_; |
860 intptr_t serialized_message_len_; | 863 intptr_t serialized_message_len_; |
861 }; | 864 }; |
862 | 865 |
863 } // namespace dart | 866 } // namespace dart |
864 | 867 |
865 #endif // VM_ISOLATE_H_ | 868 #endif // VM_ISOLATE_H_ |
OLD | NEW |