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

Unified Diff: runtime/vm/isolate.cc

Issue 545483002: Per isolate package root. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Clean up main.cc Created 6 years, 3 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
Index: runtime/vm/isolate.cc
diff --git a/runtime/vm/isolate.cc b/runtime/vm/isolate.cc
index 74d0394a57ab2dae0801233c96f34af7cf807a54..0fba4e464bd14df8b971bf250e714bb3a9ad4219 100644
--- a/runtime/vm/isolate.cc
+++ b/runtime/vm/isolate.cc
@@ -1431,6 +1431,7 @@ IsolateSpawnState::IsolateSpawnState(Dart_Port parent_port,
: isolate_(NULL),
parent_port_(parent_port),
script_url_(NULL),
+ package_root_(NULL),
library_url_(NULL),
class_name_(NULL),
function_name_(NULL),
@@ -1458,10 +1459,12 @@ IsolateSpawnState::IsolateSpawnState(Dart_Port parent_port,
IsolateSpawnState::IsolateSpawnState(Dart_Port parent_port,
const char* script_url,
+ const char* package_root,
const Instance& args,
const Instance& message)
: isolate_(NULL),
parent_port_(parent_port),
+ package_root_(NULL),
library_url_(NULL),
class_name_(NULL),
function_name_(NULL),
@@ -1471,6 +1474,9 @@ IsolateSpawnState::IsolateSpawnState(Dart_Port parent_port,
serialized_message_(NULL),
serialized_message_len_(0) {
script_url_ = strdup(script_url);
+ if (package_root != NULL) {
+ package_root_ = strdup(package_root);
+ }
library_url_ = NULL;
function_name_ = strdup("main");
exception_callback_name_ = strdup("_unhandledExceptionCallback");
@@ -1481,6 +1487,7 @@ IsolateSpawnState::IsolateSpawnState(Dart_Port parent_port,
IsolateSpawnState::~IsolateSpawnState() {
free(script_url_);
+ free(package_root_);
free(library_url_);
free(function_name_);
free(class_name_);

Powered by Google App Engine
This is Rietveld 408576698