Cherry-pick "Fix a fd leak in NPChannelBase on Posix"

Bug 11384229

Patch taken from crrev.com/61893005 PS1

Original description:

Fix a fd leak in NPChannelBase on Posix

NPChannelBase::GetChannel is leaking file descriptor when requesting
a channel_handle which has the same key of a previous request but
conveys a different fd, causing a "leak" of opened file descriptors
in the renderer.
This is not a huge deal for Chrome, in which the renderer processes
are typically short lived (fd cleanup is performed by the OS on
their termination), but can be a problem for WebView.
A known NPChannel client which is exhibiting the fd leak issue is
the JavaBridgeDispatcher.

BUG=b/11384229

Change-Id: If7b9b8b9c4e7d64cb18cd96729d9b881bb7b1327
1 file changed