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

Unified Diff: runtime/bin/isolate_data.h

Issue 1998963003: Rework standalone to use a synchronous loader that does not invoke Dart code (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/bin/dartutils.cc ('k') | runtime/bin/loader.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/isolate_data.h
diff --git a/runtime/bin/isolate_data.h b/runtime/bin/isolate_data.h
index 6532fbc2fc82da4abf84941c9f3210f799e5bb83..a5e8bfb0e920a21d039813e8cc89c16caef8e03b 100644
--- a/runtime/bin/isolate_data.h
+++ b/runtime/bin/isolate_data.h
@@ -14,6 +14,7 @@ namespace bin {
// Forward declaration.
class EventHandler;
+class Loader;
// Data associated with every isolate in the standalone VM
// embedding. This is used to free external resources for each isolate
@@ -27,7 +28,8 @@ class IsolateData {
package_root(NULL),
packages_file(NULL),
udp_receive_buffer(NULL),
- builtin_lib_(NULL) {
+ builtin_lib_(NULL),
+ loader_(NULL) {
if (package_root != NULL) {
ASSERT(packages_file == NULL);
this->package_root = strdup(package_root);
@@ -67,8 +69,20 @@ class IsolateData {
char* packages_file;
uint8_t* udp_receive_buffer;
+ // While loading a loader is associated with the isolate.
+ bool HasLoader() const { return loader_ != NULL; }
+ Loader* loader() const {
+ ASSERT(loader_ != NULL);
+ return loader_;
+ }
+ void set_loader(Loader* loader) {
+ ASSERT((loader_ == NULL) || (loader == NULL));
+ loader_ = loader;
+ }
+
private:
Dart_Handle builtin_lib_;
+ Loader* loader_;
DISALLOW_COPY_AND_ASSIGN(IsolateData);
};
« no previous file with comments | « runtime/bin/dartutils.cc ('k') | runtime/bin/loader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698