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

Unified Diff: mojo/dart/embedder/vmservice/main.dart

Issue 1649823002: Roll Dart forward and use the shared vmservice isolate sources + benchmark fixes (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 4 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 | « mojo/dart/embedder/vmservice/loader.dart ('k') | mojo/dart/embedder/vmservice/server.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/dart/embedder/vmservice/main.dart
diff --git a/mojo/dart/embedder/vmservice/main.dart b/mojo/dart/embedder/vmservice/main.dart
deleted file mode 100644
index 608d34cfb52ad3df2b4c9e6ea12969c383272623..0000000000000000000000000000000000000000
--- a/mojo/dart/embedder/vmservice/main.dart
+++ /dev/null
@@ -1,68 +0,0 @@
-// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-library dart_controller_service_isolate;
-
-import 'dart:async';
-import 'dart:convert';
-import 'dart:io';
-import 'dart:isolate';
-import 'dart:_vmservice';
-
-part 'loader.dart';
-part 'server.dart';
-
-// The TCP ip/port that the HTTP server listens on.
-int _port;
-String _ip;
-// Should the HTTP server auto start?
-bool _autoStart;
-
-// HTTP server.
-Server server;
-Map<String, Asset> _assets;
-Map<String, Asset> get assets {
- if (_assets == null) {
- try {
- _assets = Asset.request();
- } catch (e) {
- print('Could not load Observatory assets: $e');
- }
- }
- return _assets;
-}
-
-_onShutdown() {
- if (server != null) {
- server.close(true).catchError((e, st) {
- print(e);
- }).whenComplete(_shutdown);
- } else {
- _shutdown();
- }
-}
-
-void _bootServer() {
- // Lazily create service.
- var service = new VMService();
- service.onShutdown = _onShutdown;
- // Lazily create server.
- server = new Server(service, _ip, _port);
-}
-
-main() {
- if (_autoStart) {
- _bootServer();
- if (server != null) {
- 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;
- return scriptLoadPort;
-}
-
-_shutdown() native "ServiceIsolate_Shutdown";
« no previous file with comments | « mojo/dart/embedder/vmservice/loader.dart ('k') | mojo/dart/embedder/vmservice/server.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698