Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 1 addition & 6 deletions webdev/lib/src/serve/chrome.dart
Original file line number Diff line number Diff line change
Expand Up @@ -33,24 +33,20 @@ var _currentCompleter = Completer<Chrome>();
class Chrome {
final int debugPort;
final Process _process;
final Directory _dataDir;

final ChromeConnection chromeConnection;

Chrome._(
this.debugPort,
this.chromeConnection, {
Process process,
Directory dataDir,
}) : _process = process,
_dataDir = dataDir;
}) : _process = process;

Future<void> close() async {
if (_currentCompleter.isCompleted) _currentCompleter = Completer<Chrome>();
chromeConnection.close();
_process?.kill();
await _process?.exitCode;
await _dataDir?.delete(recursive: true);
}

/// Connects to an instance of Chrome with an open debug port.
Expand Down Expand Up @@ -97,7 +93,6 @@ class Chrome {
port,
ChromeConnection('localhost', port),
process: process,
dataDir: dataDir,
));
}

Expand Down