diff options
author | mark@chromium.org <mark@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-18 16:14:49 +0000 |
---|---|---|
committer | mark@chromium.org <mark@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-18 16:14:49 +0000 |
commit | 4a827847f1b9b860bcd5c45725249a3de3cfc205 (patch) | |
tree | 0d478e8e7825f1812045e2f13716ec9bda7ca2f1 /chrome/plugin/plugin_thread.cc | |
parent | 19befb8df7b3dd4519634125625084c63d463e6e (diff) | |
download | chromium_src-4a827847f1b9b860bcd5c45725249a3de3cfc205.zip chromium_src-4a827847f1b9b860bcd5c45725249a3de3cfc205.tar.gz chromium_src-4a827847f1b9b860bcd5c45725249a3de3cfc205.tar.bz2 |
Don't auto-close the renderer-side plugin channel file descriptor in the
renderer process. Wait until the renderer has proved that it has access to
its end of the socket before closing it manually.
BUG=38459
TEST=Test case from bug 26754 comment 9 (affected Macs only):
1. Have lots of bookmarks (import Safari defaults)
2. Right-click on bookmark bar, and choose "Open All Bookmarks"
Expect: no crash, no sad tabs, none of the following messages logged:
a. LOG(ERROR) << "Refusing use of missing IPC channel " ...
b. LOG(FATAL) << "Denying attempt to reuse initial IPC channel for " ...
This test should be repeated many times.
Review URL: http://codereview.chromium.org/1066001
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@41957 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/plugin/plugin_thread.cc')
-rw-r--r-- | chrome/plugin/plugin_thread.cc | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/chrome/plugin/plugin_thread.cc b/chrome/plugin/plugin_thread.cc index 59d243d..bd06bbd 100644 --- a/chrome/plugin/plugin_thread.cc +++ b/chrome/plugin/plugin_thread.cc @@ -142,10 +142,8 @@ void PluginThread::OnCreateChannel(int renderer_id, if (channel.get()) { channel_handle.name = channel->channel_name(); #if defined(OS_POSIX) - // On POSIX, pass the renderer-side FD. Also mark it as auto-close so that - // it gets closed after it has been sent. - int renderer_fd = channel->DisownRendererFd(); - channel_handle.socket = base::FileDescriptor(renderer_fd, true); + // On POSIX, pass the renderer-side FD. + channel_handle.socket = base::FileDescriptor(channel->renderer_fd(), false); #endif channel->set_off_the_record(off_the_record); } |