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

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

Issue 1285673003: When no service response is requested, send null back to the service isolate so it can cleanup (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 4 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 | runtime/vm/json_stream.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/vmservice/server.dart
diff --git a/runtime/bin/vmservice/server.dart b/runtime/bin/vmservice/server.dart
index 1f807e7ad7a23c295c191bbe3ef7155f6e2ba347..a672bf23ce7aaa3787b77ae84e5455ed0e45b719 100644
--- a/runtime/bin/vmservice/server.dart
+++ b/runtime/bin/vmservice/server.dart
@@ -40,6 +40,10 @@ class WebSocketClient extends Client {
}
void post(dynamic result) {
+ if (result == null) {
+ // Do nothing.
+ return;
+ }
try {
socket.add(result);
} catch (_) {
@@ -65,6 +69,10 @@ class HttpRequestClient extends Client {
: super(service, sendEvents:false);
void post(String result) {
+ if (result == null) {
+ close();
+ return;
+ }
request.response..headers.contentType = jsonContentType
..write(result)
..close();
« no previous file with comments | « no previous file | runtime/vm/json_stream.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698