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

Unified Diff: runtime/vm/isolate.cc

Issue 584023004: Service isolate rework (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 11 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 ee450b62fa222ad78a3c723b30a319c0b5584a51..f226f288308bf36d1bbad2a44dff209748e54bb7 100644
--- a/runtime/vm/isolate.cc
+++ b/runtime/vm/isolate.cc
@@ -555,7 +555,7 @@ Isolate::Isolate(Isolate* original)
#undef REUSABLE_HANDLE_INITIALIZERS
Isolate::~Isolate() {
- delete [] name_;
+ free(name_);
delete heap_;
delete object_store_;
delete api_state_;
@@ -683,9 +683,13 @@ void Isolate::BuildName(const char* name_prefix) {
if (name_prefix == NULL) {
name_prefix = "isolate";
}
+ if (Service::IsServiceIsolateName(name_prefix)) {
+ name_ = strdup(name_prefix);
+ return;
+ }
const char* kFormat = "%s-%lld";
intptr_t len = OS::SNPrint(NULL, 0, kFormat, name_prefix, main_port()) + 1;
- name_ = new char[len];
+ name_ = reinterpret_cast<char*>(malloc(len));
OS::SNPrint(name_, len, kFormat, name_prefix, main_port());
}
@@ -1146,7 +1150,6 @@ Dart_FileWriteCallback Isolate::file_write_callback_ = NULL;
Dart_FileCloseCallback Isolate::file_close_callback_ = NULL;
Dart_EntropySource Isolate::entropy_source_callback_ = NULL;
Dart_IsolateInterruptCallback Isolate::vmstats_callback_ = NULL;
-Dart_ServiceIsolateCreateCalback Isolate::service_create_callback_ = NULL;
Monitor* Isolate::isolates_list_monitor_ = NULL;
Isolate* Isolate::isolates_list_head_ = NULL;

Powered by Google App Engine
This is Rietveld 408576698