| OLD | NEW |
| 1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2016, 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 BIN_LOADER_H_ | 5 #ifndef BIN_LOADER_H_ |
| 6 #define BIN_LOADER_H_ | 6 #define BIN_LOADER_H_ |
| 7 | 7 |
| 8 #include "bin/isolate_data.h" | 8 #include "bin/isolate_data.h" |
| 9 #include "include/dart_api.h" | 9 #include "include/dart_api.h" |
| 10 #include "include/dart_native_api.h" | 10 #include "include/dart_native_api.h" |
| (...skipping 20 matching lines...) Expand all Loading... |
| 31 return error_; | 31 return error_; |
| 32 } | 32 } |
| 33 | 33 |
| 34 private: | 34 private: |
| 35 // The port assigned to our native message handler. | 35 // The port assigned to our native message handler. |
| 36 Dart_Port port_; | 36 Dart_Port port_; |
| 37 // Each Loader is associated with an Isolate via its IsolateData. | 37 // Each Loader is associated with an Isolate via its IsolateData. |
| 38 IsolateData* isolate_data_; | 38 IsolateData* isolate_data_; |
| 39 // Remember the first error that occurs during loading. | 39 // Remember the first error that occurs during loading. |
| 40 Dart_Handle error_; | 40 Dart_Handle error_; |
| 41 | |
| 42 // This monitor is used to protect the pending operations count and the | 41 // This monitor is used to protect the pending operations count and the |
| 43 // I/O result queue. | 42 // I/O result queue. |
| 44 Monitor* monitor_; | 43 Monitor* monitor_; |
| 45 | 44 |
| 46 // The number of operations dispatched to the service isolate for loading. | 45 // The number of operations dispatched to the service isolate for loading. |
| 47 // Must be accessed with monitor_ held. | 46 // Must be accessed with monitor_ held. |
| 48 intptr_t pending_operations_; | 47 intptr_t pending_operations_; |
| 49 | 48 |
| 50 // The result of an I/O request to the service isolate. Payload is either | 49 // The result of an I/O request to the service isolate. Payload is either |
| 51 // a UInt8Array or a C string containing an error message. | 50 // a UInt8Array or a C string containing an error message. |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 122 | 121 |
| 123 // This is the global callback for the native message handlers. | 122 // This is the global callback for the native message handlers. |
| 124 static void NativeMessageHandler(Dart_Port dest_port_id, | 123 static void NativeMessageHandler(Dart_Port dest_port_id, |
| 125 Dart_CObject* message); | 124 Dart_CObject* message); |
| 126 }; | 125 }; |
| 127 | 126 |
| 128 } // namespace bin | 127 } // namespace bin |
| 129 } // namespace dart | 128 } // namespace dart |
| 130 | 129 |
| 131 #endif // BIN_LOADER_H_ | 130 #endif // BIN_LOADER_H_ |
| OLD | NEW |