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

Unified Diff: runtime/bin/main.cc

Issue 533073005: Reduce service isolate startup time from ~80ms to ~30ms (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 3 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 | « no previous file | runtime/bin/process_patch.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/main.cc
diff --git a/runtime/bin/main.cc b/runtime/bin/main.cc
index 4f5e752da3edb87cb4fb4bde388ad39978d0dd8a..b96d513fe01dfeae2cd3c684100e46842438f248 100644
--- a/runtime/bin/main.cc
+++ b/runtime/bin/main.cc
@@ -73,7 +73,7 @@ static bool start_vm_service = false;
static const char* vm_service_server_ip = DEFAULT_VM_SERVICE_SERVER_IP;
// The 0 port is a magic value which results in the first available port
// being allocated.
-static int vm_service_server_port = 0;
+static int vm_service_server_port = -1;
// The environment provided through the command line using -D options.
static dart::HashMap* environment = NULL;
@@ -690,21 +690,7 @@ static Dart_Isolate CreateServiceIsolate(void* data, char** error) {
// closures and setting up 'package root' for URI resolution.
result = DartUtils::PrepareForScriptLoading(package_root, builtin_lib);
CHECK_RESULT(result);
- Platform::SetPackageRoot(package_root);
- Dart_Handle io_lib_url = DartUtils::NewString(DartUtils::kIOLibURL);
- CHECK_RESULT(io_lib_url);
- Dart_Handle io_lib = Dart_LookupLibrary(io_lib_url);
- CHECK_RESULT(io_lib);
- Dart_Handle platform_type = DartUtils::GetDartType(DartUtils::kIOLibURL,
- "_Platform");
- CHECK_RESULT(platform_type);
- Dart_Handle script_name = DartUtils::NewString("_nativeScript");
- CHECK_RESULT(script_name);
- Dart_Handle dart_script = DartUtils::NewString(script_uri);
- CHECK_RESULT(dart_script);
- Dart_Handle set_script_name =
- Dart_SetField(platform_type, script_name, dart_script);
- CHECK_RESULT(set_script_name);
+
Dart_ExitScope();
Dart_ExitIsolate();
return isolate;
« no previous file with comments | « no previous file | runtime/bin/process_patch.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698