Bug 1574372 - Allow using nsWebNavigationInfo statically. r=bzbarsky

IsTypeSupported requires a docshell in order to determine if plugins are allowed. This adds a static version that lets the caller provide their own value for allowing plugins.

Differential Revision: https://phabricator.services.mozilla.com/D56132
This commit is contained in:
Matt Woodrow
2019-12-16 21:25:17 +00:00
parent 596a84668d
commit 54948e07eb
7 changed files with 44 additions and 69 deletions

View File

@@ -466,10 +466,6 @@ already_AddRefed<nsDocShell> nsDocShell::Create(
// Create our ContentListener
ds->mContentListener = new nsDSURIContentListener(ds);
rv = ds->mContentListener->Init();
if (NS_WARN_IF(NS_FAILED(rv))) {
return nullptr;
}
// If parent intercept is not enabled then we must forward to
// the network controller from docshell. We also enable if we're