зеркало из https://github.com/mozilla/gecko-dev.git
Backed out 3 changesets (bug 1911476) for Doc failure on ExtensionContent.sys . CLOSED TREE
Backed out changeset 7b9ecfe3dbd7 (bug 1911476) Backed out changeset 572021f43119 (bug 1911476) Backed out changeset 902189c3c03b (bug 1911476)
This commit is contained in:
Родитель
f1d110fa32
Коммит
e754b43836
|
@ -1,4 +0,0 @@
|
|||
{
|
||||
"extends": "../tools/@types/tsconfig.json",
|
||||
"include": ["**/*.sys.mjs"]
|
||||
}
|
|
@ -67,7 +67,15 @@ export var GeckoViewConsole = {
|
|||
const consoleMsg = Cc["@mozilla.org/scripterror;1"].createInstance(
|
||||
Ci.nsIScriptError
|
||||
);
|
||||
consoleMsg.init(joinedArguments, null, 0, 0, flag, "content javascript");
|
||||
consoleMsg.init(
|
||||
joinedArguments,
|
||||
null,
|
||||
null,
|
||||
0,
|
||||
0,
|
||||
flag,
|
||||
"content javascript"
|
||||
);
|
||||
Services.console.logMessage(consoleMsg);
|
||||
} else if (aMessage.level == "trace") {
|
||||
const args = aMessage.arguments;
|
||||
|
|
|
@ -3009,6 +3009,7 @@ function ignoreEvent(context, name) {
|
|||
scriptError.init(
|
||||
msg,
|
||||
frame.filename,
|
||||
null,
|
||||
frame.lineNumber,
|
||||
frame.columnNumber,
|
||||
Ci.nsIScriptError.warningFlag,
|
||||
|
|
|
@ -323,26 +323,10 @@ defineLazyGetter(ExtensionChild.prototype, "authorCSSCode", function () {
|
|||
return new CSSCodeCache(Ci.nsIStyleSheetService.AUTHOR_SHEET, this);
|
||||
});
|
||||
|
||||
/**
|
||||
* This is still an ExtensionChild, but with the properties added above.
|
||||
* Unfortunately we can't express that using just JSDocs types locally,
|
||||
* so this needs to be used with `& ExtensionChild` explicitly below.
|
||||
*
|
||||
* @typedef {object} ExtensionChildContent
|
||||
* @property {ScriptCache} staticScripts
|
||||
* @property {ScriptCache} dynamicScripts
|
||||
* @property {ScriptCache} anonStaticScripts
|
||||
* @property {ScriptCache} anonDynamicScripts
|
||||
* @property {CSSCache} userCSS
|
||||
* @property {CSSCache} authorCSS
|
||||
* @property {CSSCodeCache} userCSSCode
|
||||
* @property {CSSCodeCache} authorCSSCode
|
||||
*/
|
||||
|
||||
// Represents a content script.
|
||||
class Script {
|
||||
/**
|
||||
* @param {ExtensionChild & ExtensionChildContent} extension
|
||||
* @param {ExtensionChild} extension
|
||||
* @param {WebExtensionContentScript|object} matcher
|
||||
* An object with a "matchesWindowGlobal" method and content script
|
||||
* execution details. This is usually a plain WebExtensionContentScript
|
||||
|
@ -428,7 +412,6 @@ class Script {
|
|||
};
|
||||
// Note: this logic is similar to this.scriptCaches.get(...), but we are
|
||||
// not using scriptCaches because we don't want the URL to be cached.
|
||||
/** @type {Promise<PrecompiledScript> & {script?: PrecompiledScript}} */
|
||||
let promise = ChromeUtils.compileScript(dataUrl, options);
|
||||
promise.then(script => {
|
||||
promise.script = script;
|
||||
|
@ -778,7 +761,7 @@ class Script {
|
|||
// Represents a user script.
|
||||
class UserScript extends Script {
|
||||
/**
|
||||
* @param {ExtensionChild & ExtensionChildContent} extension
|
||||
* @param {ExtensionChild} extension
|
||||
* @param {WebExtensionContentScript|object} matcher
|
||||
* An object with a "matchesWindowGlobal" method and content script
|
||||
* execution details.
|
||||
|
|
|
@ -1364,7 +1364,7 @@ class RulesetsStore {
|
|||
*
|
||||
* @param {Extension} extension
|
||||
*
|
||||
* @returns {Promise<StoreData|null>}
|
||||
* @returns {Promise<StoreData|void>}
|
||||
*/
|
||||
async #readStoreData(extension) {
|
||||
// TODO(Bug 1803363): record into Glean telemetry DNR RulesetsStore store load time.
|
||||
|
|
|
@ -594,7 +594,7 @@ export var ExtensionPermissions = {
|
|||
export var OriginControls = {
|
||||
/**
|
||||
* @typedef {object} NativeTab
|
||||
* @property {XULBrowserElement} linkedBrowser
|
||||
* @property {MozBrowserElement} linkedBrowser
|
||||
*/
|
||||
|
||||
/**
|
||||
|
|
|
@ -385,12 +385,6 @@ export class MockExtension {
|
|||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {object} options
|
||||
* @param {boolean} [options.expectStopped]
|
||||
* @param {boolean} [options.ignoreDevToolsAttached]
|
||||
* @param {boolean} [options.disableResetIdleForTest]
|
||||
*/
|
||||
async terminateBackground({ expectStopped = true, ...rest } = {}) {
|
||||
const extension = await this._extensionPromise;
|
||||
await extension.terminateBackground(rest);
|
||||
|
|
|
@ -1026,7 +1026,7 @@ class InjectionContext extends Context {
|
|||
/**
|
||||
* Returns the property descriptor for the given entry.
|
||||
*
|
||||
* @param {Entry|Namespace} entry
|
||||
* @param {Entry} entry
|
||||
* The entry instance to return a descriptor for.
|
||||
* @param {object} dest
|
||||
* The object into which this entry is being injected.
|
||||
|
@ -1305,9 +1305,6 @@ const FORMATS = {
|
|||
// properties, functions, and events. An Entry is a base class for
|
||||
// types, properties, functions, and events.
|
||||
class Entry {
|
||||
/** @type {Entry} */
|
||||
fallbackEntry;
|
||||
|
||||
constructor(schema = {}) {
|
||||
/**
|
||||
* If set to any value which evaluates as true, this entry is
|
||||
|
@ -3119,9 +3116,6 @@ const LOADERS = {
|
|||
};
|
||||
|
||||
class Namespace extends Map {
|
||||
/** @type {Entry} */
|
||||
fallbackEntry;
|
||||
|
||||
constructor(root, name, path) {
|
||||
super();
|
||||
|
||||
|
|
|
@ -61,7 +61,7 @@ export var WebNavigationFrames = {
|
|||
// frameId 0 means the top-level frame; anything else is a child frame.
|
||||
let frame = BrowsingContext.get(frameId || bc.id);
|
||||
if (frame && frame.top === bc) {
|
||||
return getFrameDetail(/** @type {CanonicalBrowsingContext} */ (frame));
|
||||
return getFrameDetail(frame);
|
||||
}
|
||||
return null;
|
||||
},
|
||||
|
|
|
@ -91,7 +91,4 @@ interface XULBrowserElement extends XULFrameElement, FrameLoader {
|
|||
remoteType: string;
|
||||
}
|
||||
|
||||
// https://github.com/microsoft/TypeScript-DOM-lib-generator/issues/1736
|
||||
interface Localization {
|
||||
formatValuesSync(aKeys: L10nKey[]): (string | null)[];
|
||||
}
|
||||
type nsQIResult<iid> = import("gecko/lib.gecko.xpcom").nsQIResult<iid>;
|
|
@ -1,3 +1,20 @@
|
|||
/**
|
||||
* Gecko globals.
|
||||
*/
|
||||
declare global {
|
||||
const Cc: nsXPCComponents_Classes;
|
||||
const Ci: nsIXPCComponents_Interfaces;
|
||||
const Cr: nsIXPCComponents_Results;
|
||||
const Components: nsIXPCComponents;
|
||||
|
||||
// Resolve typed generic overloads before the generated ones.
|
||||
const Cu: nsXPCComponents_Utils & nsIXPCComponents_Utils;
|
||||
|
||||
const Glean: GleanImpl;
|
||||
const GleanPings: GleanPingsImpl;
|
||||
const Services: JSServices;
|
||||
const uneval: (any) => string;
|
||||
}
|
||||
|
||||
// Exports for all modules redirected here by a catch-all rule in tsconfig.json.
|
||||
export var
|
||||
|
|
|
@ -1,4 +0,0 @@
|
|||
{
|
||||
"extends": "../tools/@types/tsconfig.json",
|
||||
"include": ["**/*.sys.mjs"]
|
||||
}
|
|
@ -96,6 +96,7 @@ function logScriptError(message) {
|
|||
consoleMessage.init(
|
||||
message,
|
||||
stack.fileName,
|
||||
null,
|
||||
stack.lineNumber,
|
||||
0,
|
||||
Ci.nsIScriptError.errorFlag,
|
||||
|
|
|
@ -94,9 +94,6 @@ with Files("mozapps/preferences/**"):
|
|||
with Files("l10n-registry.manifest"):
|
||||
BUG_COMPONENT = ("Core", "Localization")
|
||||
|
||||
with Files("jsconfig.json"):
|
||||
BUG_COMPONENT = ("Developer Infrastructure", "Lint and Formatting")
|
||||
|
||||
GeneratedFile(
|
||||
"content/neterror/aboutNetErrorCodes.js",
|
||||
script="content/neterror/gen_aboutneterror_codes.py",
|
||||
|
|
|
@ -7,21 +7,3 @@
|
|||
/// <reference types="./lib.gecko.nsresult.d.ts" />
|
||||
/// <reference types="./lib.gecko.services.d.ts" />
|
||||
/// <reference types="./lib.gecko.xpcom.d.ts" />
|
||||
|
||||
/// Order of references matters here, for overriding type signatures.
|
||||
/// <reference types="./lib.gecko.tweaks.d.ts" />
|
||||
|
||||
declare global {
|
||||
const Cc: nsXPCComponents_Classes;
|
||||
const Ci: nsIXPCComponents_Interfaces;
|
||||
const Components: nsIXPCComponents;
|
||||
const Cr: nsIXPCComponents_Results;
|
||||
|
||||
// Resolve typed generic overloads before the generated ones.
|
||||
const Cu: nsXPCComponents_Utils & nsIXPCComponents_Utils;
|
||||
|
||||
const Services: JSServices;
|
||||
const uneval: (any) => string;
|
||||
}
|
||||
|
||||
export {};
|
||||
|
|
|
@ -1,7 +0,0 @@
|
|||
{
|
||||
"compilerOptions": {
|
||||
"noEmit": true,
|
||||
"target": "es2022",
|
||||
"types": ["gecko"]
|
||||
}
|
||||
}
|
|
@ -41,9 +41,6 @@ with Files("tryselect/**"):
|
|||
with Files("tryselect/selectors/release.py"):
|
||||
BUG_COMPONENT = ("Release Engineering", "General")
|
||||
|
||||
with Files("ts/**"):
|
||||
BUG_COMPONENT = ("Developer Infrastructure", "Lint and Formatting")
|
||||
|
||||
with Files("update-packaging/**"):
|
||||
BUG_COMPONENT = ("Release Engineering", "General")
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче