Bug 719851 - Remove Flash view on Android when plugin instance is lost r=blassey

--HG--
extra : rebase_source : 88996dc534da0bab5a4bd19104ec2f604c241c90
This commit is contained in:
James Willcox 2012-03-14 17:15:46 -04:00
parent 6516ccca87
commit 62f9590a73

View File

@ -415,9 +415,14 @@ nsPluginInstanceOwner::SetInstance(nsNPAPIPluginInstance *aInstance)
// If we're going to null out mInstance after use, be sure to call
// mInstance->InvalidateOwner() here, since it now won't be called
// from our destructor. This fixes bug 613376.
if (mInstance && !aInstance)
if (mInstance && !aInstance) {
mInstance->InvalidateOwner();
#ifdef MOZ_WIDGET_ANDROID
RemovePluginView();
#endif
}
mInstance = aInstance;
return NS_OK;