Bug 614979 - Flash plugin crashes because we don't destroy the plugin window right after NPP_Destroy, which means that messages are being delivered and causing async messages to be queued after NPP_Destroy. Destroy the window earlier, r=jimm a=blocker

This commit is contained in:
Benjamin Smedberg 2010-12-09 09:54:26 -05:00
parent ffa48f7ab4
commit 8c94839c1b

View File

@ -178,7 +178,7 @@ PluginInstanceChild::PluginInstanceChild(const NPPluginFuncs* aPluginIface)
PluginInstanceChild::~PluginInstanceChild() PluginInstanceChild::~PluginInstanceChild()
{ {
#if defined(OS_WIN) #if defined(OS_WIN)
DestroyPluginWindow(); NS_ASSERTION(!mPluginWindowHWND, "Destroying PluginInstanceChild without NPP_Destroy?");
#endif #endif
#if defined(OS_MACOSX) #if defined(OS_MACOSX)
if (mShColorSpace) { if (mShColorSpace) {
@ -3000,6 +3000,7 @@ PluginInstanceChild::AnswerNPP_Destroy(NPError* aResult)
SharedSurfaceRelease(); SharedSurfaceRelease();
DestroyWinlessPopupSurrogate(); DestroyWinlessPopupSurrogate();
UnhookWinlessFlashThrottle(); UnhookWinlessFlashThrottle();
DestroyPluginWindow();
#endif #endif
// Pending async calls are discarded, not delivered. This matches the // Pending async calls are discarded, not delivered. This matches the