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

Unified Diff: dart/runtime/bin/vmservice_impl.cc

Issue 239303004: Extract common code, add host IP to --debug and --enable-vm-service options (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: rebased Created 6 years, 8 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 | « dart/runtime/bin/vmservice_impl.h ('k') | dart/tests/standalone/vmservice/test_helper.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dart/runtime/bin/vmservice_impl.cc
diff --git a/dart/runtime/bin/vmservice_impl.cc b/dart/runtime/bin/vmservice_impl.cc
index b3b6e36169f387b26a1f48a664f5d3deafc80de2..148e8c7ea989cca692f1fbe6e068517b057148c6 100644
--- a/dart/runtime/bin/vmservice_impl.cc
+++ b/dart/runtime/bin/vmservice_impl.cc
@@ -88,8 +88,8 @@ class Resources {
const char* VmService::error_msg_ = NULL;
-bool VmService::Start(intptr_t server_port) {
- bool r = _Start(server_port);
+bool VmService::Start(const char *server_ip, intptr_t server_port) {
+ bool r = _Start(server_ip, server_port);
if (!r) {
return r;
}
@@ -99,7 +99,7 @@ bool VmService::Start(intptr_t server_port) {
}
-bool VmService::_Start(intptr_t server_port) {
+bool VmService::_Start(const char *server_ip, intptr_t server_port) {
ASSERT(Dart_CurrentIsolate() == NULL);
Dart_Isolate isolate = Dart_GetServiceIsolate(NULL);
if (isolate == NULL) {
@@ -129,6 +129,7 @@ bool VmService::_Start(intptr_t server_port) {
Dart_EnterScope();
library = Dart_RootLibrary();
// Set requested TCP port.
+ DartUtils::SetStringField(library, "_ip", server_ip);
DartUtils::SetIntegerField(library, "_port", server_port);
result = Dart_Invoke(library, DartUtils::NewString("main"), 0, NULL);
SHUTDOWN_ON_ERROR(result);
« no previous file with comments | « dart/runtime/bin/vmservice_impl.h ('k') | dart/tests/standalone/vmservice/test_helper.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698