mirror of
https://github.com/roytam1/palemoon27.git
synced 2026-05-26 14:30:27 +00:00
c5205b44c8
- Bug 1240330 - mozAlarm debug messages are turned on r=khuey (aa938a4371) - fix (cdc44e8bc8) - Bug 1239788 - Don't include non-main-thread assertions in the constructor enabled check for [Exposed=System] WebIDL interfaces; r=bzbarsky (5d05b4066a) - Bug 1247346. Slot indices on IDL interface members that get a slot should be per-interface, not a single per-member number. r=peterv (640231c37e) - Bug 1157469 - null check wrapper in case WrapNode fails, r=bholley (9fd9b038db) - Bug 1242211 - Mark MozMapRooter as final; r=baku (f3b5cc7728) - Bug 1243438. Don't try to include the filename '<unknown>' when including headers for unions that have a built-in typedef they're referenced by. r=peterv (781d1ec0af) - Bug 1241021 part 1: Refactor GenerateCSS2PropertiesWebIDL.py to invoke a helper function for each line. r=bz (258b031fd8) - Bug 1241021 part 2: Make GenerateCSS2PropertiesWebIDL.py produce capitalized as well as uncapitalized WebkitFoo/webkitFoo DOM style accessors. r=bz (0bf2ec95ae) - Bug 1241021 part 3: Refactor CSS mochitest test_initial_storage.html to perform its DOM accessor consistency-checks via a helper-function. r=bz (3a0c1a1678) - Bug 1241021 part 4: Extend mochitest test_initial_storage.html to test that uppercase Webkit DOM accessors for css properties are functional. r=bz (5a6a23c7ab) - Bug 1240592 - Remove unnecessary -Wno-uninitialized from dom/bindings. r=khuey (c854f7b397) - Bug 1200341 - Implement HKDF for WebCrypto r=rbarnes,smaug (2c830d65a1) - Bug 1200341 - Use BufferSource instead of CryptoOperationData in the SubtleCrypto WebIDL spec r=smaug (8cece95b5c) - Bug 1191936 - Implement RSA-PSS key generation r=rbarnes (ec9654595c) - Bug 1191936 - Implement RSA-PSS signing and verification r=rbarnes,smaug (7653bdfced) - Bug 1204763 follow-up: Fix the comments, DONTBUILD (8b26e6f3a9) - Reformat clang-plugin.cpp using clang-format, no bug (9346eda9f4) - Bug 1214037 - Don't consider the result of an assignment expression MOZ_MUST_USE, r=ehsan (70c7830c3a) - Bug 1242789 - Allow lambdas to capture raw pointers to refcounted objects by reference, r=ehsan (e7158a7746) - Bug 1238042 - Add about:checkerboard. r=ehsan,botond (f234ce7fa0) - Bug 1237177. Make the this-rebinding callable proxy sandboxes use return the prototype of its target, not its own null prototype. r=efaust (694a8081dc) - Bug 1248521 - Pack PrefHashEntry better. r=froydnj. (55e9d609fe) - Bug 1240453 - enable shared memory in xpconnect. r=bz (58db0b406e) - Bug 1202014 - Don't use-after-move in ActorsChild.cpp, r=khuey (382e7183c0) - Bug 1136762 - TSan: data race xpcom/io/nsPipe3.cpp:1061 CloseWithStatus. r=nfroyd. (68fd82971d) - Bug 1237668 - Remove nsSimpleUnicharStreamFactory r=froydnj (8bb6ec081c) - Bug 1189998, Part 4 - Add authentication secret to Push data test. r=dragana (122a0bd5f9) - Bug 1205137 - Add a PushSubscription serializer. r=mt,smaug (aa9e847c42) - Bug 1232910 - Use channel.asyncOpen2 within dom/push/PushServiceHttp2.jsm. r=sicking r=dragana (a2f483a983) - Bug 1246632 - Fix ackMsgRecv in PushServiceHttp2.js. r=kitcambridge (c1559e0539) - Bug 1240615 - Make PushService protocol init method return a Promise. r=kitcambridge (4d52dc6a41) - Bug 1246784 - Expose Console to the WorkerDebuggerGlobalScope, r=khuey (a992fdc555) - misspatch (33708903c4) - Bug 1207494 - Part 5: Remove use of expression closure from dom/contacts/. r=reuben (256b3831a4) - Bug 1207494 - Part 4: Remove use of expression closure from dom/canvas/. r=gw280 (1666e49673) - Bug 1207494 - Part 3: Remove use of expression closure from dom/browser-element/. r=smaug (a891769373) - Bug 1207494 - Part 2: Remove use of expression closure from dom/base/test/. r=peterv (01762e3181) - Bug 1207494 - Part 1: Remove use of expression closure from dom/apps/. r=ferjm (2474c8619b) - Bug 1247108 - Pass securityFlag when creating a new channel within webapps (r=fabrice) (8305294f26) - Bug 1219004 - Improve error management in getFullAppByManifestURL r=ferjm (c3ad64df7a) - revert contains/includes (29c60a77e5) - Bug 1147562 - Update remaining callsites of newChannel before landing the shim in dom/ (r=sicking) (0cd64e20e1) - Bug 1243924 - Convert remaining callsites within dom/ to use channel.open2() (r=sicking) (43b01f88ba) - Bug 1162658 - Update FormData to match latest spec, r=smaug (a42ca52ad5) - Bug 1208895 - Fix a typo in nsGenericHTMLElement::GetItemId(); r=baku (2d6f2d79f4) - Bug 1223523. The named getter on document should not return images with an empty name. r=peterv (da3d1f52f5) - Bug 1183491. Null-check the document we get from our contentWindow in the contentDocument getter, because apparently it can end up null. r=bkelly (3002a4375c) - Bug 1203430 - Intermittent crash in PNeckoChild::SendHTMLDNSPrefetch. r=jdm (3b82b57cbf) - Bug 893332, part 1 - Rename misnamed SetValidityState/GetValidityState arguments. r=baku (d403b12c9a) - Bug 893332, part 2 - Update validity state before asserting range underflow state. r=baku (a4cbce224c) - Bug 893332, part 3 - Don't assert range underflow state under the parser. r=baku (763e99ed8e) - Bug 893332, part 4 - Crashtests. r=baku (7cdcdc02c4) - Bug 1240336 Setting same value to either <input> or <textarea> shouldn't cause committing existing composition r=ehsan (5cc2c35dbb) - Bug 1228708. Fix UndoManager to correctly suppress exceptions it wants to suppress on ErrorResults. r=smaug (905207a3b4) - Bug 1230295 - Add telemetry to report when Ogg chaining is used. r=rillian,r=vladan (e47c49f508)
223 lines
9.4 KiB
C++
223 lines
9.4 KiB
C++
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
|
|
#include "mozilla/ModuleUtils.h"
|
|
#include "nsDocShellCID.h"
|
|
|
|
#include "nsDocShell.h"
|
|
#include "nsDefaultURIFixup.h"
|
|
#include "nsWebNavigationInfo.h"
|
|
#include "nsAboutRedirector.h"
|
|
#include "nsCDefaultURIFixup.h"
|
|
|
|
// uriloader
|
|
#include "nsURILoader.h"
|
|
#include "nsDocLoader.h"
|
|
#include "nsOSHelperAppService.h"
|
|
#include "nsExternalProtocolHandler.h"
|
|
#include "nsPrefetchService.h"
|
|
#include "nsOfflineCacheUpdate.h"
|
|
#include "nsLocalHandlerApp.h"
|
|
#include "ContentHandlerService.h"
|
|
#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"
|
|
#include "nsSHEntryShared.h"
|
|
#include "nsSHistory.h"
|
|
#include "nsSHTransaction.h"
|
|
|
|
// download history
|
|
#include "nsDownloadHistory.h"
|
|
|
|
using mozilla::dom::ContentHandlerService;
|
|
|
|
static bool gInitialized = false;
|
|
|
|
// The one time initialization for this module
|
|
static nsresult
|
|
Initialize()
|
|
{
|
|
NS_PRECONDITION(!gInitialized, "docshell module already initialized");
|
|
if (gInitialized) {
|
|
return NS_OK;
|
|
}
|
|
gInitialized = true;
|
|
|
|
nsresult rv = nsSHistory::Startup();
|
|
NS_ENSURE_SUCCESS(rv, rv);
|
|
|
|
return NS_OK;
|
|
}
|
|
|
|
static void
|
|
Shutdown()
|
|
{
|
|
nsSHistory::Shutdown();
|
|
nsSHEntryShared::Shutdown();
|
|
gInitialized = false;
|
|
}
|
|
|
|
// docshell
|
|
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsDocShell, Init)
|
|
NS_GENERIC_FACTORY_CONSTRUCTOR(nsDefaultURIFixup)
|
|
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsWebNavigationInfo, Init)
|
|
|
|
// uriloader
|
|
NS_GENERIC_FACTORY_CONSTRUCTOR(nsURILoader)
|
|
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsDocLoader, Init)
|
|
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsOSHelperAppService, Init)
|
|
NS_GENERIC_FACTORY_CONSTRUCTOR(nsExternalProtocolHandler)
|
|
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsPrefetchService, Init)
|
|
NS_GENERIC_FACTORY_SINGLETON_CONSTRUCTOR(nsOfflineCacheUpdateService,
|
|
nsOfflineCacheUpdateService::GetInstance)
|
|
NS_GENERIC_FACTORY_CONSTRUCTOR(nsOfflineCacheUpdate)
|
|
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
|
|
NS_GENERIC_FACTORY_CONSTRUCTOR(nsSHEntry)
|
|
NS_GENERIC_FACTORY_CONSTRUCTOR(nsSHTransaction)
|
|
NS_GENERIC_FACTORY_CONSTRUCTOR(nsSHistory)
|
|
|
|
// download history
|
|
NS_GENERIC_FACTORY_CONSTRUCTOR(nsDownloadHistory)
|
|
|
|
NS_DEFINE_NAMED_CID(NS_DOCSHELL_CID);
|
|
NS_DEFINE_NAMED_CID(NS_DEFAULTURIFIXUP_CID);
|
|
NS_DEFINE_NAMED_CID(NS_WEBNAVIGATION_INFO_CID);
|
|
NS_DEFINE_NAMED_CID(NS_ABOUT_REDIRECTOR_MODULE_CID);
|
|
NS_DEFINE_NAMED_CID(NS_URI_LOADER_CID);
|
|
NS_DEFINE_NAMED_CID(NS_DOCUMENTLOADER_SERVICE_CID);
|
|
NS_DEFINE_NAMED_CID(NS_EXTERNALHELPERAPPSERVICE_CID);
|
|
NS_DEFINE_NAMED_CID(NS_EXTERNALPROTOCOLHANDLER_CID);
|
|
NS_DEFINE_NAMED_CID(NS_PREFETCHSERVICE_CID);
|
|
NS_DEFINE_NAMED_CID(NS_OFFLINECACHEUPDATESERVICE_CID);
|
|
NS_DEFINE_NAMED_CID(NS_OFFLINECACHEUPDATE_CID);
|
|
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);
|
|
NS_DEFINE_NAMED_CID(NS_SHISTORY_INTERNAL_CID);
|
|
NS_DEFINE_NAMED_CID(NS_DOWNLOADHISTORY_CID);
|
|
NS_DEFINE_NAMED_CID(NS_CONTENTHANDLERSERVICE_CID);
|
|
|
|
const mozilla::Module::CIDEntry kDocShellCIDs[] = {
|
|
{ &kNS_DOCSHELL_CID, false, nullptr, nsDocShellConstructor },
|
|
{ &kNS_DEFAULTURIFIXUP_CID, false, nullptr, nsDefaultURIFixupConstructor },
|
|
{ &kNS_WEBNAVIGATION_INFO_CID, false, nullptr, nsWebNavigationInfoConstructor },
|
|
{ &kNS_ABOUT_REDIRECTOR_MODULE_CID, false, nullptr, nsAboutRedirector::Create },
|
|
{ &kNS_URI_LOADER_CID, false, nullptr, nsURILoaderConstructor },
|
|
{ &kNS_DOCUMENTLOADER_SERVICE_CID, false, nullptr, nsDocLoaderConstructor },
|
|
{ &kNS_EXTERNALHELPERAPPSERVICE_CID, false, nullptr, nsOSHelperAppServiceConstructor },
|
|
{ &kNS_CONTENTHANDLERSERVICE_CID, false, nullptr, ContentHandlerServiceConstructor,
|
|
mozilla::Module::CONTENT_PROCESS_ONLY },
|
|
{ &kNS_EXTERNALPROTOCOLHANDLER_CID, false, nullptr, nsExternalProtocolHandlerConstructor },
|
|
{ &kNS_PREFETCHSERVICE_CID, false, nullptr, nsPrefetchServiceConstructor },
|
|
{ &kNS_OFFLINECACHEUPDATESERVICE_CID, false, nullptr, nsOfflineCacheUpdateServiceConstructor },
|
|
{ &kNS_OFFLINECACHEUPDATE_CID, false, nullptr, nsOfflineCacheUpdateConstructor },
|
|
{ &kNS_LOCALHANDLERAPP_CID, false, nullptr, PlatformLocalHandlerApp_tConstructor },
|
|
#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 },
|
|
{ &kNS_SHISTORY_INTERNAL_CID, false, nullptr, nsSHistoryConstructor },
|
|
{ &kNS_DOWNLOADHISTORY_CID, false, nullptr, nsDownloadHistoryConstructor },
|
|
{ nullptr }
|
|
};
|
|
|
|
const mozilla::Module::ContractIDEntry kDocShellContracts[] = {
|
|
{ "@mozilla.org/docshell;1", &kNS_DOCSHELL_CID },
|
|
{ NS_URIFIXUP_CONTRACTID, &kNS_DEFAULTURIFIXUP_CID },
|
|
{ NS_WEBNAVIGATION_INFO_CONTRACTID, &kNS_WEBNAVIGATION_INFO_CID },
|
|
{ NS_ABOUT_MODULE_CONTRACTID_PREFIX "", &kNS_ABOUT_REDIRECTOR_MODULE_CID },
|
|
{ NS_ABOUT_MODULE_CONTRACTID_PREFIX "about", &kNS_ABOUT_REDIRECTOR_MODULE_CID },
|
|
{ NS_ABOUT_MODULE_CONTRACTID_PREFIX "config", &kNS_ABOUT_REDIRECTOR_MODULE_CID },
|
|
#ifdef MOZ_CRASHREPORTER
|
|
{ NS_ABOUT_MODULE_CONTRACTID_PREFIX "crashes", &kNS_ABOUT_REDIRECTOR_MODULE_CID },
|
|
#endif
|
|
{ NS_ABOUT_MODULE_CONTRACTID_PREFIX "credits", &kNS_ABOUT_REDIRECTOR_MODULE_CID },
|
|
{ NS_ABOUT_MODULE_CONTRACTID_PREFIX "plugins", &kNS_ABOUT_REDIRECTOR_MODULE_CID },
|
|
{ NS_ABOUT_MODULE_CONTRACTID_PREFIX "mozilla", &kNS_ABOUT_REDIRECTOR_MODULE_CID },
|
|
{ NS_ABOUT_MODULE_CONTRACTID_PREFIX "logo", &kNS_ABOUT_REDIRECTOR_MODULE_CID },
|
|
{ NS_ABOUT_MODULE_CONTRACTID_PREFIX "buildconfig", &kNS_ABOUT_REDIRECTOR_MODULE_CID },
|
|
{ NS_ABOUT_MODULE_CONTRACTID_PREFIX "checkerboard", &kNS_ABOUT_REDIRECTOR_MODULE_CID },
|
|
{ NS_ABOUT_MODULE_CONTRACTID_PREFIX "license", &kNS_ABOUT_REDIRECTOR_MODULE_CID },
|
|
{ NS_ABOUT_MODULE_CONTRACTID_PREFIX "neterror", &kNS_ABOUT_REDIRECTOR_MODULE_CID },
|
|
{ NS_ABOUT_MODULE_CONTRACTID_PREFIX "memory", &kNS_ABOUT_REDIRECTOR_MODULE_CID },
|
|
{ NS_ABOUT_MODULE_CONTRACTID_PREFIX "performance", &kNS_ABOUT_REDIRECTOR_MODULE_CID },
|
|
{ NS_ABOUT_MODULE_CONTRACTID_PREFIX "addons", &kNS_ABOUT_REDIRECTOR_MODULE_CID },
|
|
{ NS_ABOUT_MODULE_CONTRACTID_PREFIX "newaddon", &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 },
|
|
{ NS_ABOUT_MODULE_CONTRACTID_PREFIX "networking", &kNS_ABOUT_REDIRECTOR_MODULE_CID },
|
|
{ NS_ABOUT_MODULE_CONTRACTID_PREFIX "webrtc", &kNS_ABOUT_REDIRECTOR_MODULE_CID },
|
|
{ NS_ABOUT_MODULE_CONTRACTID_PREFIX "srcdoc", &kNS_ABOUT_REDIRECTOR_MODULE_CID },
|
|
{ NS_ABOUT_MODULE_CONTRACTID_PREFIX "serviceworkers", &kNS_ABOUT_REDIRECTOR_MODULE_CID },
|
|
{ NS_URI_LOADER_CONTRACTID, &kNS_URI_LOADER_CID },
|
|
{ NS_DOCUMENTLOADER_SERVICE_CONTRACTID, &kNS_DOCUMENTLOADER_SERVICE_CID },
|
|
{ NS_HANDLERSERVICE_CONTRACTID, &kNS_CONTENTHANDLERSERVICE_CID, mozilla::Module::CONTENT_PROCESS_ONLY },
|
|
{ NS_EXTERNALHELPERAPPSERVICE_CONTRACTID, &kNS_EXTERNALHELPERAPPSERVICE_CID },
|
|
{ NS_EXTERNALPROTOCOLSERVICE_CONTRACTID, &kNS_EXTERNALHELPERAPPSERVICE_CID },
|
|
{ NS_MIMESERVICE_CONTRACTID, &kNS_EXTERNALHELPERAPPSERVICE_CID },
|
|
{ NS_NETWORK_PROTOCOL_CONTRACTID_PREFIX"default", &kNS_EXTERNALPROTOCOLHANDLER_CID },
|
|
{ NS_PREFETCHSERVICE_CONTRACTID, &kNS_PREFETCHSERVICE_CID },
|
|
{ NS_OFFLINECACHEUPDATESERVICE_CONTRACTID, &kNS_OFFLINECACHEUPDATESERVICE_CID },
|
|
{ NS_OFFLINECACHEUPDATE_CONTRACTID, &kNS_OFFLINECACHEUPDATE_CID },
|
|
{ NS_LOCALHANDLERAPP_CONTRACTID, &kNS_LOCALHANDLERAPP_CID },
|
|
#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 },
|
|
{ NS_SHISTORY_INTERNAL_CONTRACTID, &kNS_SHISTORY_INTERNAL_CID },
|
|
{ NS_DOWNLOADHISTORY_CONTRACTID, &kNS_DOWNLOADHISTORY_CID },
|
|
{ nullptr }
|
|
};
|
|
|
|
static const mozilla::Module kDocShellModule = {
|
|
mozilla::Module::kVersion,
|
|
kDocShellCIDs,
|
|
kDocShellContracts,
|
|
nullptr,
|
|
nullptr,
|
|
Initialize,
|
|
Shutdown
|
|
};
|
|
|
|
NSMODULE_DEFN(docshell_provider) = &kDocShellModule;
|