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

Unified Diff: base/files/file_posix.cc

Issue 172673002: Base: Don't check for thread restrictions when closing a file doesn't do IO. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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 | « base/files/file.h ('k') | base/files/file_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/files/file_posix.cc
diff --git a/base/files/file_posix.cc b/base/files/file_posix.cc
index a37de53280378c13aae9974ed9acccfa4bf259c0..a62ad98bd75974ad6f3f4548cf6648c7e8bf0702 100644
--- a/base/files/file_posix.cc
+++ b/base/files/file_posix.cc
@@ -217,10 +217,10 @@ PlatformFile File::TakePlatformFile() {
}
void File::Close() {
- base::ThreadRestrictions::AssertIOAllowed();
if (!IsValid())
return;
+ base::ThreadRestrictions::AssertIOAllowed();
if (!IGNORE_EINTR(close(file_)))
file_ = kInvalidPlatformFileValue;
}
« no previous file with comments | « base/files/file.h ('k') | base/files/file_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698