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

Unified Diff: runtime/vm/dart_api_impl.cc

Issue 889443002: Service isolate rework take 2 (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
« no previous file with comments | « runtime/vm/dart.cc ('k') | runtime/vm/dart_api_impl_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
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();
}
« no previous file with comments | « runtime/vm/dart.cc ('k') | runtime/vm/dart_api_impl_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698