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

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

Issue 2797923008: Fix updating packages map on reload and add a regression test (Closed)
Patch Set: Fix loader logic Created 3 years, 8 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 | « no previous file | 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) 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
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
56 // While loading a loader is associated with the isolate. 64 // While loading a loader is associated with the isolate.
57 bool HasLoader() const { return loader_ != NULL; } 65 bool HasLoader() const { return loader_ != NULL; }
58 Loader* loader() const { 66 Loader* loader() const {
59 ASSERT(loader_ != NULL); 67 ASSERT(loader_ != NULL);
60 return loader_; 68 return loader_;
61 } 69 }
62 void set_loader(Loader* loader) { 70 void set_loader(Loader* loader) {
63 ASSERT((loader_ == NULL) || (loader == NULL)); 71 ASSERT((loader_ == NULL) || (loader == NULL));
64 loader_ = loader; 72 loader_ = loader;
65 } 73 }
(...skipping 10 matching lines...) Expand all
76 AppSnapshot* app_snapshot_; 84 AppSnapshot* app_snapshot_;
77 MallocGrowableArray<char*>* dependencies_; 85 MallocGrowableArray<char*>* dependencies_;
78 86
79 DISALLOW_COPY_AND_ASSIGN(IsolateData); 87 DISALLOW_COPY_AND_ASSIGN(IsolateData);
80 }; 88 };
81 89
82 } // namespace bin 90 } // namespace bin
83 } // namespace dart 91 } // namespace dart
84 92
85 #endif // RUNTIME_BIN_ISOLATE_DATA_H_ 93 #endif // RUNTIME_BIN_ISOLATE_DATA_H_
OLDNEW
« no previous file with comments | « no previous file | runtime/bin/loader.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698