зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1464542: Part 3b - Add existing Services.jsm registrations to the new services cache. r=mccr8,geckoview-reviewers,agi
Differential Revision: https://phabricator.services.mozilla.com/D81419
This commit is contained in:
Родитель
d8406d9631
Коммит
d09458dc51
|
@ -193,7 +193,7 @@ const clearLocalStorage = async function(options) {
|
|||
Services.obs.notifyObservers(null, "extension:purge-localStorage");
|
||||
}
|
||||
|
||||
if (Services.lsm.nextGenLocalStorageEnabled) {
|
||||
if (Services.domStorageManager.nextGenLocalStorageEnabled) {
|
||||
// Ideally we could reuse the logic in Sanitizer.jsm or nsIClearDataService,
|
||||
// but this API exposes an ability to wipe data at a much finger granularity
|
||||
// than those APIs. So custom logic is used here to wipe only the QM
|
||||
|
|
|
@ -56,7 +56,10 @@ add_task(async function testLocalStorage() {
|
|||
await browser.tabs.sendMessage(tabs[0].id, "checkLocalStorageCleared");
|
||||
await browser.tabs.sendMessage(tabs[1].id, "checkLocalStorageSet");
|
||||
|
||||
if (SpecialPowers.Services.lsm.nextGenLocalStorageEnabled === false) {
|
||||
if (
|
||||
SpecialPowers.Services.domStorageManager.nextGenLocalStorageEnabled ===
|
||||
false
|
||||
) {
|
||||
// This assertion fails when localStorage is using the legacy
|
||||
// implementation (See Bug 1595431).
|
||||
browser.test.log("Skipped assertion on nextGenLocalStorageEnabled=false");
|
||||
|
|
|
@ -56,8 +56,10 @@ Classes = [
|
|||
},
|
||||
{
|
||||
'name': 'URIFixup',
|
||||
'js_name': 'uriFixup',
|
||||
'cid': '{c6cf88b7-452e-47eb-bdc9-86e3561648ef}',
|
||||
'contract_ids': ['@mozilla.org/docshell/uri-fixup;1'],
|
||||
'interfaces': ['nsIURIFixup'],
|
||||
'jsm': 'resource://gre/modules/URIFixup.jsm',
|
||||
'constructor': 'URIFixup',
|
||||
},
|
||||
|
|
|
@ -6,8 +6,10 @@
|
|||
|
||||
Classes = [
|
||||
{
|
||||
'js_name': 'droppedLinkHandler',
|
||||
'cid': '{1f34bc80-1bc7-11d6-a384-d705dd0746fc}',
|
||||
'contract_ids': ['@mozilla.org/content/dropped-link-handler;1'],
|
||||
'interfaces': ['nsIDroppedLinkHandler'],
|
||||
'jsm': 'resource://gre/modules/ContentAreaDropListener.jsm',
|
||||
'constructor': 'ContentAreaDropListener',
|
||||
},
|
||||
|
|
|
@ -133,7 +133,7 @@ TestInterfaceJS.prototype = {
|
|||
testThrowNsresultFromNative(x) {
|
||||
// We want to throw an exception that we generate from an nsresult thrown
|
||||
// by a C++ component.
|
||||
Services.netUtils.notImplemented();
|
||||
Services.io.notImplemented();
|
||||
},
|
||||
|
||||
testThrowCallbackError(callback) {
|
||||
|
|
|
@ -10,7 +10,7 @@ async function testSteps() {
|
|||
];
|
||||
|
||||
async function isPreloaded(principal) {
|
||||
return Services.lsm.isPreloaded(principal);
|
||||
return Services.domStorageManager.isPreloaded(principal);
|
||||
}
|
||||
|
||||
info("Setting prefs");
|
||||
|
|
|
@ -185,11 +185,7 @@ ImageObjectProcessor.prototype.process = function(
|
|||
};
|
||||
let value = extractor.extractValue(spec);
|
||||
if (value) {
|
||||
value = Services.netUtils.parseRequestContentType(
|
||||
value,
|
||||
charset,
|
||||
hadCharset
|
||||
);
|
||||
value = Services.io.parseRequestContentType(value, charset, hadCharset);
|
||||
}
|
||||
return value || undefined;
|
||||
}
|
||||
|
|
|
@ -19,7 +19,7 @@ Services.scriptloader.loadSubScript(
|
|||
/* import-globals-from helper_localStorage_e10s.js */
|
||||
|
||||
function waitForLocalStorageFlush() {
|
||||
if (Services.lsm.nextGenLocalStorageEnabled) {
|
||||
if (Services.domStorageManager.nextGenLocalStorageEnabled) {
|
||||
return new Promise(resolve => executeSoon(resolve));
|
||||
}
|
||||
|
||||
|
@ -45,7 +45,7 @@ function waitForLocalStorageFlush() {
|
|||
* notifications, but correctness is guaranteed after the second notification.
|
||||
*/
|
||||
function triggerAndWaitForLocalStorageFlush() {
|
||||
if (Services.lsm.nextGenLocalStorageEnabled) {
|
||||
if (Services.domStorageManager.nextGenLocalStorageEnabled) {
|
||||
return new Promise(resolve => executeSoon(resolve));
|
||||
}
|
||||
|
||||
|
@ -76,7 +76,7 @@ function clearOriginStorageEnsuringNoPreload() {
|
|||
HELPER_PAGE_ORIGIN
|
||||
);
|
||||
|
||||
if (Services.lsm.nextGenLocalStorageEnabled) {
|
||||
if (Services.domStorageManager.nextGenLocalStorageEnabled) {
|
||||
let request = Services.qms.clearStoragesForPrincipal(
|
||||
principal,
|
||||
"default",
|
||||
|
@ -114,8 +114,8 @@ async function verifyTabPreload(knownTab, expectStorageExists) {
|
|||
let principal = Services.scriptSecurityManager.createContentPrincipalFromOrigin(
|
||||
origin
|
||||
);
|
||||
if (Services.lsm.nextGenLocalStorageEnabled) {
|
||||
return Services.lsm.isPreloaded(principal);
|
||||
if (Services.domStorageManager.nextGenLocalStorageEnabled) {
|
||||
return Services.domStorageManager.isPreloaded(principal);
|
||||
}
|
||||
return !!Services.domStorageManager.getStorage(
|
||||
null,
|
||||
|
|
|
@ -87,7 +87,7 @@ requestLongerTimeout(4);
|
|||
* Verify snapshotting of our localStorage implementation in multi-e10s setup.
|
||||
*/
|
||||
add_task(async function() {
|
||||
if (!Services.lsm.nextGenLocalStorageEnabled) {
|
||||
if (!Services.domStorageManager.nextGenLocalStorageEnabled) {
|
||||
ok(true, "Test ignored when the next gen local storage is not enabled.");
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
function localStorageFlush(cb) {
|
||||
if (SpecialPowers.Services.lsm.nextGenLocalStorageEnabled) {
|
||||
if (SpecialPowers.Services.domStorageManager.nextGenLocalStorageEnabled) {
|
||||
SimpleTest.executeSoon(function() {
|
||||
cb();
|
||||
});
|
||||
|
@ -17,7 +17,7 @@ function localStorageFlush(cb) {
|
|||
}
|
||||
|
||||
function localStorageReload(callback) {
|
||||
if (SpecialPowers.Services.lsm.nextGenLocalStorageEnabled) {
|
||||
if (SpecialPowers.Services.domStorageManager.nextGenLocalStorageEnabled) {
|
||||
localStorage.close();
|
||||
let qms = SpecialPowers.Services.qms;
|
||||
let principal = SpecialPowers.wrap(document).nodePrincipal;
|
||||
|
@ -36,7 +36,7 @@ function localStorageReload(callback) {
|
|||
}
|
||||
|
||||
function localStorageFlushAndReload(callback) {
|
||||
if (SpecialPowers.Services.lsm.nextGenLocalStorageEnabled) {
|
||||
if (SpecialPowers.Services.domStorageManager.nextGenLocalStorageEnabled) {
|
||||
localStorage.close();
|
||||
let qms = SpecialPowers.Services.qms;
|
||||
let principal = SpecialPowers.wrap(document).nodePrincipal;
|
||||
|
@ -54,7 +54,7 @@ function localStorageFlushAndReload(callback) {
|
|||
}
|
||||
|
||||
function localStorageClearAll(callback) {
|
||||
if (SpecialPowers.Services.lsm.nextGenLocalStorageEnabled) {
|
||||
if (SpecialPowers.Services.domStorageManager.nextGenLocalStorageEnabled) {
|
||||
let qms = SpecialPowers.Services.qms;
|
||||
let ssm = SpecialPowers.Services.scriptSecurityManager;
|
||||
|
||||
|
@ -92,7 +92,7 @@ function localStorageClearAll(callback) {
|
|||
}
|
||||
|
||||
function localStorageClearDomain(domain, callback) {
|
||||
if (SpecialPowers.Services.lsm.nextGenLocalStorageEnabled) {
|
||||
if (SpecialPowers.Services.domStorageManager.nextGenLocalStorageEnabled) {
|
||||
let qms = SpecialPowers.Services.qms;
|
||||
let principal = SpecialPowers.wrap(document).nodePrincipal;
|
||||
let request = qms.clearStoragesForPrincipal(principal, "default", "ls");
|
||||
|
|
|
@ -89,7 +89,7 @@ function startTest()
|
|||
localStorageReload(function() {
|
||||
is(localStorage.length, 0, "localStorage clean in case 4");
|
||||
|
||||
if (!SpecialPowers.Services.lsm.nextGenLocalStorageEnabled &&
|
||||
if (!SpecialPowers.Services.domStorageManager.nextGenLocalStorageEnabled &&
|
||||
SpecialPowers.Cc["@mozilla.org/xre/app-info;1"].getService(
|
||||
SpecialPowers.Ci.nsIXULRuntime).processType != SpecialPowers.Ci.nsIXULRuntime.PROCESS_TYPE_DEFAULT) {
|
||||
// Following tests cannot be run in a child/plugin process type
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
|
||||
function startTest()
|
||||
{
|
||||
if (SpecialPowers.Services.lsm.nextGenLocalStorageEnabled) {
|
||||
if (SpecialPowers.Services.domStorageManager.nextGenLocalStorageEnabled) {
|
||||
ok(true, "Test ignored when the next gen local storage is enabled.");
|
||||
SimpleTest.finish();
|
||||
return;
|
||||
|
|
|
@ -18,7 +18,7 @@ function doNextTest()
|
|||
switch (currentTest)
|
||||
{
|
||||
case 1:
|
||||
if (SpecialPowers.Services.lsm.nextGenLocalStorageEnabled) {
|
||||
if (SpecialPowers.Services.domStorageManager.nextGenLocalStorageEnabled) {
|
||||
slaveOrigin = "http://test1.example.com";
|
||||
} else {
|
||||
slaveOrigin = "http://example.com";
|
||||
|
@ -50,7 +50,7 @@ function doNextTest()
|
|||
// Try to set a new 500 bytes key and check we fail because we are over the
|
||||
// quota.
|
||||
case 5:
|
||||
if (SpecialPowers.Services.lsm.nextGenLocalStorageEnabled) {
|
||||
if (SpecialPowers.Services.domStorageManager.nextGenLocalStorageEnabled) {
|
||||
slaveOrigin = "http://test1.example.com";
|
||||
} else {
|
||||
slaveOrigin = "https://test2.example.com";
|
||||
|
@ -67,7 +67,7 @@ function doNextTest()
|
|||
|
||||
// Now try again to set 500 bytes key, it must succeed.
|
||||
case 7:
|
||||
if (SpecialPowers.Services.lsm.nextGenLocalStorageEnabled) {
|
||||
if (SpecialPowers.Services.domStorageManager.nextGenLocalStorageEnabled) {
|
||||
slaveOrigin = "http://test1.example.com";
|
||||
} else {
|
||||
slaveOrigin = "https://test2.example.com";
|
||||
|
@ -76,7 +76,7 @@ function doNextTest()
|
|||
break;
|
||||
|
||||
case 8:
|
||||
if (SpecialPowers.Services.lsm.nextGenLocalStorageEnabled) {
|
||||
if (SpecialPowers.Services.domStorageManager.nextGenLocalStorageEnabled) {
|
||||
SimpleTest.executeSoon(doNextTest);
|
||||
} else {
|
||||
// Do a clean up...
|
||||
|
@ -92,7 +92,7 @@ function doNextTest()
|
|||
break;
|
||||
|
||||
case 10:
|
||||
if (SpecialPowers.Services.lsm.nextGenLocalStorageEnabled) {
|
||||
if (SpecialPowers.Services.domStorageManager.nextGenLocalStorageEnabled) {
|
||||
SimpleTest.executeSoon(doNextTest);
|
||||
} else {
|
||||
// Do a clean up...
|
||||
|
|
|
@ -42,7 +42,7 @@ function doNextTest(aWindow) {
|
|||
// Initialy setup the quota to testing value of 1024B and
|
||||
// set a 500 bytes key with name length 1 (allocate 501 bytes)
|
||||
case 1:
|
||||
if (SpecialPowers.Services.lsm.nextGenLocalStorageEnabled) {
|
||||
if (SpecialPowers.Services.domStorageManager.nextGenLocalStorageEnabled) {
|
||||
slaveOrigin = "http://test1.example.com";
|
||||
} else {
|
||||
slaveOrigin = "http://example.com";
|
||||
|
@ -74,7 +74,7 @@ function doNextTest(aWindow) {
|
|||
// Try to set a new 500 bytes key and check we fail because we are over the
|
||||
// quota.
|
||||
case 5:
|
||||
if (SpecialPowers.Services.lsm.nextGenLocalStorageEnabled) {
|
||||
if (SpecialPowers.Services.domStorageManager.nextGenLocalStorageEnabled) {
|
||||
slaveOrigin = "http://test1.example.com";
|
||||
} else {
|
||||
slaveOrigin = "https://test2.example.com";
|
||||
|
@ -91,7 +91,7 @@ function doNextTest(aWindow) {
|
|||
|
||||
// Now try again to set 500 bytes key, it must succeed.
|
||||
case 7:
|
||||
if (SpecialPowers.Services.lsm.nextGenLocalStorageEnabled) {
|
||||
if (SpecialPowers.Services.domStorageManager.nextGenLocalStorageEnabled) {
|
||||
slaveOrigin = "http://test1.example.com";
|
||||
} else {
|
||||
slaveOrigin = "https://test2.example.com";
|
||||
|
@ -100,7 +100,7 @@ function doNextTest(aWindow) {
|
|||
break;
|
||||
|
||||
case 8:
|
||||
if (SpecialPowers.Services.lsm.nextGenLocalStorageEnabled) {
|
||||
if (SpecialPowers.Services.domStorageManager.nextGenLocalStorageEnabled) {
|
||||
SimpleTest.executeSoon(() => doNextTest(aWindow));
|
||||
} else {
|
||||
// Do a clean up...
|
||||
|
@ -116,7 +116,7 @@ function doNextTest(aWindow) {
|
|||
break;
|
||||
|
||||
case 10:
|
||||
if (SpecialPowers.Services.lsm.nextGenLocalStorageEnabled) {
|
||||
if (SpecialPowers.Services.domStorageManager.nextGenLocalStorageEnabled) {
|
||||
SimpleTest.executeSoon(() => doNextTest(aWindow));
|
||||
} else {
|
||||
// Do a clean up...
|
||||
|
|
|
@ -96,7 +96,7 @@ function doStep()
|
|||
SimpleTest.waitForExplicitFinish();
|
||||
|
||||
function startTest() {
|
||||
if (SpecialPowers.Services.lsm.nextGenLocalStorageEnabled) {
|
||||
if (SpecialPowers.Services.domStorageManager.nextGenLocalStorageEnabled) {
|
||||
ok(true, "Test ignored when the next gen local storage is enabled.");
|
||||
SimpleTest.finish();
|
||||
return;
|
||||
|
|
|
@ -6,8 +6,10 @@
|
|||
|
||||
Classes = [
|
||||
{
|
||||
'js_name': 'perms',
|
||||
'cid': '{4f6b5e00-0c36-11d5-a535-0010a401eb10}',
|
||||
'contract_ids': ['@mozilla.org/permissionmanager;1'],
|
||||
'interfaces': ['nsIPermissionManager'],
|
||||
'singleton': True,
|
||||
'type': 'nsIPermissionManager',
|
||||
'constructor': 'mozilla::PermissionManager::GetXPCOMSingleton',
|
||||
|
|
|
@ -6,8 +6,10 @@
|
|||
|
||||
Classes = [
|
||||
{
|
||||
'js_name': 'strings',
|
||||
'cid': '{d85a17c1-aa7c-11d2-9b8c-00805f8a16d9}',
|
||||
'contract_ids': ['@mozilla.org/intl/stringbundle;1'],
|
||||
'interfaces': ['nsIStringBundleService'],
|
||||
'type': 'nsStringBundleService',
|
||||
'headers': ['/intl/strres/nsStringBundleService.h'],
|
||||
'init_method': 'Init',
|
||||
|
|
|
@ -6,8 +6,10 @@
|
|||
|
||||
Classes = [
|
||||
{
|
||||
'js_name': 'locale',
|
||||
'cid': '{92735ff4-6384-4ad6-8508-757010e149ee}',
|
||||
'contract_ids': ['@mozilla.org/intl/localeservice;1'],
|
||||
'interfaces': ['mozILocaleService'],
|
||||
'singleton': True,
|
||||
'type': 'mozilla::intl::LocaleService',
|
||||
'headers': ['mozilla/intl/LocaleService.h'],
|
||||
|
|
|
@ -24,8 +24,10 @@ Classes = [
|
|||
'headers': ['/intl/uconv/nsScriptableUConv.h'],
|
||||
},
|
||||
{
|
||||
'js_name': 'textToSubURI',
|
||||
'cid': '{8b042e22-6f87-11d3-b3c8-00805f8a6670}',
|
||||
'contract_ids': ['@mozilla.org/intl/texttosuburi;1'],
|
||||
'interfaces': ['nsITextToSubURI'],
|
||||
'type': 'nsTextToSubURI',
|
||||
'headers': ['/intl/uconv/nsTextToSubURI.h'],
|
||||
},
|
||||
|
|
|
@ -6,8 +6,10 @@
|
|||
|
||||
Classes = [
|
||||
{
|
||||
'js_name': 'scriptloader',
|
||||
'cid': '{929814d6-1dd2-11b2-8e08-82fa0a339b00}',
|
||||
'contract_ids': ['@mozilla.org/moz/jssubscript-loader;1'],
|
||||
'interfaces': ['mozIJSSubScriptLoader'],
|
||||
'type': 'mozJSSubScriptLoader',
|
||||
'headers': ['/js/xpconnect/loader/mozJSSubScriptLoader.h'],
|
||||
},
|
||||
|
|
|
@ -87,6 +87,7 @@ Classes = [
|
|||
'headers': ['mozilla/dom/BlobURL.h'],
|
||||
},
|
||||
{
|
||||
'js_name': 'cpmm',
|
||||
'cid': '{fe0ff7c3-8e97-448b-9a8a-86afdb9fbbb6}',
|
||||
'contract_ids': ['@mozilla.org/childprocessmessagemanager;1'],
|
||||
'legacy_constructor': 'CreateChildMessageManager',
|
||||
|
@ -148,16 +149,20 @@ Classes = [
|
|||
'headers': ['nsStructuredCloneContainer.h'],
|
||||
},
|
||||
{
|
||||
'js_name': 'DOMRequest',
|
||||
'cid': '{3160e271-138d-4cc7-9d63-6429f16957c7}',
|
||||
'contract_ids': ['@mozilla.org/dom/dom-request-service;1'],
|
||||
'interfaces': ['nsIDOMRequestService'],
|
||||
'singleton': True,
|
||||
'type': 'mozilla::dom::DOMRequestService',
|
||||
'headers': ['mozilla/dom/DOMRequest.h'],
|
||||
'constructor': 'mozilla::dom::DOMRequestService::FactoryCreate',
|
||||
},
|
||||
{
|
||||
'js_name': 'domStorageManager',
|
||||
'cid': '{656db07c-aa80-49e4-bce8-e431baae697d}',
|
||||
'contract_ids': ['@mozilla.org/dom/localStorage-manager;1'],
|
||||
'interfaces': ['nsIDOMStorageManager', 'nsILocalStorageManager'],
|
||||
'legacy_constructor': 'LocalStorageManagerConstructor',
|
||||
},
|
||||
{
|
||||
|
@ -166,8 +171,10 @@ Classes = [
|
|||
'legacy_constructor': 'SessionStorageManagerConstructor',
|
||||
},
|
||||
{
|
||||
'js_name': 'qms',
|
||||
'cid': '{5a75c25a-5e7e-4d90-8f7c-07eb15cc0aa8}',
|
||||
'contract_ids': ['@mozilla.org/dom/quota-manager-service;1'],
|
||||
'interfaces': ['nsIQuotaManagerService'],
|
||||
'singleton': True,
|
||||
'type': 'mozilla::dom::quota::QuotaManagerService',
|
||||
'headers': ['mozilla/dom/quota/QuotaManagerService.h'],
|
||||
|
@ -189,8 +196,10 @@ Classes = [
|
|||
'constructor': 'mozilla::dom::WorkerDebuggerManager::GetInstance',
|
||||
},
|
||||
{
|
||||
'js_name': 'els',
|
||||
'cid': '{baa34652-f1f1-4185-b224-244ee82a413a}',
|
||||
'contract_ids': ['@mozilla.org/eventlistenerservice;1'],
|
||||
'interfaces': ['nsIEventListenerService'],
|
||||
'type': 'nsIEventListenerService',
|
||||
},
|
||||
{
|
||||
|
@ -200,8 +209,10 @@ Classes = [
|
|||
'headers': ['/caps/ExpandedPrincipal.h'],
|
||||
},
|
||||
{
|
||||
'js_name': 'focus',
|
||||
'cid': '{cf7fd51f-aba2-44c1-9ff0-11f7508efcd4}',
|
||||
'contract_ids': ['@mozilla.org/focus-manager;1'],
|
||||
'interfaces': ['nsIFocusManager'],
|
||||
'type': 'nsIFocusManager',
|
||||
},
|
||||
{
|
||||
|
@ -221,6 +232,7 @@ Classes = [
|
|||
'constructor': 'mozilla::dom::Geolocation::NonWindowSingleton',
|
||||
},
|
||||
{
|
||||
'js_name': 'mm',
|
||||
'cid': '{130b016f-fad7-4526-bc7f-827dabf79265}',
|
||||
'contract_ids': ['@mozilla.org/globalmessagemanager;1'],
|
||||
'legacy_constructor': 'CreateGlobalMessageManager',
|
||||
|
@ -316,6 +328,7 @@ Classes = [
|
|||
'init_method': 'Init',
|
||||
},
|
||||
{
|
||||
'js_name': 'ppmm',
|
||||
'cid': '{2a058404-fb85-44ec-8cfd-e8cbdc988dc1}',
|
||||
'contract_ids': ['@mozilla.org/parentprocessmessagemanager;1'],
|
||||
'legacy_constructor': 'CreateParentMessageManager',
|
||||
|
@ -373,8 +386,10 @@ Classes = [
|
|||
'headers': ['/dom/bindings/nsScriptError.h'],
|
||||
},
|
||||
{
|
||||
'js_name': 'scriptSecurityManager',
|
||||
'cid': '{7ee2a4c0-4b93-17d3-ba18-0060b0f199a2}',
|
||||
'contract_ids': ['@mozilla.org/scriptsecuritymanager;1'],
|
||||
'interfaces': ['nsIScriptSecurityManager'],
|
||||
'legacy_constructor': 'Construct_nsIScriptSecurityManager',
|
||||
},
|
||||
{
|
||||
|
|
|
@ -12,11 +12,13 @@ Classes = [
|
|||
'constructor': 'PromptCollection',
|
||||
},
|
||||
{
|
||||
'js_name': 'prompt',
|
||||
'cid': '{076ac188-23c1-4390-aa08-7ef1f78ca5d9}',
|
||||
'contract_ids': [
|
||||
'@mozilla.org/prompter;1',
|
||||
'@mozilla.org/embedcomp/prompt-service;1',
|
||||
],
|
||||
'interfaces': ['nsIPromptService'],
|
||||
'jsm': 'resource://gre/modules/GeckoViewPrompt.jsm',
|
||||
'constructor': 'PromptFactory',
|
||||
},
|
||||
|
|
|
@ -12,8 +12,10 @@ UnloadFunc = 'mozilla::UnloadPrefsModule'
|
|||
|
||||
Classes = [
|
||||
{
|
||||
'js_name': 'prefs',
|
||||
'cid': '{91ca2441-050f-4f7c-9df8-75b40ea40156}',
|
||||
'contract_ids': ['@mozilla.org/preferences-service;1'],
|
||||
'interfaces': ['nsIPrefService', 'nsIPrefBranch'],
|
||||
'singleton': True,
|
||||
'type': 'mozilla::Preferences',
|
||||
'headers': ['mozilla/Preferences.h'],
|
||||
|
|
|
@ -19,17 +19,21 @@ Classes = [
|
|||
'headers': ['/netwerk/base/ArrayBufferInputStream.h'],
|
||||
},
|
||||
{
|
||||
'js_name': 'loadContextInfo',
|
||||
'cid': '{62d4b190-3642-4450-b019-d1c1fba56025}',
|
||||
'contract_ids': ['@mozilla.org/load-context-info-factory;1'],
|
||||
'interfaces': ['nsILoadContextInfoFactory'],
|
||||
'type': 'mozilla::net::LoadContextInfoFactory',
|
||||
'headers': ['mozilla/LoadContextInfo.h'],
|
||||
},
|
||||
{
|
||||
'js_name': 'cache2',
|
||||
'cid': '{ea70b098-5014-4e21-aee1-75e6b2c4b8e0}',
|
||||
'contract_ids': [
|
||||
'@mozilla.org/netwerk/cache-storage-service;1',
|
||||
'@mozilla.org/network/cache-storage-service;1',
|
||||
],
|
||||
'interfaces': ['nsICacheStorageService'],
|
||||
'singleton': True,
|
||||
'type': 'mozilla::net::CacheStorageService',
|
||||
'headers': ['CacheStorageService.h'],
|
||||
|
@ -128,8 +132,10 @@ Classes = [
|
|||
'headers': ['/netwerk/base/nsDownloader.h'],
|
||||
},
|
||||
{
|
||||
'js_name': 'eTLD',
|
||||
'cid': '{cb9abbae-66b6-4609-8594-5c4ff300888e}',
|
||||
'contract_ids': ['@mozilla.org/network/effective-tld-service;1'],
|
||||
'interfaces': ['nsIEffectiveTLDService'],
|
||||
'singleton': True,
|
||||
'type': 'nsEffectiveTLDService',
|
||||
'headers': ['/netwerk/dns/nsEffectiveTLDService.h'],
|
||||
|
@ -199,7 +205,7 @@ Classes = [
|
|||
'@mozilla.org/network/io-service;1',
|
||||
'@mozilla.org/network/util;1',
|
||||
],
|
||||
'interfaces': ['nsIIOService', 'nsISpeculativeConnect'],
|
||||
'interfaces': ['nsIIOService', 'nsISpeculativeConnect', 'nsINetUtil'],
|
||||
'singleton': True,
|
||||
'type': 'mozilla::net::nsIOService',
|
||||
'headers': ['/netwerk/base/nsIOService.h'],
|
||||
|
@ -578,11 +584,13 @@ Classes = [
|
|||
'processes': ProcessSelector.ALLOW_IN_SOCKET_PROCESS,
|
||||
},
|
||||
{
|
||||
'js_name': 'cookies',
|
||||
'cid': '{c375fa80-150f-11d6-a618-0010a401eb10}',
|
||||
'contract_ids': [
|
||||
'@mozilla.org/cookieService;1',
|
||||
'@mozilla.org/cookiemanager;1',
|
||||
],
|
||||
'interfaces': ['nsICookieManager'],
|
||||
'singleton': True,
|
||||
'type': 'nsICookieService',
|
||||
'constructor': 'mozilla::net::CookieService::GetXPCOMSingleton',
|
||||
|
|
|
@ -6,8 +6,10 @@
|
|||
|
||||
Classes = [
|
||||
{
|
||||
'js_name': 'storage',
|
||||
'cid': '{bbbb1d61-438f-4436-92ed-8308e5830fb0}',
|
||||
'contract_ids': ['@mozilla.org/storage/service;1'],
|
||||
'interfaces': ['mozIStorageService'],
|
||||
'singleton': True,
|
||||
'type': 'mozilla::storage::Service',
|
||||
'headers': ['/storage/mozStorageService.h'],
|
||||
|
|
|
@ -98,8 +98,10 @@ Classes = [
|
|||
},
|
||||
{
|
||||
'name': 'AppStartup',
|
||||
'js_name': 'startup',
|
||||
'cid': '{7dd4d320-c84b-4624-8d45-7bb9b2356977}',
|
||||
'contract_ids': ['@mozilla.org/toolkit/app-startup;1'],
|
||||
'interfaces': ['nsIAppStartup'],
|
||||
'type': 'nsAppStartup',
|
||||
'headers': ['/toolkit/components/startup/nsAppStartup.h'],
|
||||
'init_method': 'Init',
|
||||
|
|
|
@ -6,8 +6,10 @@
|
|||
|
||||
Classes = [
|
||||
{
|
||||
'js_name': 'clearData',
|
||||
'cid': '{0c06583d-7dd8-4293-b1a5-912205f779aa}',
|
||||
'contract_ids': ['@mozilla.org/clear-data-service;1'],
|
||||
'interfaces': ['nsIClearDataService'],
|
||||
'jsm': 'resource://gre/modules/ClearDataService.jsm',
|
||||
'constructor': 'ClearDataService',
|
||||
},
|
||||
|
|
|
@ -18,7 +18,7 @@ const { TelemetryController } = ChromeUtils.import(
|
|||
ChromeUtils.import("resource://gre/modules/Timer.jsm", this);
|
||||
ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm", this);
|
||||
|
||||
var EXPORTED_SYMBOLS = ["CrashManager"];
|
||||
var EXPORTED_SYMBOLS = ["CrashManager", "getCrashManager"];
|
||||
|
||||
/**
|
||||
* How long to wait after application startup before crash event files are
|
||||
|
@ -1545,3 +1545,7 @@ XPCOMUtils.defineLazyGetter(CrashManager, "Singleton", function() {
|
|||
|
||||
return gCrashManager;
|
||||
});
|
||||
|
||||
function getCrashManager() {
|
||||
return CrashManager.Singleton;
|
||||
}
|
||||
|
|
|
@ -12,4 +12,11 @@ Classes = [
|
|||
'constructor': 'CrashService',
|
||||
'categories': {'profile-after-change': 'CrashService'},
|
||||
},
|
||||
{
|
||||
'js_name': 'crashmanager',
|
||||
'cid': '{c887b6a9-a5eb-4566-a440-bebaea3e54fd}',
|
||||
'contract_ids': ['@mozilla.org/crashmanager;1'],
|
||||
'jsm': 'resource://gre/modules/CrashManager.jsm',
|
||||
'constructor': 'getCrashManager',
|
||||
},
|
||||
]
|
||||
|
|
|
@ -6,8 +6,10 @@
|
|||
|
||||
Classes = [
|
||||
{
|
||||
'js_name': 'policies',
|
||||
'cid': '{49e8d8ef-a713-492a-a3d2-5c9dad4ce2e5}',
|
||||
'contract_ids': ['@mozilla.org/enterprisepolicies;1'],
|
||||
'interfaces': ['nsIEnterprisePolicies'],
|
||||
'jsm': 'resource://gre/modules/EnterprisePolicies.jsm',
|
||||
'constructor': 'EnterprisePolicies',
|
||||
},
|
||||
|
|
|
@ -382,7 +382,7 @@ var ExtensionAddonObserver = {
|
|||
|
||||
// If LSNG is not enabled, we need to clear localStorage explicitly using
|
||||
// the old API.
|
||||
if (!Services.lsm.nextGenLocalStorageEnabled) {
|
||||
if (!Services.domStorageManager.nextGenLocalStorageEnabled) {
|
||||
// Clear localStorage created by the extension
|
||||
let storage = Services.domStorageManager.getStorage(
|
||||
null,
|
||||
|
|
|
@ -13,8 +13,10 @@ Classes = [
|
|||
},
|
||||
|
||||
{
|
||||
'js_name': 'intl',
|
||||
'cid': '{35ec195a-e8d0-4300-83af-c8a2cc84b4a3}',
|
||||
'contract_ids': ['@mozilla.org/mozintl;1'],
|
||||
'interfaces': ['mozIMozIntl'],
|
||||
'jsm': 'resource://gre/modules/mozIntl.jsm',
|
||||
'constructor': 'MozIntl',
|
||||
},
|
||||
|
|
|
@ -6,8 +6,10 @@
|
|||
|
||||
Classes = [
|
||||
{
|
||||
'js_name': 'logins',
|
||||
'cid': '{cb9e0de8-3598-4ed7-857b-827f011ad5d8}',
|
||||
'contract_ids': ['@mozilla.org/login-manager;1'],
|
||||
'interfaces': ['nsILoginManager'],
|
||||
'jsm': 'resource://gre/modules/LoginManager.jsm',
|
||||
'constructor': 'LoginManager',
|
||||
},
|
||||
|
|
|
@ -22,8 +22,10 @@ if buildconfig.substs['MOZ_WIDGET_TOOLKIT'] != 'android':
|
|||
'constructor': 'Prompter',
|
||||
},
|
||||
{
|
||||
'js_name': 'prompt',
|
||||
'cid': '{7ad1b327-6dfa-46ec-9234-f2a620ea7e00}',
|
||||
'contract_ids': ['@mozilla.org/embedcomp/prompt-service;1'],
|
||||
'interfaces': ['nsIPromptService'],
|
||||
'jsm': 'resource://gre/modules/Prompter.jsm',
|
||||
'constructor': 'EmbedPrompter',
|
||||
},
|
||||
|
|
|
@ -8,8 +8,10 @@ HAVE_SIDEBAR = buildconfig.substs['MOZ_BUILD_APP'] in ('browser', 'mobile/androi
|
|||
|
||||
Classes = [
|
||||
{
|
||||
'js_name': 'search',
|
||||
'cid': '{7319788a-fe93-4db3-9f39-818cf08f4256}',
|
||||
'contract_ids': ['@mozilla.org/browser/search-service;1'],
|
||||
'interfaces': ['nsISearchService'],
|
||||
'jsm': 'resource://gre/modules/SearchService.jsm',
|
||||
'constructor': 'SearchService',
|
||||
'processes': ProcessSelector.MAIN_PROCESS_ONLY,
|
||||
|
|
|
@ -10,8 +10,10 @@ UnloadFunc = 'mozilla::Telemetry::ShutdownTelemetry'
|
|||
|
||||
Classes = [
|
||||
{
|
||||
'js_name': 'telemetry',
|
||||
'cid': '{aea477f2-b3a2-469c-aa29-0a82d132b829}',
|
||||
'contract_ids': ['@mozilla.org/base/telemetry;1'],
|
||||
'interfaces': ['nsITelemetry'],
|
||||
'singleton': True,
|
||||
'type': 'nsITelemetry',
|
||||
'processes': ProcessSelector.ALLOW_IN_GPU_RDD_VR_AND_SOCKET_PROCESS,
|
||||
|
|
|
@ -37,7 +37,7 @@ add_task(async function() {
|
|||
do_get_profile(true);
|
||||
await TelemetryController.testSetup();
|
||||
|
||||
Services.netUtils.socketProcessTelemetryPing();
|
||||
Services.io.socketProcessTelemetryPing();
|
||||
|
||||
// Once scalars are set by the socket process, they don't immediately get
|
||||
// sent to the parent process. Wait for the Telemetry IPC Timer to trigger
|
||||
|
|
|
@ -6,8 +6,10 @@
|
|||
|
||||
Classes = [
|
||||
{
|
||||
'js_name': 'urlFormatter',
|
||||
'cid': '{e6156350-2be8-11db-a98b-0800200c9a66}',
|
||||
'contract_ids': ['@mozilla.org/toolkit/URLFormatterService;1'],
|
||||
'interfaces': ['nsIURLFormatter'],
|
||||
'jsm': 'resource://gre/modules/URLFormatter.jsm',
|
||||
'constructor': 'nsURLFormatterService',
|
||||
},
|
||||
|
|
|
@ -14,12 +14,21 @@ if defined('MOZ_NEW_XULSTORE'):
|
|||
'singleton': True,
|
||||
'constructor': 'mozilla::XULStore::GetService',
|
||||
},
|
||||
{
|
||||
'js_name': 'xulStore',
|
||||
'cid': '{e8e12dba-b942-4c0d-aa21-2843cfc64529}',
|
||||
'contract_ids': ['@mozilla.org/xul/js-xulstore;1'],
|
||||
'jsm': 'resource://gre/modules/XULStore.jsm',
|
||||
'constructor': 'getXULStore',
|
||||
},
|
||||
]
|
||||
else:
|
||||
Classes = [
|
||||
{
|
||||
'js_name': 'xulStore',
|
||||
'cid': '{6f46b6f4-c8b1-4bd4-a4fa-9ebbed0753ea}',
|
||||
'contract_ids': ['@mozilla.org/xul/xulstore;1'],
|
||||
'interfaces': ['nsIXULStore'],
|
||||
'jsm': 'resource://gre/modules/XULStore.jsm',
|
||||
'constructor': 'XULStore',
|
||||
},
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
// protocol. It also implements the persist() method. JS consumers should use
|
||||
// this module rather than accessing nsIXULStore directly.
|
||||
|
||||
const EXPORTED_SYMBOLS = ["XULStore"];
|
||||
const EXPORTED_SYMBOLS = ["XULStore", "getXULStore"];
|
||||
|
||||
// Services.xulStore loads this module and returns its `XULStore` symbol
|
||||
// when this implementation of XULStore is enabled, so using it here
|
||||
|
@ -99,3 +99,9 @@ class XULStoreEnumerator {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Only here for the sake of component registration, which requires a
|
||||
// callable function.
|
||||
function getXULStore() {
|
||||
return XULStore;
|
||||
}
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
|
||||
Classes = [
|
||||
{
|
||||
'js_name': 'blocklist',
|
||||
'cid': '{66354bc9-7ed1-4692-ae1d-8da97d6b205e}',
|
||||
'contract_ids': ['@mozilla.org/extensions/blocklist;1'],
|
||||
'jsm': 'resource://gre/modules/addonManager.js',
|
||||
|
|
|
@ -11,14 +11,17 @@ else:
|
|||
|
||||
Classes = [
|
||||
{
|
||||
'js_name': 'appinfo',
|
||||
'cid': '{95d89e3e-a169-41a3-8e56-719978e15b12}',
|
||||
'contract_ids': [
|
||||
'@mozilla.org/xre/app-info;1',
|
||||
'@mozilla.org/xre/runtime;1',
|
||||
] + crash_reporter,
|
||||
'interfaces': ['nsIXULRuntime', 'nsIXULAppInfo'],
|
||||
'legacy_constructor': 'mozilla::AppInfoConstructor',
|
||||
'headers': ['nsAppRunner.h'],
|
||||
'processes': ProcessSelector.ALLOW_IN_SOCKET_PROCESS,
|
||||
'overridable': True,
|
||||
},
|
||||
{
|
||||
'cid': '{471f4944-1dd2-11b2-87ac-90be0a51d609}',
|
||||
|
@ -33,11 +36,14 @@ Classes = [
|
|||
'headers': ['/dom/webbrowserpersist/nsWebBrowserPersist.h'],
|
||||
},
|
||||
{
|
||||
'js_name': 'ww',
|
||||
'cid': '{a21bfa01-f349-4394-a84c-8de5cf0737d0}',
|
||||
'contract_ids': ['@mozilla.org/embedcomp/window-watcher;1'],
|
||||
'interfaces': ['nsIWindowWatcher'],
|
||||
'type': 'nsWindowWatcher',
|
||||
'headers': ['nsWindowWatcher.h'],
|
||||
'init_method': 'Init',
|
||||
'overridable': True,
|
||||
},
|
||||
{
|
||||
'cid': '{5573967d-f6cf-4c63-8e0e-9ac06e04d62b}',
|
||||
|
|
|
@ -6,8 +6,10 @@
|
|||
|
||||
Classes = [
|
||||
{
|
||||
'js_name': 'profiler',
|
||||
'cid': '{25db9b8e-8123-4de1-b66d-8bbbedf2cdf4}',
|
||||
'contract_ids': ['@mozilla.org/tools/profiler;1'],
|
||||
'interfaces': ['nsIProfiler'],
|
||||
'type': 'nsProfiler',
|
||||
'headers': ['/tools/profiler/gecko/nsProfiler.h'],
|
||||
'init_method': 'Init',
|
||||
|
|
|
@ -43,11 +43,14 @@ Classes = [
|
|||
'headers': ['/widget/nsTransferable.h'],
|
||||
},
|
||||
{
|
||||
'js_name': 'clipboard',
|
||||
'cid': '{8b5314ba-db01-11d2-96ce-0060b0fb9956}',
|
||||
'contract_ids': ['@mozilla.org/widget/clipboard;1'],
|
||||
'interfaces': ['nsIClipboard'],
|
||||
'type': 'nsClipboard',
|
||||
'headers': ['/widget/android/nsClipboard.h'],
|
||||
'processes': ProcessSelector.MAIN_PROCESS_ONLY,
|
||||
'overridable': True,
|
||||
},
|
||||
{
|
||||
'cid': '{77221d5a-1dd2-11b2-8c69-c710f15d2ed5}',
|
||||
|
@ -89,8 +92,10 @@ Classes = [
|
|||
'init_method': 'Init',
|
||||
},
|
||||
{
|
||||
'js_name': 'androidBridge',
|
||||
'cid': '{0fe2321d-ebd9-467d-a743-03a68d40599e}',
|
||||
'contract_ids': ['@mozilla.org/android/bridge;1'],
|
||||
'interfaces': ['nsIAndroidBridge'],
|
||||
'type': 'nsAndroidBridge',
|
||||
'headers': ['/widget/android/AndroidBridge.h'],
|
||||
},
|
||||
|
|
|
@ -87,10 +87,13 @@ Classes = [
|
|||
if defined('MOZ_X11'):
|
||||
Classes += [
|
||||
{
|
||||
'js_name': 'clipboard',
|
||||
'cid': '{8b5314ba-db01-11d2-96ce-0060b0fb9956}',
|
||||
'contract_ids': ['@mozilla.org/widget/clipboard;1'],
|
||||
'interfaces': ['nsIClipboard'],
|
||||
'type': 'nsIClipboard',
|
||||
'processes': ProcessSelector.MAIN_PROCESS_ONLY,
|
||||
'overridable': True,
|
||||
},
|
||||
{
|
||||
'cid': '{77221d5a-1dd2-11b2-8c69-c710f15d2ed5}',
|
||||
|
|
|
@ -148,10 +148,13 @@ Classes = [
|
|||
'processes': ProcessSelector.MAIN_PROCESS_ONLY,
|
||||
},
|
||||
{
|
||||
'js_name': 'clipboard',
|
||||
'cid': '{8b5314ba-db01-11d2-96ce-0060b0fb9956}',
|
||||
'contract_ids': ['@mozilla.org/widget/clipboard;1'],
|
||||
'interfaces': ['nsIClipboard'],
|
||||
'type': 'nsIClipboard',
|
||||
'processes': ProcessSelector.MAIN_PROCESS_ONLY,
|
||||
'overridable': True,
|
||||
},
|
||||
]
|
||||
|
||||
|
|
|
@ -32,8 +32,10 @@ Classes = [
|
|||
'constructor': 'nsChromeRegistry::GetSingleton',
|
||||
},
|
||||
{
|
||||
'js_name': 'console',
|
||||
'cid': '{7e3ff85c-1dd2-11b2-8d4b-eb452cb0ff40}',
|
||||
'contract_ids': ['@mozilla.org/consoleservice;1'],
|
||||
'interfaces': ['nsIConsoleService'],
|
||||
'type': 'nsConsoleService',
|
||||
'headers': ['/xpcom/base/nsConsoleService.h'],
|
||||
'init_method': 'Init',
|
||||
|
@ -184,15 +186,20 @@ Classes = [
|
|||
'headers': ['nsSupportsPrimitives.h'],
|
||||
},
|
||||
{
|
||||
'js_name': 'sysinfo',
|
||||
'cid': '{d962398a-99e5-49b2-857a-c159049c7f6c}',
|
||||
'contract_ids': ['@mozilla.org/system-info;1'],
|
||||
'interfaces': ['nsIPropertyBag2', 'nsISystemInfo'],
|
||||
'type': 'nsSystemInfo',
|
||||
'headers': ['nsSystemInfo.h'],
|
||||
'init_method': 'Init',
|
||||
'overridable': True,
|
||||
},
|
||||
{
|
||||
'js_name': 'tm',
|
||||
'cid': '{7a4204c6-e45a-4c37-8ebb-6709a22c917c}',
|
||||
'contract_ids': ['@mozilla.org/thread-manager;1'],
|
||||
'interfaces': ['nsIThreadManager'],
|
||||
'legacy_constructor': 'nsThreadManagerGetSingleton',
|
||||
'headers': ['/xpcom/build/XPCOMModule.h'],
|
||||
},
|
||||
|
@ -211,8 +218,10 @@ Classes = [
|
|||
'headers': ['nsVariant.h'],
|
||||
},
|
||||
{
|
||||
'js_name': 'vc',
|
||||
'cid': '{c6e47036-ca94-4be3-963a-9abd8705f7a8}',
|
||||
'contract_ids': ['@mozilla.org/xpcom/version-comparator;1'],
|
||||
'interfaces': ['nsIVersionComparator'],
|
||||
'type': 'nsVersionComparatorImpl',
|
||||
'headers': ['/xpcom/base/nsVersionComparatorImpl.h'],
|
||||
},
|
||||
|
|
|
@ -6,8 +6,10 @@
|
|||
|
||||
Classes = [
|
||||
{
|
||||
'js_name': 'catMan',
|
||||
'cid': '{16d222a6-1dd2-11b2-b693-f38b02c021b2}',
|
||||
'contract_ids': ['@mozilla.org/categorymanager;1'],
|
||||
'interfaces': ['nsICategoryManager'],
|
||||
'legacy_constructor': 'nsCategoryManager::Create',
|
||||
'headers': ['/xpcom/components/nsCategoryManager.h'],
|
||||
'processes': ProcessSelector.ALLOW_IN_GPU_RDD_AND_SOCKET_PROCESS,
|
||||
|
|
|
@ -12,8 +12,10 @@ Classes = [
|
|||
'headers': ['nsArray.h'],
|
||||
},
|
||||
{
|
||||
'js_name': 'obs',
|
||||
'cid': '{d07f5195-e3d1-11d2-8acd-00105a1b8860}',
|
||||
'contract_ids': ['@mozilla.org/observer-service;1'],
|
||||
'interfaces': ['nsIObserverService'],
|
||||
'legacy_constructor': 'nsObserverService::Create',
|
||||
'headers': ['/xpcom/ds/nsObserverService.h'],
|
||||
'processes': ProcessSelector.ALLOW_IN_GPU_RDD_VR_AND_SOCKET_PROCESS,
|
||||
|
|
|
@ -6,8 +6,10 @@
|
|||
|
||||
Classes = [
|
||||
{
|
||||
'js_name': 'dirsvc',
|
||||
'cid': '{f00152d0-b40b-11d3-8c9c-000064657374}',
|
||||
'contract_ids': ['@mozilla.org/file/directory_service;1'],
|
||||
'interfaces': ['nsIDirectoryService', 'nsIProperties'],
|
||||
'legacy_constructor': 'nsDirectoryService::Create',
|
||||
'headers': ['nsDirectoryService.h'],
|
||||
},
|
||||
|
|
|
@ -6,14 +6,18 @@
|
|||
|
||||
Classes = [
|
||||
{
|
||||
'js_name': 'appShell',
|
||||
'cid': '{0099907d-123c-4853-a46a-43098b5fb68c}',
|
||||
'contract_ids': ['@mozilla.org/appshell/appShellService;1'],
|
||||
'interfaces': ['nsIAppShellService'],
|
||||
'type': 'nsAppShellService',
|
||||
'headers': ['/xpfe/appshell/nsAppShellService.h'],
|
||||
},
|
||||
{
|
||||
'js_name': 'wm',
|
||||
'cid': '{79a2b7cc-f05b-4605-bfa0-fac54f27eec8}',
|
||||
'contract_ids': ['@mozilla.org/appshell/window-mediator;1'],
|
||||
'interfaces': ['nsIWindowMediator'],
|
||||
'type': 'nsWindowMediator',
|
||||
'headers': ['/xpfe/appshell/nsWindowMediator.h'],
|
||||
'init_method': 'Init',
|
||||
|
|
Загрузка…
Ссылка в новой задаче