linux/mac: Fix race condition when destroying the renderer<->plugin channel
linux/mac: Fix race condition when destroying the renderer<->plugin channel

There is a race condition at plugin destruction on posix:
1- (renderer) WebPluginDelegateProxy1 opens a channel to the plugin
2- (plugin) new channel created, sends FD1 to renderer
3- (renderer) WebPluginDelegateProxy1 receives FD1, establishes the channel name -> FD1 mapping.
[...]
4- (renderer) WebPluginDelegateProxy1 asks the plugin to destroy an instance, and schedules self for delayed deletion which will release the channel and remove the mapping.
5- (plugin) this was the last instance, plugin closes its end of the channel, removes its mapping.
6- (renderer) WebPluginDelegateProxy2 opens a channel to the plugin
7- (plugin) new channel created, sends FD2 to renderer
8- (renderer) WebPluginDelegateProxy2 receives FD2, establishes the channel name -> FD2 mapping *ASSERT* because the mapping already exists (to FD1)
9- (renderer) WebPluginDelegateProxy1 deleted, causes channel host destruction and removing of channel name -> FD1 mapping

The channel host destruction in (9) needs to happen before (8). This CL does that.

BUG=18491

Review URL: http://codereview.chromium.org/165280


git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@23102 0039d316-1c4b-4281-b951-d872f2087c98

yitian134/chromium,gavinp/chromium,gavinp/chromium,Crystalnix/house-of-life-chromium,Crystalnix/house-of-life-chromium,gavinp/chromium,Crystalnix/house-of-life-chromium,Crystalnix/house-of-life-chromium,ropik/chromium,Crystalnix/house-of-life-chromium,yitian134/chromium,adobe/chromium,Crystalnix/house-of-life-chromium,adobe/chromium,ropik/chromium,ropik/chromium,adobe/chromium,gavinp/chromium,Crystalnix/house-of-life-chromium,adobe/chromium,adobe/chromium,ropik/chromium,ropik/chromium,ropik/chromium,adobe/chromium,yitian134/chromium,adobe/chromium,adobe/chromium,adobe/chromium,Crystalnix/house-of-life-chromium,yitian134/chromium,yitian134/chromium,yitian134/chromium,gavinp/chromium,yitian134/chromium,gavinp/chromium,yitian134/chromium,gavinp/chromium,gavinp/chromium,ropik/chromium,adobe/chromium,gavinp/chromium,Crystalnix/house-of-life-chromium,yitian134/chromium,adobe/chromium,Crystalnix/house-of-life-chromium,yitian134/chromium,ropik/chromium,Crystalnix/house-of-life-chromium,ropik/chromium,gavinp/chromium