diff options
Diffstat (limited to 'docshell')
-rw-r--r-- | docshell/base/nsAboutRedirector.cpp | 2 | ||||
-rw-r--r-- | docshell/base/nsDocShell.cpp | 23 | ||||
-rw-r--r-- | docshell/build/nsDocShellModule.cpp | 22 |
3 files changed, 10 insertions, 37 deletions
diff --git a/docshell/base/nsAboutRedirector.cpp b/docshell/base/nsAboutRedirector.cpp index f57d6c002..e1d883532 100644 --- a/docshell/base/nsAboutRedirector.cpp +++ b/docshell/base/nsAboutRedirector.cpp @@ -119,12 +119,10 @@ static RedirEntry kRedirMap[] = { nsIAboutModule::URI_MUST_LOAD_IN_CHILD | nsIAboutModule::ALLOW_SCRIPT }, -#ifndef ANDROID { "profiles", "chrome://global/content/aboutProfiles.xhtml", nsIAboutModule::ALLOW_SCRIPT }, -#endif // about:srcdoc is unresolvable by specification. It is included here // because the security manager would disallow srcdoc iframes otherwise. { diff --git a/docshell/base/nsDocShell.cpp b/docshell/base/nsDocShell.cpp index 6104ebfa7..d8d0614d5 100644 --- a/docshell/base/nsDocShell.cpp +++ b/docshell/base/nsDocShell.cpp @@ -860,6 +860,12 @@ nsDocShell::~nsDocShell() shPrivate->SetRootDocShell(nullptr); } + if (mContentViewer) { + mContentViewer->Close(nullptr); + mContentViewer->Destroy(); + mContentViewer = nullptr; + } + if (--gDocShellCount == 0) { NS_IF_RELEASE(sURIFixup); } @@ -4943,13 +4949,11 @@ nsDocShell::DisplayLoadError(nsresult aError, nsIURI* aURI, if (errorClass == nsINSSErrorsService::ERROR_CLASS_BAD_CERT) { error.AssignLiteral("nssBadCert"); - // If this is an HTTP Strict Transport Security host or a pinned host - // and the certificate is bad, don't allow overrides (RFC 6797 section - // 12.1, HPKP draft spec section 2.6). + // If this is an HTTP Strict Transport Security host, don't allow + // overrides (RFC 6797 section 12.1). uint32_t flags = UsePrivateBrowsing() ? nsISocketProvider::NO_PERMANENT_STORAGE : 0; bool isStsHost = false; - bool isPinnedHost = false; if (XRE_IsParentProcess()) { nsCOMPtr<nsISiteSecurityService> sss = do_GetService(NS_SSSERVICE_CONTRACTID, &rv); @@ -4957,9 +4961,6 @@ nsDocShell::DisplayLoadError(nsresult aError, nsIURI* aURI, rv = sss->IsSecureURI(nsISiteSecurityService::HEADER_HSTS, aURI, flags, nullptr, &isStsHost); NS_ENSURE_SUCCESS(rv, rv); - rv = sss->IsSecureURI(nsISiteSecurityService::HEADER_HPKP, aURI, - flags, nullptr, &isPinnedHost); - NS_ENSURE_SUCCESS(rv, rv); } else { mozilla::dom::ContentChild* cc = mozilla::dom::ContentChild::GetSingleton(); @@ -4967,8 +4968,6 @@ nsDocShell::DisplayLoadError(nsresult aError, nsIURI* aURI, SerializeURI(aURI, uri); cc->SendIsSecureURI(nsISiteSecurityService::HEADER_HSTS, uri, flags, &isStsHost); - cc->SendIsSecureURI(nsISiteSecurityService::HEADER_HPKP, uri, flags, - &isPinnedHost); } if (Preferences::GetBool( @@ -4976,11 +4975,9 @@ nsDocShell::DisplayLoadError(nsresult aError, nsIURI* aURI, cssClass.AssignLiteral("expertBadCert"); } - // HSTS/pinning takes precedence over the expert bad cert pref. We + // HSTS takes precedence over the expert bad cert pref. We // never want to show the "Add Exception" button for these sites. - // In the future we should differentiate between an HSTS host and a - // pinned host and display a more informative message to the user. - if (isStsHost || isPinnedHost) { + if (isStsHost) { cssClass.AssignLiteral("badStsCert"); } diff --git a/docshell/build/nsDocShellModule.cpp b/docshell/build/nsDocShellModule.cpp index 3481bd297..fbf2f1002 100644 --- a/docshell/build/nsDocShellModule.cpp +++ b/docshell/build/nsDocShellModule.cpp @@ -25,10 +25,6 @@ #ifdef MOZ_ENABLE_DBUS #include "nsDBusHandlerApp.h" #endif -#if defined(MOZ_WIDGET_ANDROID) -#include "nsExternalSharingAppService.h" -#include "nsExternalURLHandlerService.h" -#endif // session history #include "nsSHEntry.h" @@ -85,10 +81,6 @@ NS_GENERIC_FACTORY_CONSTRUCTOR(PlatformLocalHandlerApp_t) #ifdef MOZ_ENABLE_DBUS NS_GENERIC_FACTORY_CONSTRUCTOR(nsDBusHandlerApp) #endif -#if defined(MOZ_WIDGET_ANDROID) -NS_GENERIC_FACTORY_CONSTRUCTOR(nsExternalSharingAppService) -NS_GENERIC_FACTORY_CONSTRUCTOR(nsExternalURLHandlerService) -#endif NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(ContentHandlerService, Init) // session history @@ -114,10 +106,6 @@ NS_DEFINE_NAMED_CID(NS_LOCALHANDLERAPP_CID); #ifdef MOZ_ENABLE_DBUS NS_DEFINE_NAMED_CID(NS_DBUSHANDLERAPP_CID); #endif -#if defined(MOZ_WIDGET_ANDROID) -NS_DEFINE_NAMED_CID(NS_EXTERNALSHARINGAPPSERVICE_CID); -NS_DEFINE_NAMED_CID(NS_EXTERNALURLHANDLERSERVICE_CID); -#endif NS_DEFINE_NAMED_CID(NS_SHENTRY_CID); NS_DEFINE_NAMED_CID(NS_SHTRANSACTION_CID); NS_DEFINE_NAMED_CID(NS_SHISTORY_CID); @@ -143,10 +131,6 @@ const mozilla::Module::CIDEntry kDocShellCIDs[] = { #ifdef MOZ_ENABLE_DBUS { &kNS_DBUSHANDLERAPP_CID, false, nullptr, nsDBusHandlerAppConstructor }, #endif -#if defined(MOZ_WIDGET_ANDROID) - { &kNS_EXTERNALSHARINGAPPSERVICE_CID, false, nullptr, nsExternalSharingAppServiceConstructor }, - { &kNS_EXTERNALURLHANDLERSERVICE_CID, false, nullptr, nsExternalURLHandlerServiceConstructor }, -#endif { &kNS_SHENTRY_CID, false, nullptr, nsSHEntryConstructor }, { &kNS_SHTRANSACTION_CID, false, nullptr, nsSHTransactionConstructor }, { &kNS_SHISTORY_CID, false, nullptr, nsSHistoryConstructor }, @@ -183,9 +167,7 @@ const mozilla::Module::ContractIDEntry kDocShellContracts[] = { { NS_ABOUT_MODULE_CONTRACTID_PREFIX "performance", &kNS_ABOUT_REDIRECTOR_MODULE_CID }, { NS_ABOUT_MODULE_CONTRACTID_PREFIX "plugins", &kNS_ABOUT_REDIRECTOR_MODULE_CID }, { NS_ABOUT_MODULE_CONTRACTID_PREFIX "serviceworkers", &kNS_ABOUT_REDIRECTOR_MODULE_CID }, -#ifndef ANDROID { NS_ABOUT_MODULE_CONTRACTID_PREFIX "profiles", &kNS_ABOUT_REDIRECTOR_MODULE_CID }, -#endif { NS_ABOUT_MODULE_CONTRACTID_PREFIX "srcdoc", &kNS_ABOUT_REDIRECTOR_MODULE_CID }, { NS_ABOUT_MODULE_CONTRACTID_PREFIX "support", &kNS_ABOUT_REDIRECTOR_MODULE_CID }, { NS_ABOUT_MODULE_CONTRACTID_PREFIX "telemetry", &kNS_ABOUT_REDIRECTOR_MODULE_CID }, @@ -206,10 +188,6 @@ const mozilla::Module::ContractIDEntry kDocShellContracts[] = { #ifdef MOZ_ENABLE_DBUS { NS_DBUSHANDLERAPP_CONTRACTID, &kNS_DBUSHANDLERAPP_CID }, #endif -#if defined(MOZ_WIDGET_ANDROID) - { NS_EXTERNALSHARINGAPPSERVICE_CONTRACTID, &kNS_EXTERNALSHARINGAPPSERVICE_CID }, - { NS_EXTERNALURLHANDLERSERVICE_CONTRACTID, &kNS_EXTERNALURLHANDLERSERVICE_CID }, -#endif { NS_SHENTRY_CONTRACTID, &kNS_SHENTRY_CID }, { NS_SHTRANSACTION_CONTRACTID, &kNS_SHTRANSACTION_CID }, { NS_SHISTORY_CONTRACTID, &kNS_SHISTORY_CID }, |