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

This commit is contained in:
bryner%brianryner.com 2005-10-22 03:27:22 +00:00
Родитель 71214f2f8d
Коммит e7e62f956e
1 изменённых файлов: 4 добавлений и 1 удалений

Просмотреть файл

@ -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);
}