Fix a crash in the LegacyRenderWidgetHostHWND destruction code path which occurs via OnFinalMessage
This crash happens because it is attempting to notify an invalid RenderWidgetHostViewAura instance which
is its host that it is being destroyed.
By code inspection and the crash dump analysis this can occur in the following scenario.
1. LegacyRenderWidgetHostHWND gets a message.
2. It forwards it to the parent.
3. The parent then gets destroyed which eventually results in the RenderWidgetHostViewAura::Shutdown method
getting called.
4. LegacyRenderWidgetHostHWND::Destroy gets called by the RenderWidgetHostViewAura::OnWindowDestroying call.
5. RenderWidgetHostViewAura is destroyed in the OnWindowDestroyed notification.
5. LegacyRenderWidgetHostHWND::OnFinalMessage eventually gets called by ATL which tries to notify an invalid
host that it is going away.
Fix is to set the host to NULL on the LegacyRenderWidgetHostHWND instance before calling Destroy on it.
BUG=391055
TBR=sky
Review URL: https://codereview.chromium.org/
370453002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@281180 0039d316-1c4b-4281-b951-d872f2087c98