Stop plugins correctly when storing a page into session history (bug 311791). Patch by bzbarsky, r+sr=me.

git-svn-id: svn://10.0.0.236/trunk@182768 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
bryner%brianryner.com 2005-10-22 03:27:22 +00:00
parent d206fdc266
commit 1cd340798f

View File

@ -6202,8 +6202,11 @@ StopPluginInstance(PresShell *aShell, nsIContent *aContent)
instance->Destroy();
}
// XXXbz have to use the plugin manager contract because the plugin host
// registers for two different contracts with two difference CIDs! We want
// the plugin manager CID, since that's the one nsObjectFrame gets.
nsCOMPtr<nsIPluginHost> pluginHost =
do_GetService("@mozilla.org/plugin/host;1");
do_GetService("@mozilla.org/plugin/manager;1");
if (pluginHost)
pluginHost->StopPluginInstance(instance);
}