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

Unified Diff: samples/total/src/TotalServer.dart

Issue 8317006: Added builtin native call to exit the running vm (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Review comments Created 9 years, 2 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
« runtime/bin/builtin.dart ('K') | « samples/total/src/TotalRunner.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: samples/total/src/TotalServer.dart
diff --git a/samples/total/src/TotalServer.dart b/samples/total/src/TotalServer.dart
index 117ea9f34b030ee43523bd9c96609d704dfc2af5..b1ca2f1d5a7b5d7f25c851952a1d93fa1fb8c6b2 100644
--- a/samples/total/src/TotalServer.dart
+++ b/samples/total/src/TotalServer.dart
@@ -56,15 +56,15 @@ class TotalServer extends IsolatedServer {
void restartServer(HTTPRequest request, HTTPResponse response) {
writeData(request, response, 'Restarting, KBBS', 'text/plain');
stop();
- print("GRACEFUL RESTART!! TODO: make server exit gracefully");
- throw "GRACEFUL RESTART!! TODO: make server exit gracefully";
+ print("GRACEFUL RESTART!!");
+ exit(42);
}
void stopServer(HTTPRequest request, HTTPResponse response) {
writeData(request, response, 'Exiting, KTHXBYE', 'text/plain');
stop();
- print("GRACEFUL EXIT!! TODO: make server exit gracefully");
- throw "GRACEFUL EXIT!! TODO: make server exit gracefully";
+ print("GRACEFUL EXIT!!");
+ exit(0);
siva 2011/10/21 22:04:09 Will this test be run under dartium? if yes you ne
rchandia 2011/10/25 14:37:50 No, this is only server side. Client code should n
siva 2011/10/25 17:19:34 No, if this is server side only it is not an issue
}
void writeData(HTTPRequest request, HTTPResponse response, String message, String mimeType) {
« runtime/bin/builtin.dart ('K') | « samples/total/src/TotalRunner.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698