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

Side by Side Diff: runtime/bin/isolate_data.cc

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
« no previous file with comments | « runtime/bin/isolate_data.h ('k') | runtime/bin/loader.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2017, 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 #include "bin/isolate_data.h" 5 #include "bin/isolate_data.h"
6 #include "bin/snapshot_utils.h" 6 #include "bin/snapshot_utils.h"
7 7
8 namespace dart { 8 namespace dart {
9 namespace bin { 9 namespace bin {
10 10
11 IsolateData::IsolateData(const char* url, 11 IsolateData::IsolateData(const char* url,
12 const char* package_root, 12 const char* package_root,
13 const char* packages_file, 13 const char* packages_file,
14 AppSnapshot* app_snapshot) 14 AppSnapshot* app_snapshot)
15 : script_url((url != NULL) ? strdup(url) : NULL), 15 : script_url((url != NULL) ? strdup(url) : NULL),
16 package_root(NULL), 16 package_root(NULL),
17 packages_file(NULL), 17 packages_file(NULL),
18 udp_receive_buffer(NULL), 18 udp_receive_buffer(NULL),
19 builtin_lib_(NULL), 19 builtin_lib_(NULL),
20 loader_(NULL), 20 loader_(NULL),
21 app_snapshot_(app_snapshot) { 21 app_snapshot_(app_snapshot),
22 dependencies_(NULL) {
22 if (package_root != NULL) { 23 if (package_root != NULL) {
23 ASSERT(packages_file == NULL); 24 ASSERT(packages_file == NULL);
24 this->package_root = strdup(package_root); 25 this->package_root = strdup(package_root);
25 } else if (packages_file != NULL) { 26 } else if (packages_file != NULL) {
26 this->packages_file = strdup(packages_file); 27 this->packages_file = strdup(packages_file);
27 } 28 }
28 } 29 }
29 30
30 31
31 IsolateData::~IsolateData() { 32 IsolateData::~IsolateData() {
32 free(script_url); 33 free(script_url);
33 script_url = NULL; 34 script_url = NULL;
34 free(package_root); 35 free(package_root);
35 package_root = NULL; 36 package_root = NULL;
36 free(packages_file); 37 free(packages_file);
37 packages_file = NULL; 38 packages_file = NULL;
38 free(udp_receive_buffer); 39 free(udp_receive_buffer);
39 udp_receive_buffer = NULL; 40 udp_receive_buffer = NULL;
40 if (builtin_lib_ != NULL) { 41 if (builtin_lib_ != NULL) {
41 Dart_DeletePersistentHandle(builtin_lib_); 42 Dart_DeletePersistentHandle(builtin_lib_);
42 } 43 }
43 delete app_snapshot_; 44 delete app_snapshot_;
44 app_snapshot_ = NULL; 45 app_snapshot_ = NULL;
45 } 46 }
46 47
47 } // namespace bin 48 } // namespace bin
48 } // namespace dart 49 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/bin/isolate_data.h ('k') | runtime/bin/loader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698