Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(637)

Side by Side Diff: runtime/bin/loader.h

Issue 2715463003: Add option to gen_snapshot for creating a Makefile describing a snapshot's dependencies. (Closed)
Patch Set: Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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"
(...skipping 11 matching lines...) Expand all
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(); 25 static Dart_Handle ReloadNativeExtensions();
26 26
27 // Loads contents of the specified url. 27 // Loads contents of the specified url.
28 static Dart_Handle LoadUrlContents(Dart_Handle url, 28 static Dart_Handle LoadUrlContents(Dart_Handle url,
29 uint8_t** payload, 29 uint8_t** payload,
30 intptr_t* payload_length); 30 intptr_t* payload_length);
31 31
32 static Dart_Handle ResolveAsFilePath(Dart_Handle url,
33 uint8_t** payload,
34 intptr_t* payload_length);
32 35
33 // A static tag handler that hides all usage of a loader for an isolate. 36 // A static tag handler that hides all usage of a loader for an isolate.
34 static Dart_Handle LibraryTagHandler(Dart_LibraryTag tag, 37 static Dart_Handle LibraryTagHandler(Dart_LibraryTag tag,
35 Dart_Handle library, 38 Dart_Handle library,
36 Dart_Handle url); 39 Dart_Handle url);
37 40
38 Dart_Handle error() const { return error_; } 41 Dart_Handle error() const { return error_; }
39 42
40 static void InitOnce(); 43 static void InitOnce();
41 44
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 /// Queue |message| and notify the loader that a message is available. 102 /// Queue |message| and notify the loader that a message is available.
100 void QueueMessage(Dart_CObject* message); 103 void QueueMessage(Dart_CObject* message);
101 104
102 /// Blocks the caller until the loader is finished. 105 /// Blocks the caller until the loader is finished.
103 void BlockUntilComplete(ProcessResult process_result); 106 void BlockUntilComplete(ProcessResult process_result);
104 107
105 /// Returns false if |result| is an error and the loader should quit. 108 /// Returns false if |result| is an error and the loader should quit.
106 static bool ProcessResultLocked(Loader* loader, IOResult* result); 109 static bool ProcessResultLocked(Loader* loader, IOResult* result);
107 110
108 /// Returns false if |result| is an error and the loader should quit. 111 /// Returns false if |result| is an error and the loader should quit.
109 static bool ProcessUrlLoadResultLocked(Loader* loader, IOResult* result); 112 static bool ProcessPayloadResultLocked(Loader* loader, IOResult* result);
110 113
111 /// Returns false if an error occurred and the loader should quit. 114 /// Returns false if an error occurred and the loader should quit.
112 bool ProcessQueueLocked(ProcessResult process_result); 115 bool ProcessQueueLocked(ProcessResult process_result);
113 116
114 // Special inner tag handler for dart: uris. 117 // Special inner tag handler for dart: uris.
115 static Dart_Handle DartColonLibraryTagHandler(Dart_LibraryTag tag, 118 static Dart_Handle DartColonLibraryTagHandler(Dart_LibraryTag tag,
116 Dart_Handle library, 119 Dart_Handle library,
117 Dart_Handle url, 120 Dart_Handle url,
118 const char* library_url_string, 121 const char* library_url_string,
119 const char* url_string); 122 const char* url_string);
(...skipping 22 matching lines...) Expand all
142 145
143 // This is the global callback for the native message handlers. 146 // This is the global callback for the native message handlers.
144 static void NativeMessageHandler(Dart_Port dest_port_id, 147 static void NativeMessageHandler(Dart_Port dest_port_id,
145 Dart_CObject* message); 148 Dart_CObject* message);
146 }; 149 };
147 150
148 } // namespace bin 151 } // namespace bin
149 } // namespace dart 152 } // namespace dart
150 153
151 #endif // RUNTIME_BIN_LOADER_H_ 154 #endif // RUNTIME_BIN_LOADER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698