| 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 RUNTIME_BIN_LOADER_H_ | 5 #ifndef RUNTIME_BIN_LOADER_H_ |
| 6 #define RUNTIME_BIN_LOADER_H_ | 6 #define RUNTIME_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" |
| 11 #include "platform/assert.h" | 11 #include "platform/assert.h" |
| 12 #include "platform/globals.h" | 12 #include "platform/globals.h" |
| 13 #include "bin/thread.h" | 13 #include "bin/thread.h" |
| 14 | 14 |
| 15 namespace dart { | 15 namespace dart { |
| 16 namespace bin { | 16 namespace bin { |
| 17 | 17 |
| 18 class Loader { | 18 class Loader { |
| 19 public: | 19 public: |
| 20 explicit Loader(IsolateData* isolate_data); | 20 explicit Loader(IsolateData* isolate_data); |
| 21 ~Loader(); | 21 ~Loader(); |
| 22 | 22 |
| 23 static void InitForSnapshot(const char* snapshot_uri); | 23 static void InitForSnapshot(const char* snapshot_uri); |
| 24 | 24 |
| 25 static Dart_Handle ReloadNativeExtensions(); |
| 26 |
| 25 // Loads contents of the specified url. | 27 // Loads contents of the specified url. |
| 26 static Dart_Handle LoadUrlContents(Dart_Handle url, | 28 static Dart_Handle LoadUrlContents(Dart_Handle url, |
| 27 uint8_t** payload, | 29 uint8_t** payload, |
| 28 intptr_t* payload_length); | 30 intptr_t* payload_length); |
| 29 | 31 |
| 30 | 32 |
| 31 // A static tag handler that hides all usage of a loader for an isolate. | 33 // A static tag handler that hides all usage of a loader for an isolate. |
| 32 static Dart_Handle LibraryTagHandler(Dart_LibraryTag tag, | 34 static Dart_Handle LibraryTagHandler(Dart_LibraryTag tag, |
| 33 Dart_Handle library, | 35 Dart_Handle library, |
| 34 Dart_Handle url); | 36 Dart_Handle url); |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 137 | 139 |
| 138 // This is the global callback for the native message handlers. | 140 // This is the global callback for the native message handlers. |
| 139 static void NativeMessageHandler(Dart_Port dest_port_id, | 141 static void NativeMessageHandler(Dart_Port dest_port_id, |
| 140 Dart_CObject* message); | 142 Dart_CObject* message); |
| 141 }; | 143 }; |
| 142 | 144 |
| 143 } // namespace bin | 145 } // namespace bin |
| 144 } // namespace dart | 146 } // namespace dart |
| 145 | 147 |
| 146 #endif // RUNTIME_BIN_LOADER_H_ | 148 #endif // RUNTIME_BIN_LOADER_H_ |
| OLD | NEW |