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

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: portmap changes, fixed hang 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
Index: runtime/vm/isolate.h
diff --git a/runtime/vm/isolate.h b/runtime/vm/isolate.h
index b94d127c23fcce5ea39d0329831f305ab2dde2ae..1f5ab5bf5b9e46261a414e09691c96441c5286a8 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);
+ explicit IsolateSpawnState(Dart_Port parent_port,
Ivan Posva 2014/08/19 23:21:31 No need for explicit any longer.
turnidge 2014/08/20 19:56:26 Done.
+ const Function& func,
+ const Instance& message);
+ explicit IsolateSpawnState(Dart_Port parent_port,
Ivan Posva 2014/08/19 23:21:31 ditto.
turnidge 2014/08/20 19:56:26 Done.
+ 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

Powered by Google App Engine
This is Rietveld 408576698