зеркало из https://github.com/mozilla/gecko-dev.git
Bug 903965 - nsWebNavigationInfo now checks if the docShell wants plugins before loading them. r=smaug
--HG-- extra : rebase_source : 6dfa90bc1906a36b7d40ccf4c5ccddea44b180de
This commit is contained in:
Родитель
c01dcfbb59
Коммит
5b0da5cb47
|
@ -9,6 +9,7 @@
|
|||
#include "nsServiceManagerUtils.h"
|
||||
#include "nsIDocumentLoaderFactory.h"
|
||||
#include "nsIPluginHost.h"
|
||||
#include "nsIDocShell.h"
|
||||
#include "nsContentUtils.h"
|
||||
#include "imgLoader.h"
|
||||
|
||||
|
@ -50,7 +51,15 @@ nsWebNavigationInfo::IsTypeSupported(const nsACString& aType,
|
|||
if (*aIsTypeSupported) {
|
||||
return rv;
|
||||
}
|
||||
|
||||
|
||||
// If this request is for a docShell that isn't going to allow plugins,
|
||||
// there's no need to try and find a plugin to handle it.
|
||||
nsCOMPtr<nsIDocShell> docShell(do_QueryInterface(aWebNav));
|
||||
bool allowed;
|
||||
if (docShell && NS_SUCCEEDED(docShell->GetAllowPlugins(&allowed)) && !allowed) {
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
// Try reloading plugins in case they've changed.
|
||||
nsCOMPtr<nsIPluginHost> pluginHost =
|
||||
do_GetService(MOZ_PLUGIN_HOST_CONTRACTID);
|
||||
|
|
Загрузка…
Ссылка в новой задаче