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

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 a7e46617fd74b5ca6ad6b1573c7f1eba25af71e7..7374d1bdf612c20842317647ea4554cda256f932 100644
--- a/runtime/vm/isolate.cc
+++ b/runtime/vm/isolate.cc
@@ -554,7 +554,7 @@ Isolate::Isolate(Isolate* original)
#undef REUSABLE_HANDLE_INITIALIZERS
Isolate::~Isolate() {
- delete [] name_;
+ free(name_);
delete heap_;
delete object_store_;
delete api_state_;
@@ -682,9 +682,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;
« runtime/include/dart_api.h ('K') | « runtime/vm/isolate.h ('k') | runtime/vm/service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698