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

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

Issue 2927493002: Restructure code to enable reloading when a kernel dill file is specified on the command line inste… (Closed)
Patch Set: fix format error. Created 3 years, 6 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.cc » ('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 #include "vm/kernel.h"
9
8 namespace dart { 10 namespace dart {
9 namespace bin { 11 namespace bin {
10 12
11 IsolateData::IsolateData(const char* url, 13 IsolateData::IsolateData(const char* url,
12 const char* package_root, 14 const char* package_root,
13 const char* packages_file, 15 const char* packages_file,
14 AppSnapshot* app_snapshot) 16 AppSnapshot* app_snapshot)
15 : script_url((url != NULL) ? strdup(url) : NULL), 17 : script_url((url != NULL) ? strdup(url) : NULL),
16 package_root(NULL), 18 package_root(NULL),
17 packages_file(NULL), 19 packages_file(NULL),
18 udp_receive_buffer(NULL), 20 udp_receive_buffer(NULL),
21 kernel_program(NULL),
19 builtin_lib_(NULL), 22 builtin_lib_(NULL),
20 loader_(NULL), 23 loader_(NULL),
21 app_snapshot_(app_snapshot), 24 app_snapshot_(app_snapshot),
22 dependencies_(NULL) { 25 dependencies_(NULL) {
23 if (package_root != NULL) { 26 if (package_root != NULL) {
24 ASSERT(packages_file == NULL); 27 ASSERT(packages_file == NULL);
25 this->package_root = strdup(package_root); 28 this->package_root = strdup(package_root);
26 } else if (packages_file != NULL) { 29 } else if (packages_file != NULL) {
27 this->packages_file = strdup(packages_file); 30 this->packages_file = strdup(packages_file);
28 } 31 }
(...skipping 10 matching lines...) Expand all
39 42
40 IsolateData::~IsolateData() { 43 IsolateData::~IsolateData() {
41 free(script_url); 44 free(script_url);
42 script_url = NULL; 45 script_url = NULL;
43 free(package_root); 46 free(package_root);
44 package_root = NULL; 47 package_root = NULL;
45 free(packages_file); 48 free(packages_file);
46 packages_file = NULL; 49 packages_file = NULL;
47 free(udp_receive_buffer); 50 free(udp_receive_buffer);
48 udp_receive_buffer = NULL; 51 udp_receive_buffer = NULL;
52 if (kernel_program != NULL) {
53 delete reinterpret_cast<kernel::Program*>(kernel_program);
54 kernel_program = NULL;
55 }
49 delete app_snapshot_; 56 delete app_snapshot_;
50 app_snapshot_ = NULL; 57 app_snapshot_ = NULL;
51 } 58 }
52 59
53 } // namespace bin 60 } // namespace bin
54 } // namespace dart 61 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/bin/isolate_data.h ('k') | runtime/bin/loader.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698