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

Side by Side Diff: dart/runtime/bin/main.cc

Issue 913753002: Reland "Introduce optional 'bool shared' parameter to ServerSocket.bind() ..." (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 5 years, 10 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include <stdlib.h> 5 #include <stdlib.h>
6 #include <string.h> 6 #include <string.h>
7 #include <stdio.h> 7 #include <stdio.h>
8 8
9 #include "include/dart_api.h" 9 #include "include/dart_api.h"
10 #include "include/dart_debugger_api.h" 10 #include "include/dart_debugger_api.h"
11 11
12 #include "bin/builtin.h" 12 #include "bin/builtin.h"
13 #include "bin/dartutils.h" 13 #include "bin/dartutils.h"
14 #include "bin/dbg_connection.h" 14 #include "bin/dbg_connection.h"
15 #include "bin/directory.h" 15 #include "bin/directory.h"
16 #include "bin/socket.h"
16 #include "bin/eventhandler.h" 17 #include "bin/eventhandler.h"
17 #include "bin/extensions.h" 18 #include "bin/extensions.h"
18 #include "bin/file.h" 19 #include "bin/file.h"
19 #include "bin/isolate_data.h" 20 #include "bin/isolate_data.h"
20 #include "bin/log.h" 21 #include "bin/log.h"
21 #include "bin/platform.h" 22 #include "bin/platform.h"
22 #include "bin/process.h" 23 #include "bin/process.h"
23 #include "bin/thread.h" 24 #include "bin/thread.h"
24 #include "bin/vmservice_impl.h" 25 #include "bin/vmservice_impl.h"
25 #include "platform/globals.h" 26 #include "platform/globals.h"
(...skipping 914 matching lines...) Expand 10 before | Expand all | Expand 10 after
940 fprintf(stderr, "Error determining current directory: %s\n", err.message()); 941 fprintf(stderr, "Error determining current directory: %s\n", err.message());
941 fflush(stderr); 942 fflush(stderr);
942 exit(kErrorExitCode); 943 exit(kErrorExitCode);
943 } 944 }
944 945
945 Dart_SetVMFlags(vm_options.count(), vm_options.arguments()); 946 Dart_SetVMFlags(vm_options.count(), vm_options.arguments());
946 947
947 // Start event handler. 948 // Start event handler.
948 EventHandler::Start(); 949 EventHandler::Start();
949 950
951 // Initialize global socket registry.
952 ListeningSocketRegistry::Initialize();
Søren Gjesse 2015/02/11 08:51:05 Can't this go inside EventHandler::Start()?
kustermann 2015/02/11 09:56:08 Done.
953
950 // Initialize the Dart VM. 954 // Initialize the Dart VM.
951 if (!Dart_Initialize(CreateIsolateAndSetup, NULL, NULL, ShutdownIsolate, 955 if (!Dart_Initialize(CreateIsolateAndSetup, NULL, NULL, ShutdownIsolate,
952 DartUtils::OpenFile, 956 DartUtils::OpenFile,
953 DartUtils::ReadFile, 957 DartUtils::ReadFile,
954 DartUtils::WriteFile, 958 DartUtils::WriteFile,
955 DartUtils::CloseFile, 959 DartUtils::CloseFile,
956 DartUtils::EntropySource)) { 960 DartUtils::EntropySource)) {
957 fprintf(stderr, "%s", "VM initialization failed\n"); 961 fprintf(stderr, "%s", "VM initialization failed\n");
958 fflush(stderr); 962 fflush(stderr);
959 exit(kErrorExitCode); 963 exit(kErrorExitCode);
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
1114 exit(Process::GlobalExitCode()); 1118 exit(Process::GlobalExitCode());
1115 } 1119 }
1116 1120
1117 } // namespace bin 1121 } // namespace bin
1118 } // namespace dart 1122 } // namespace dart
1119 1123
1120 int main(int argc, char** argv) { 1124 int main(int argc, char** argv) {
1121 dart::bin::main(argc, argv); 1125 dart::bin::main(argc, argv);
1122 UNREACHABLE(); 1126 UNREACHABLE();
1123 } 1127 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698