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

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

Issue 2974233002: VM: Re-format to use at most one newline between functions (Closed)
Patch Set: Rebase and merge Created 3 years, 5 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/io_service_no_ssl.cc ('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 #include "vm/kernel.h" 8 #include "vm/kernel.h"
9 9
10 namespace dart { 10 namespace dart {
(...skipping 13 matching lines...) Expand all
24 app_snapshot_(app_snapshot), 24 app_snapshot_(app_snapshot),
25 dependencies_(NULL) { 25 dependencies_(NULL) {
26 if (package_root != NULL) { 26 if (package_root != NULL) {
27 ASSERT(packages_file == NULL); 27 ASSERT(packages_file == NULL);
28 this->package_root = strdup(package_root); 28 this->package_root = strdup(package_root);
29 } else if (packages_file != NULL) { 29 } else if (packages_file != NULL) {
30 this->packages_file = strdup(packages_file); 30 this->packages_file = strdup(packages_file);
31 } 31 }
32 } 32 }
33 33
34
35 void IsolateData::OnIsolateShutdown() { 34 void IsolateData::OnIsolateShutdown() {
36 if (builtin_lib_ != NULL) { 35 if (builtin_lib_ != NULL) {
37 Dart_DeletePersistentHandle(builtin_lib_); 36 Dart_DeletePersistentHandle(builtin_lib_);
38 builtin_lib_ = NULL; 37 builtin_lib_ = NULL;
39 } 38 }
40 } 39 }
41 40
42
43 IsolateData::~IsolateData() { 41 IsolateData::~IsolateData() {
44 free(script_url); 42 free(script_url);
45 script_url = NULL; 43 script_url = NULL;
46 free(package_root); 44 free(package_root);
47 package_root = NULL; 45 package_root = NULL;
48 free(packages_file); 46 free(packages_file);
49 packages_file = NULL; 47 packages_file = NULL;
50 free(udp_receive_buffer); 48 free(udp_receive_buffer);
51 udp_receive_buffer = NULL; 49 udp_receive_buffer = NULL;
52 if (kernel_program != NULL) { 50 if (kernel_program != NULL) {
53 delete reinterpret_cast<kernel::Program*>(kernel_program); 51 delete reinterpret_cast<kernel::Program*>(kernel_program);
54 kernel_program = NULL; 52 kernel_program = NULL;
55 } 53 }
56 delete app_snapshot_; 54 delete app_snapshot_;
57 app_snapshot_ = NULL; 55 app_snapshot_ = NULL;
58 } 56 }
59 57
60 } // namespace bin 58 } // namespace bin
61 } // namespace dart 59 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/bin/io_service_no_ssl.cc ('k') | runtime/bin/loader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698