diff options
author | jochen@chromium.org <jochen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-03-15 13:35:06 +0000 |
---|---|---|
committer | jochen@chromium.org <jochen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-03-15 13:35:06 +0000 |
commit | b0df57cf1f90cd46703023be0f6ab8c6175f7771 (patch) | |
tree | 7bd956e684159a29e115d56fafd1583a74c645f1 /base/posix | |
parent | e387e46fd352bf8baa35c403f9c95905ade0feda (diff) | |
download | chromium_src-b0df57cf1f90cd46703023be0f6ab8c6175f7771.zip chromium_src-b0df57cf1f90cd46703023be0f6ab8c6175f7771.tar.gz chromium_src-b0df57cf1f90cd46703023be0f6ab8c6175f7771.tar.bz2 |
Revert of Implement ScopedFD in terms of ScopedGeneric. (https://codereview.chromium.org/191673003/)
Reason for revert:
Doesn't correctly link
/mnt/data/b/build/slave/Chromium_Linux_Codesearch/build/src/third_party/gold/gold64: warning: hidden symbol 'base::internal::ScopedFDCloseTraits::Free(int)' in obj/base/files/nacl_helper.scoped_file.o is referenced by DSO lib/libipc.so
Original issue's description:
> Implement ScopedFD in terms of ScopedGeneric.
>
> Move to a new file base/files/scoped_file.h. I will also add ScopedFILE to here (currently in file_util.h) later.
>
> I think there is a crash in the old code in content/browser/zygote_host/zygote_host_impl_linux.cc that this patch should fix. The old ScopedFD took the address of something in a vector that is being modified.
>
> I removed SafeScopedFD from content/common/sandbox_linux/sandbox_linux.cc since base's ScopedFD not CHECKs on close failure (this is a more recent addition).
>
> BUG=
> R=agl@chromium.org, viettrungluu@chromium.org
>
> Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=257001
>
> Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=257179
TBR=viettrungluu@chromium.org,agl@chromium.org,brettw@chromium.org
NOTREECHECKS=true
NOTRY=true
BUG=
Review URL: https://codereview.chromium.org/201203002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@257323 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/posix')
-rw-r--r-- | base/posix/unix_domain_socket_linux_unittest.cc | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/base/posix/unix_domain_socket_linux_unittest.cc b/base/posix/unix_domain_socket_linux_unittest.cc index bb7154f..22bb172 100644 --- a/base/posix/unix_domain_socket_linux_unittest.cc +++ b/base/posix/unix_domain_socket_linux_unittest.cc @@ -9,7 +9,6 @@ #include "base/bind.h" #include "base/bind_helpers.h" #include "base/file_util.h" -#include "base/files/scoped_file.h" #include "base/pickle.h" #include "base/posix/unix_domain_socket_linux.h" #include "base/synchronization/waitable_event.h" @@ -26,8 +25,8 @@ TEST(UnixDomainSocketTest, SendRecvMsgAbortOnReplyFDClose) { int fds[2]; ASSERT_EQ(0, socketpair(AF_UNIX, SOCK_SEQPACKET, 0, fds)); - ScopedFD scoped_fd0(fds[0]); - ScopedFD scoped_fd1(fds[1]); + file_util::ScopedFD scoped_fd0(&fds[0]); + file_util::ScopedFD scoped_fd1(&fds[1]); // Have the thread send a synchronous message via the socket. Pickle request; @@ -63,7 +62,7 @@ TEST(UnixDomainSocketTest, SendRecvMsgAvoidsSIGPIPE) { ASSERT_EQ(0, sigaction(SIGPIPE, &act, &oldact)); int fds[2]; ASSERT_EQ(0, socketpair(AF_UNIX, SOCK_SEQPACKET, 0, fds)); - ScopedFD scoped_fd1(fds[1]); + file_util::ScopedFD scoped_fd1(&fds[1]); ASSERT_EQ(0, IGNORE_EINTR(close(fds[0]))); // Have the thread send a synchronous message via the socket. Unless the |