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

Unified Diff: runtime/bin/vmservice/vmservice_io.dart

Issue 867113003: Revert r43217, r43215, r43208, r43207, and r43202. (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/bin/vmservice/server.dart ('k') | runtime/bin/vmservice_dartium.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/vmservice/vmservice_io.dart
diff --git a/runtime/bin/vmservice/vmservice_io.dart b/runtime/bin/vmservice/vmservice_io.dart
index 2d99e17eb85787fab4fe322e4732688083870545..c04d485dbf27a20b724cdf7187ad3f6d4f45f5f9 100644
--- a/runtime/bin/vmservice/vmservice_io.dart
+++ b/runtime/bin/vmservice/vmservice_io.dart
@@ -10,7 +10,6 @@ import 'dart:io';
import 'dart:isolate';
import 'dart:vmservice';
-part 'loader.dart';
part 'resources.dart';
part 'server.dart';
@@ -22,8 +21,6 @@ bool _autoStart;
bool _isWindows = false;
-var _signalWatch;
-
// HTTP servr.
Server server;
Future<Server> serverFuture;
@@ -57,27 +54,18 @@ void _onSignal(ProcessSignal signal) {
}
}
-void _registerSignalHandler() {
+void _registerSignalHandler(Stream signalWatch(ProcessSignal signal)) {
if (_isWindows) {
// Cannot register for signals on Windows.
return;
}
- _signalWatch(ProcessSignal.SIGQUIT).listen(_onSignal);
+ signalWatch(ProcessSignal.SIGQUIT).listen(_onSignal);
}
-const _shortDelay = const Duration(milliseconds: 10);
-
-main() {
+main(Stream signalWatch(ProcessSignal signal)) {
if (_autoStart) {
_bootServer();
server.startup();
- // It's just here to push an event on the event loop so that we invoke the
- // scheduled microtasks.
- Timer.run(() {});
}
- scriptLoadPort.handler = _processLoadRequest;
- // Register signal handler after a small delay to avoid stalling main
- // isolate startup.
- new Timer(_shortDelay, _registerSignalHandler);
- return scriptLoadPort;
+ _registerSignalHandler(signalWatch);
}
« no previous file with comments | « runtime/bin/vmservice/server.dart ('k') | runtime/bin/vmservice_dartium.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698