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

Unified Diff: pkg/analyzer_plugin/lib/src/channel/isolate_channel.dart

Issue 2986123002: Prevent exception with isolate failed to start (Closed)
Patch Set: Created 3 years, 5 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer_plugin/lib/src/channel/isolate_channel.dart
diff --git a/pkg/analyzer_plugin/lib/src/channel/isolate_channel.dart b/pkg/analyzer_plugin/lib/src/channel/isolate_channel.dart
index 3b90b51e4c9425947016d09baabae300dde31d56..c0f65fb5487faf2bb4e0c984bea78e11dd6d08e6 100644
--- a/pkg/analyzer_plugin/lib/src/channel/isolate_channel.dart
+++ b/pkg/analyzer_plugin/lib/src/channel/isolate_channel.dart
@@ -280,10 +280,12 @@ abstract class ServerIsolateChannel implements ServerCommunicationChannel {
@override
void sendRequest(Request request) {
- Map<String, Object> json = request.toJson();
- String encodedRequest = JSON.encode(json);
- instrumentationService.logPluginRequest(pluginId, encodedRequest);
- _sendPort.send(json);
+ if (_sendPort != null) {
+ Map<String, Object> json = request.toJson();
+ String encodedRequest = JSON.encode(json);
+ instrumentationService.logPluginRequest(pluginId, encodedRequest);
+ _sendPort.send(json);
+ }
}
/**
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698