Index: runtime/vm/isolate.cc |
diff --git a/runtime/vm/isolate.cc b/runtime/vm/isolate.cc |
index b5a139be71e7a012a677d2f00039b1d4fe91fbe6..ca81a6303f4354ce19565fb4c5d5a41c7dabbbaa 100644 |
--- a/runtime/vm/isolate.cc |
+++ b/runtime/vm/isolate.cc |
@@ -2776,7 +2776,7 @@ IsolateSpawnState::IsolateSpawnState(Dart_Port parent_port, |
void* init_data, |
const char* script_url, |
const Function& func, |
- SerializedObjectBuffer* message_buffer, |
+ const Instance& message, |
Monitor* spawn_count_monitor, |
intptr_t* spawn_count, |
const char* package_root, |
@@ -2818,8 +2818,9 @@ IsolateSpawnState::IsolateSpawnState(Dart_Port parent_port, |
const String& class_name = String::Handle(cls.Name()); |
class_name_ = NewConstChar(class_name.ToCString()); |
} |
- message_buffer->StealBuffer(&serialized_message_, &serialized_message_len_); |
- |
+ bool can_send_any_object = true; |
+ SerializeObject(message, &serialized_message_, &serialized_message_len_, |
+ can_send_any_object); |
// Inherit flags from spawning isolate. |
Isolate::Current()->FlagsCopyTo(isolate_flags()); |
} |
@@ -2830,8 +2831,8 @@ IsolateSpawnState::IsolateSpawnState(Dart_Port parent_port, |
const char* script_url, |
const char* package_root, |
const char* package_config, |
- SerializedObjectBuffer* args_buffer, |
- SerializedObjectBuffer* message_buffer, |
+ const Instance& args, |
+ const Instance& message, |
Monitor* spawn_count_monitor, |
intptr_t* spawn_count, |
bool paused, |
@@ -2860,9 +2861,11 @@ IsolateSpawnState::IsolateSpawnState(Dart_Port parent_port, |
paused_(paused), |
errors_are_fatal_(errors_are_fatal) { |
function_name_ = NewConstChar("main"); |
- args_buffer->StealBuffer(&serialized_args_, &serialized_args_len_); |
- message_buffer->StealBuffer(&serialized_message_, &serialized_message_len_); |
- |
+ bool can_send_any_object = false; |
+ SerializeObject(args, &serialized_args_, &serialized_args_len_, |
+ can_send_any_object); |
+ SerializeObject(message, &serialized_message_, &serialized_message_len_, |
+ can_send_any_object); |
// By default inherit flags from spawning isolate. These can be overridden |
// from the calling code. |
Isolate::Current()->FlagsCopyTo(isolate_flags()); |