Revert 257562 "Base: Make base::File use ScopedFD on POSIX."
Might caused a bunch of layout test failures, at least on Linux
fast/dom/Window/property-access-on-cached-properties-after-frame-navigated.html,
fast/dom/Window/property-access-on-cached-properties-after-frame-removed.html,
fast/dom/Window/property-access-on-cached-window-after-frame-navigated.html,
fast/dom/Window/property-access-on-cached-window-after-frame-removed.html
> Base: Make base::File use ScopedFD on POSIX.
>
> Now that ScopedFD lives outside of file_util, File can use it to remove manual
> lifetime management.
>
> This also standarizes the behavior on Close failures for all platforms.
>
> BUG=none
>
> Review URL: https://codereview.chromium.org/201083002
TBR=rvargas@chromium.org
Review URL: https://codereview.chromium.org/202583005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@257577 0039d316-1c4b-4281-b951-d872f2087c98
CrOS-Libchrome-Original-Commit: c27ded48173d1cee6bed4e1f82d29852607cd9e9
diff --git a/base/files/file.cc b/base/files/file.cc
index cd167b1..478f902 100644
--- a/base/files/file.cc
+++ b/base/files/file.cc
@@ -40,9 +40,6 @@
error_details_(FILE_OK),
created_(false),
async_(false) {
-#if defined(OS_POSIX)
- DCHECK_GE(platform_file, -1);
-#endif
}
File::File(RValue other)
@@ -53,6 +50,7 @@
}
File::~File() {
+ Close();
}
File& File::operator=(RValue other) {