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

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

Issue 2793603002: Nicer message when attempting to use Observatory from dart_bootstrap, dart_precompiled_runtime or a… (Closed)
Patch Set: Created 3 years, 9 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/lib/vmservice_patch.dart » ('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 fb272607f56cdd08ebc904fa0e908ddb90f7b3a4..a0446ad222a02f5e3ac7489f510a44acbff88931 100644
--- a/runtime/bin/vmservice/server.dart
+++ b/runtime/bin/vmservice/server.dart
@@ -296,6 +296,12 @@ class Server {
return;
}
+ if (assets == null) {
+ request.response.headers.contentType = ContentType.TEXT;
+ request.response.write("This VM was built without the Observatory UI.");
+ request.response.close();
+ return;
+ }
Asset asset = assets[path];
if (asset != null) {
// Serving up a static asset (e.g. .css, .html, .png).
« no previous file with comments | « no previous file | runtime/lib/vmservice_patch.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698