OLD | NEW |
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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_ISOLATE_DATA_H_ | 5 #ifndef RUNTIME_BIN_ISOLATE_DATA_H_ |
6 #define RUNTIME_BIN_ISOLATE_DATA_H_ | 6 #define RUNTIME_BIN_ISOLATE_DATA_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 "platform/globals.h" | 10 #include "platform/globals.h" |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
46 ASSERT(lib != NULL); | 46 ASSERT(lib != NULL); |
47 ASSERT(!Dart_IsError(lib)); | 47 ASSERT(!Dart_IsError(lib)); |
48 builtin_lib_ = Dart_NewPersistentHandle(lib); | 48 builtin_lib_ = Dart_NewPersistentHandle(lib); |
49 } | 49 } |
50 | 50 |
51 char* script_url; | 51 char* script_url; |
52 char* package_root; | 52 char* package_root; |
53 char* packages_file; | 53 char* packages_file; |
54 uint8_t* udp_receive_buffer; | 54 uint8_t* udp_receive_buffer; |
55 | 55 |
56 void UpdatePackagesFile(const char* packages_file_) { | |
57 if (packages_file != NULL) { | |
58 free(packages_file); | |
59 packages_file = NULL; | |
60 } | |
61 packages_file = strdup(packages_file_); | |
62 } | |
63 | |
64 // While loading a loader is associated with the isolate. | 56 // While loading a loader is associated with the isolate. |
65 bool HasLoader() const { return loader_ != NULL; } | 57 bool HasLoader() const { return loader_ != NULL; } |
66 Loader* loader() const { | 58 Loader* loader() const { |
67 ASSERT(loader_ != NULL); | 59 ASSERT(loader_ != NULL); |
68 return loader_; | 60 return loader_; |
69 } | 61 } |
70 void set_loader(Loader* loader) { | 62 void set_loader(Loader* loader) { |
71 ASSERT((loader_ == NULL) || (loader == NULL)); | 63 ASSERT((loader_ == NULL) || (loader == NULL)); |
72 loader_ = loader; | 64 loader_ = loader; |
73 } | 65 } |
(...skipping 10 matching lines...) Expand all Loading... |
84 AppSnapshot* app_snapshot_; | 76 AppSnapshot* app_snapshot_; |
85 MallocGrowableArray<char*>* dependencies_; | 77 MallocGrowableArray<char*>* dependencies_; |
86 | 78 |
87 DISALLOW_COPY_AND_ASSIGN(IsolateData); | 79 DISALLOW_COPY_AND_ASSIGN(IsolateData); |
88 }; | 80 }; |
89 | 81 |
90 } // namespace bin | 82 } // namespace bin |
91 } // namespace dart | 83 } // namespace dart |
92 | 84 |
93 #endif // RUNTIME_BIN_ISOLATE_DATA_H_ | 85 #endif // RUNTIME_BIN_ISOLATE_DATA_H_ |
OLD | NEW |