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

Unified Diff: runtime/bin/vmstats_impl.cc

Issue 12328124: Removed remaining reference to FDUtils. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 10 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: runtime/bin/vmstats_impl.cc
===================================================================
--- runtime/bin/vmstats_impl.cc (revision 19098)
+++ runtime/bin/vmstats_impl.cc (working copy)
@@ -6,7 +6,6 @@
#include <sstream>
-#include "bin/fdutils.h"
#include "bin/file.h"
#include "bin/log.h"
#include "bin/platform.h"
@@ -149,19 +148,21 @@
// Stop() closed the socket.
return;
}
- FDUtils::SetBlocking(socket);
// TODO(tball): rewrite this to use STL, so as to eliminate the static
// buffer and support resource URLs that are longer than BUFSIZE.
// Read request.
- // TODO(tball): support partial reads, possibly needed for POST uploads.
char buffer[BUFSIZE + 1];
intptr_t len = Socket::Read(socket, buffer, BUFSIZE);
if (len <= 0) {
// Invalid HTTP request, ignore.
continue;
}
+ intptr_t n;
+ while ((n = Socket::Read(socket, buffer + len, BUFSIZE - len)) > 0) {
+ len += n;
+ }
buffer[len] = '\0';
// Verify it's a GET request.
« 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