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

Unified Diff: runtime/vm/isolate.h

Issue 456983002: Refactor isolate startup code in preparation for making isolate spawning more truly non-blocking. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: code review Created 6 years, 4 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/vm/bootstrap_natives.h ('k') | runtime/vm/isolate.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/isolate.h
diff --git a/runtime/vm/isolate.h b/runtime/vm/isolate.h
index b94d127c23fcce5ea39d0329831f305ab2dde2ae..7c338937bf41dff988e96e4ef8396206d44efdbb 100644
--- a/runtime/vm/isolate.h
+++ b/runtime/vm/isolate.h
@@ -803,12 +803,19 @@ class SwitchIsolateScope {
class IsolateSpawnState {
public:
- explicit IsolateSpawnState(const Function& func);
- explicit IsolateSpawnState(const char* script_url);
+ IsolateSpawnState(Dart_Port parent_port,
+ const Function& func,
+ const Instance& message);
+ IsolateSpawnState(Dart_Port parent_port,
+ const char* script_url,
+ const Instance& args,
+ const Instance& message);
~IsolateSpawnState();
Isolate* isolate() const { return isolate_; }
void set_isolate(Isolate* value) { isolate_ = value; }
+
+ Dart_Port parent_port() const { return parent_port_; }
char* script_url() const { return script_url_; }
char* library_url() const { return library_url_; }
char* class_name() const { return class_name_; }
@@ -817,15 +824,22 @@ class IsolateSpawnState {
bool is_spawn_uri() const { return library_url_ == NULL; }
RawObject* ResolveFunction();
+ RawInstance* BuildArgs();
+ RawInstance* BuildMessage();
void Cleanup();
private:
Isolate* isolate_;
+ Dart_Port parent_port_;
char* script_url_;
char* library_url_;
char* class_name_;
char* function_name_;
char* exception_callback_name_;
+ uint8_t* serialized_args_;
+ intptr_t serialized_args_len_;
+ uint8_t* serialized_message_;
+ intptr_t serialized_message_len_;
};
} // namespace dart
« no previous file with comments | « runtime/vm/bootstrap_natives.h ('k') | runtime/vm/isolate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698