Index: runtime/bin/isolate_data.h |
diff --git a/runtime/bin/isolate_data.h b/runtime/bin/isolate_data.h |
index 179bde5d1ae36bf01d4656ecaefabf29e8cfc306..49a993fc53e3f8c197ed132d11f59b5c59ee3dc0 100644 |
--- a/runtime/bin/isolate_data.h |
+++ b/runtime/bin/isolate_data.h |
@@ -6,6 +6,7 @@ |
#define BIN_ISOLATE_DATA_H_ |
#include "include/dart_api.h" |
+#include "platform/assert.h" |
#include "platform/globals.h" |
@@ -20,23 +21,31 @@ class EventHandler; |
// when the isolate shuts down. |
class IsolateData { |
public: |
- explicit IsolateData(const char* url, const char* package_root) |
+ explicit IsolateData(const char* url, |
+ const char* package_root, |
+ const char* packages_file) |
: script_url(strdup(url)), |
package_root(NULL), |
+ packages_file(NULL), |
udp_receive_buffer(NULL), |
load_async_id(-1) { |
if (package_root != NULL) { |
+ ASSERT(packages_file == NULL); |
this->package_root = strdup(package_root); |
+ } else if (packages_file != NULL) { |
+ this->packages_file = strdup(packages_file); |
} |
} |
~IsolateData() { |
free(script_url); |
free(package_root); |
+ free(packages_file); |
free(udp_receive_buffer); |
} |
char* script_url; |
char* package_root; |
+ char* packages_file; |
uint8_t* udp_receive_buffer; |
int64_t load_async_id; |