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

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

Issue 106193003: Cleanup VM service (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years 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
Index: runtime/bin/vmservice/vmservice_dartium.dart
diff --git a/runtime/bin/vmservice/vmservice_dartium.dart b/runtime/bin/vmservice/vmservice_dartium.dart
index c1520ec674288aa9735a014729c965611cd7db13..249455dd9bb85e6996705e2f1488957a2d237e1f 100644
--- a/runtime/bin/vmservice/vmservice_dartium.dart
+++ b/runtime/bin/vmservice/vmservice_dartium.dart
@@ -13,25 +13,20 @@ RawReceivePort _receivePort;
RawReceivePort _requestPort;
// The native method that is called to post the response back to DevTools.
-void postResponse(String response, int cookie) native "PostResponse";
+void postResponse(String response, int cookie) native "VMService_PostResponse";
void handleRequest(service, String uri, cookie) {
var serviceRequest = new ServiceRequest();
var r = serviceRequest.parse(Uri.parse(uri));
- if (!r) {
- // Did not understand the request uri.
- serviceRequest.setErrorResponse('Invalid request uri: ${uri}');
- } else {
+ if (r) {
var f = service.runningIsolates.route(serviceRequest);
- if (f != null) {
- f.then((_) {
- postResponse(serviceRequest.response, cookie);
- }).catchError((e) { });
- return;
- } else {
- // Nothing responds to this type of request.
- serviceRequest.setErrorResponse('No route for: $uri');
- }
+ assert(f != null);
+ f.then((_) {
+ postResponse(serviceRequest.response, cookie);
+ }).catchError((e) {
+ // Error posting response back to Dartium.
+ });
+ return;
}
postResponse(serviceRequest.response, cookie);
}

Powered by Google App Engine
This is Rietveld 408576698