Chromium Code Reviews| Index: runtime/vm/dart_api_impl.cc |
| diff --git a/runtime/vm/dart_api_impl.cc b/runtime/vm/dart_api_impl.cc |
| index 3bf04578c6a14152fa87ffab5c9693e977adb4f1..0ba4e7f52dbce45de59b2106ffd3c4966834e046 100644 |
| --- a/runtime/vm/dart_api_impl.cc |
| +++ b/runtime/vm/dart_api_impl.cc |
| @@ -1204,12 +1204,10 @@ DART_EXPORT bool Dart_Initialize( |
| Dart_FileReadCallback file_read, |
| Dart_FileWriteCallback file_write, |
| Dart_FileCloseCallback file_close, |
| - Dart_EntropySource entropy_source, |
| - Dart_ServiceIsolateCreateCalback service_create) { |
| + Dart_EntropySource entropy_source) { |
| const char* err_msg = Dart::InitOnce(create, interrupt, unhandled, shutdown, |
| file_open, file_read, file_write, |
| - file_close, entropy_source, |
| - service_create); |
| + file_close, entropy_source); |
| if (err_msg != NULL) { |
| OS::PrintErr("Dart_Initialize: %s\n", err_msg); |
| return false; |
| @@ -1252,6 +1250,10 @@ static char* BuildIsolateName(const char* script_uri, |
| } |
| } |
| + if (Service::IsServiceIsolateName(script_uri)) { |
| + return strdup(script_uri); |
| + } |
| + |
| // Skip past any slashes and backslashes in the script uri. |
| const char* last_slash = strrchr(script_uri, '/'); |
| if (last_slash != NULL) { |
| @@ -1521,6 +1523,7 @@ DART_EXPORT Dart_Handle Dart_RunLoop() { |
| return error; |
| } |
| if (FLAG_print_class_table) { |
| + HANDLESCOPE(isolate); |
|
siva
2015/01/22 22:39:31
If you are worried about excessive handle creation
Cutch
2015/01/26 18:59:30
The issue is that there is no handle scope at all.
|
| isolate->class_table()->Print(); |
| } |
| return Api::Success(); |
| @@ -5406,13 +5409,14 @@ DART_EXPORT Dart_Handle Dart_SetPeer(Dart_Handle object, void* peer) { |
| // --- Service support --- |
| -DART_EXPORT Dart_Isolate Dart_GetServiceIsolate(void* callback_data) { |
| - return Api::CastIsolate(Service::GetServiceIsolate(callback_data)); |
| +DART_EXPORT bool Dart_IsServiceIsolate(Dart_Isolate isolate) { |
| + Isolate* iso = reinterpret_cast<Isolate*>(isolate); |
| + return Service::IsServiceIsolate(iso); |
| } |
| -DART_EXPORT bool Dart_IsServiceRunning() { |
| - return Service::IsRunning(); |
| +DART_EXPORT Dart_Port Dart_ServiceWaitForLoadPort() { |
| + return Service::WaitForLoadPort(); |
| } |