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: http://src.chromium.org/svn/trunk/src@23102 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

Former-commit-id: da11fb05537aa1f2108f6a7c8d7fb47d0f7c0770
meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser