diff options
author | agl@chromium.org <agl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-02-10 08:14:58 +0000 |
---|---|---|
committer | agl@chromium.org <agl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-02-10 08:14:58 +0000 |
commit | d8480ab6be1853998fc053919a3194c14a42aebc (patch) | |
tree | 86bd23850ff2efa5a6177c16cc7548d17ab57f18 /chrome/common/ipc_message.cc | |
parent | 65d881defe3e7f4873f7553bc34bf0cd6ae231fe (diff) | |
download | chromium_src-d8480ab6be1853998fc053919a3194c14a42aebc.zip chromium_src-d8480ab6be1853998fc053919a3194c14a42aebc.tar.gz chromium_src-d8480ab6be1853998fc053919a3194c14a42aebc.tar.bz2 |
POSIX: fix file descriptor passing
Although descriptor passing was working fine in tests, it didn't work
at all in real code. When a Message is taken off the wire, it's copied
before processing. Message has an explicit copy constructor which
wasn't copying the list of FileDescriptors.
This changes makes the Message copy constructor steal the
FileDescriptors from the source Message.
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9470 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/ipc_message.cc')
-rw-r--r-- | chrome/common/ipc_message.cc | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/chrome/common/ipc_message.cc b/chrome/common/ipc_message.cc index 67dfad8..9ec3105 100644 --- a/chrome/common/ipc_message.cc +++ b/chrome/common/ipc_message.cc @@ -40,6 +40,7 @@ Message::Message(const char* data, int data_len) : Pickle(data, data_len) { Message::Message(const Message& other) : Pickle(other) { InitLoggingVariables(); + descriptor_set_.TakeFrom(&other.descriptor_set_); } void Message::InitLoggingVariables() { |