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

Unified Diff: runtime/bin/file_win.cc

Issue 8383037: Improve error handling in the process library. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: 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
« no previous file with comments | « runtime/bin/file_macos.cc ('k') | runtime/bin/gen_snapshot.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/file_win.cc
diff --git a/runtime/bin/file_win.cc b/runtime/bin/file_win.cc
index 3aa08f9d18fc200af0741f102817242f96e744e1..9682dab3e3a77a2c308d7fd770dc252ca87aff43 100644
--- a/runtime/bin/file_win.cc
+++ b/runtime/bin/file_win.cc
@@ -37,7 +37,7 @@ File::~File() {
void File::Close() {
- assert(handle_->fd() >= 0);
+ ASSERT(handle_->fd() >= 0);
int err = close(handle_->fd());
if (err != 0) {
fprintf(stderr, "%s\n", strerror(errno));
@@ -52,31 +52,31 @@ bool File::IsClosed() {
int64_t File::Read(void* buffer, int64_t num_bytes) {
- assert(handle_->fd() >= 0);
+ ASSERT(handle_->fd() >= 0);
return read(handle_->fd(), buffer, num_bytes);
}
int64_t File::Write(const void* buffer, int64_t num_bytes) {
- assert(handle_->fd() >= 0);
+ ASSERT(handle_->fd() >= 0);
return write(handle_->fd(), buffer, num_bytes);
}
off_t File::Position() {
- assert(handle_->fd() >= 0);
+ ASSERT(handle_->fd() >= 0);
return lseek(handle_->fd(), 0, SEEK_CUR);
}
void File::Flush() {
- assert(handle_->fd());
+ ASSERT(handle_->fd());
_commit(handle_->fd());
}
off_t File::Length() {
- assert(handle_->fd() >= 0);
+ ASSERT(handle_->fd() >= 0);
off_t position = lseek(handle_->fd(), 0, SEEK_CUR);
if (position < 0) {
// The file is not capable of seeking. Return an error.
« no previous file with comments | « runtime/bin/file_macos.cc ('k') | runtime/bin/gen_snapshot.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698