Chromium Code Reviews| Index: pkg/analyzer/lib/instrumentation/file_instrumentation.dart |
| diff --git a/pkg/analyzer/lib/instrumentation/file_instrumentation.dart b/pkg/analyzer/lib/instrumentation/file_instrumentation.dart |
| index d4088f87fd145cb493c5b0103c0462f3c53fdc1e..32133f6505c5cff5eae17db339d76f9b31b65cbf 100644 |
| --- a/pkg/analyzer/lib/instrumentation/file_instrumentation.dart |
| +++ b/pkg/analyzer/lib/instrumentation/file_instrumentation.dart |
| @@ -13,10 +13,11 @@ import 'package:analyzer/instrumentation/instrumentation.dart'; |
| * An [InstrumentationServer] that writes to a file. |
| */ |
| class FileInstrumentationServer implements InstrumentationServer { |
| + final String filePath; |
| IOSink _sink; |
| - FileInstrumentationServer(String path) { |
| - File file = new File(path); |
| + FileInstrumentationServer(this.filePath) { |
| + File file = new File(filePath); |
| _sink = file.openWrite(); |
| } |
| @@ -24,6 +25,9 @@ class FileInstrumentationServer implements InstrumentationServer { |
| String get sessionId => ''; |
| @override |
| + String get describe => "file: $filePath"; |
|
skybrian
2017/03/01 02:06:01
HTML-escape the path (just in case).
Brian Wilkerson
2017/03/01 15:05:02
Safer to escape the result of describe in the GetH
|
| + |
| + @override |
| void log(String message) { |
| _sink.writeln(message); |
| } |