Name Description Size
AboutPagesUtils.sys.mjs 1148
ActorManagerParent.sys.mjs This module handles JavaScript-implemented JSWindowActors, registered through DOM IPC infrastructure, and are fission-compatible. 14925
AppConstants.sys.mjs @returns {boolean} Returns whether the build is a release candidate on the Beta channel. For non-RC builds on the Beta channel, `MOZ_UPDATE_CHANNEL` is "beta", but for RC build's it's "release". See bug 1435753 for more. WARNING: Do not use this value to change Firefox behavior without a strong reason to do so. Any divergence in behavior between Beta and Release, between non-RC Beta and RC Beta, or between RC and Release puts us in a position where we have very limited time to test Release behavior before shipping it. When possible, please use the usual flags for preventing features from riding past pre-release such as `NIGHTLY_BUILD` and `EARLY_BETA_OR_EARLIER`. 8950
AppMenuNotifications.sys.mjs 5301
AsanReporter.sys.mjs -*- indent-tabs-mode: nil; js-indent-level: 2 -*- 4821
AsyncPrefs.sys.mjs 4579
BinarySearch.sys.mjs Returns the index of the given target in the given array or -1 if the target is not found. See search() for a description of this function's parameters. @return The index of `target` in `array` or -1 if `target` is not found. 2524
BrowserTelemetryUtils.sys.mjs -*- mode: js; indent-tabs-mode: nil; js-indent-level: 2 -*- 6704
BrowserUtils.sys.mjs -*- mode: js; indent-tabs-mode: nil; js-indent-level: 2 -*- 17600
CanonicalJSON.jsm Return the canonical JSON form of the passed source, sorting all the object keys recursively. Note that this method will cause an infinite loop if cycles exist in the source (bug 1265357). @param source The elements to be serialized. The output will have all unicode chars escaped with the unicode codepoint as lowercase hexadecimal. @usage CanonicalJSON.stringify(listOfRecords); 2246
CertUtils.sys.mjs Reads a set of expected certificate attributes from preferences. The returned array can be passed to validateCert or checkCert to validate that a certificate matches the expected attributes. The preferences should look like this: prefix.1.attribute1 prefix.1.attribute2 prefix.2.attribute1 etc. Each numeric branch contains a set of required attributes for a single certificate. Having multiple numeric branches means that multiple certificates would be accepted by validateCert. @param aPrefBranch The prefix for all preferences, should end with a ".". @return An array of JS objects with names / values corresponding to the expected certificate's attribute names / values. 7209
Color.sys.mjs A list of minimum contrast ratio's per WCAG 2.0 conformance level. Please refer to section 1.4.3 of the WCAG 2.0 spec at http://www.w3.org/TR/WCAG20/. Simply put: A = Large text only. AA = Regular sized text or large text in enhanced contrast mode. AAA = Regular sized text in enhanced contrast mode. @type {Object} 3698
Console.sys.mjs Define a 'console' API to roughly match the implementation provided by Firebug. This module helps cases where code is shared between the web and Firefox. See also Browser.jsm for an implementation of other web constants to help sharing code between the web and firefox; The API is only be a rough approximation for 3 reasons: - The Firebug console API is implemented in many places with differences in the implementations, so there isn't a single reference to adhere to - The Firebug console is a rich display compared with dump(), so there will be many things that we can't replicate - The primary use of this API is debugging and error logging so the perfect implementation isn't always required (or even well defined) 22600
ContentDOMReference.sys.mjs This module holds weak references to DOM elements that exist within the current content process, and converts them to a unique identifier that can be passed between processes. The identifer, if received by the same content process that issued it, can then be converted back into the DOM element (presuming the element hasn't had all of its other references dropped). The hope is that this module can eliminate the need for passing CPOW references between processes during runtime. 5541
CreditCard.sys.mjs A CreditCard object represents a credit card, with number, name, expiration, network, and CCV. The number is the only required information when creating an object, all other members are optional. The number is validated during construction and will throw if invalid. @param {string} name, optional @param {string} number @param {string} expirationString, optional @param {string|number} expirationMonth, optional @param {string|number} expirationYear, optional @param {string} network, optional @param {string|number} ccv, optional @param {string} encryptedNumber, optional @throws if number is an invalid credit card number 14326
DateTimePickerPanel.sys.mjs 8635
DeferredTask.sys.mjs -*- indent-tabs-mode: nil; js-indent-level: 2 -*- 12677
Deprecated.sys.mjs Build a callstack log message. @param nsIStackFrame aStack A callstack to be converted into a string log message. 2341
docs
E10SUtils.sys.mjs 30524
EventEmitter.sys.mjs Decorate an object with event emitter functionality. @param Object objectToDecorate Bind all public methods of EventEmitter to the objectToDecorate object. 5730
FileUtils.sys.mjs -*- indent-tabs-mode: nil; js-indent-level: 2 -*- 5982
FindBarContent.sys.mjs Please keep in sync with toolkit/content/widgets/findbar.js 2855
Finder.sys.mjs 24045
FinderHighlighter.sys.mjs 72949
FinderIterator.sys.mjs FinderIterator. See the documentation for the `start()` method to learn more. 26463
FinderParent.sys.mjs 18007
FirstStartup.sys.mjs Service for blocking application startup, to be used on the first install. The intended use case is for `FirstStartup` to be invoked when the application is called by an installer, such as the Windows Stub Installer, to allow the application to do some first-install tasks such as performance tuning and downloading critical data. In this scenario, the installer does not exit until the first application window appears, which gives the user experience of the application starting up quickly on first install. 2733
FormLikeFactory.sys.mjs A factory to generate FormLike objects that represent a set of related fields which aren't necessarily marked up with a <form> element. FormLike's emulate the properties of an HTMLFormElement which are relevant to form tasks. 6143
Geometry.sys.mjs Simple Point class. Any method that takes an x and y may also take a point. 9170
GMPExtractorWorker.js eslint-env mozilla/chrome-worker 2911
GMPInstallManager.sys.mjs If downloading from the network fails (AUS server is down), load the sources from local build configuration. 26562
GMPUtils.sys.mjs Checks whether or not a given plugin is hidden. Hidden plugins are neither downloaded nor displayed in the addons manager. @param aPlugin The plugin to check. 8370
HiddenFrame.sys.mjs An hidden frame object. It takes care of creating a windowless browser and passing the window containing a blank XUL <window> back. 3605
Http.sys.mjs aOptions can have a variety of fields: headers, an array of headers postData, this can be: a string: send it as is an array of parameters: encode as form values null/undefined: no POST data. method, GET, POST or PUT (this is set automatically if postData exists). onLoad, a function handle to call when the load is complete, it takes two parameters: the responseText and the XHR object. onError, a function handle to call when an error occcurs, it takes three parameters: the error, the responseText and the XHR object. logger, an object that implements the debug and log methods (e.g. Log.sys.mjs). Headers or post data are given as an array of arrays, for each each inner array the first value is the key and the second is the value, e.g. [["key1", "value1"], ["key2", "value2"]]. 3674
IgnoreLists.sys.mjs Obtains the current ignore list from remote settings. This includes verifying the signature of the ignore list within the database. If the signature in the database is invalid, the database will be wiped and the stored dump will be used, until the settings next update. Note that this may cause a network check of the certificate, but that should generally be quick. @param {boolean} [firstTime] Internal boolean to indicate if this is the first time check or not. @returns {array} An array of objects in the database, or an empty array if none could be obtained. 2814
IndexedDB.sys.mjs -*- Mode: indent-tabs-mode: nil; js-indent-level: 2 -*- 12456
InlineSpellChecker.sys.mjs 18827
InlineSpellCheckerContent.sys.mjs 3318
Integration.sys.mjs Implements low-overhead integration between components of the application. This may have different uses depending on the component, including: - Providing product-specific implementations registered at startup. - Using alternative implementations during unit tests. - Allowing add-ons to change specific behaviors. Components may define one or more integration points, each defined by a root integration object whose properties and methods are the public interface and default implementation of the integration point. For example: const DownloadIntegration = { getTemporaryDirectory() { return "/tmp/"; }, getTemporaryFile(name) { return this.getTemporaryDirectory() + name; }, }; Other parts of the application may register overrides for some or all of the defined properties and methods. The component defining the integration point does not have to be loaded at this stage, because the name of the integration point is the only information required. For example, if the integration point is called "downloads": Integration.downloads.register(base => ({ getTemporaryDirectory() { return base.getTemporaryDirectory.call(this) + "subdir/"; }, })); When the component defining the integration point needs to call a method on the integration object, instead of using it directly the component would use the "getCombined" method to retrieve an object that includes all overrides. For example: let combined = Integration.downloads.getCombined(DownloadIntegration); Assert.is(combined.getTemporaryFile("file"), "/tmp/subdir/file"); Overrides can be registered at startup or at any later time, so each call to "getCombined" may return a different object. The simplest way to create a reference to the combined object that stays updated to the latest version is to define the root object in a JSM and use the "defineModuleGetter" method. *** Registration *** Since the interface is not declared formally, the registrations can happen at startup without loading the component, so they do not affect performance. Hovever, this module does not provide a startup registry, this means that the code that registers and implements the override must be loaded at startup. If performance for the override code is a concern, you can take advantage of the fact that the function used to create the override is called lazily, and include only a stub loader for the final code in an existing startup module. The registration of overrides should be repeated for each process where the relevant integration methods will be called. *** Accessing base methods and properties *** Overrides are included in the prototype chain of the combined object in the same order they were registered, where the first is closest to the root. When defining overrides, you do not need to set the "__proto__" property of the objects you create, because their properties and methods are moved to a new object with the correct prototype. If you do, however, you can call base properties and methods using the "super" keyword. For example: Integration.downloads.register(base => ({ __proto__: base, getTemporaryDirectory() { return super.getTemporaryDirectory() + "subdir/"; }, })); *** State handling *** Storing state directly on the combined integration object using the "this" reference is not recommended. When a new integration is registered, own properties stored on the old combined object are copied to the new combined object using a shallow copy, but the "this" reference for new invocations of the methods will be different. If the root object defines a property that always points to the same object, for example a "state" property, you can safely use it across registrations. Integration overrides provided by restartless add-ons should not use the "this" reference to store state, to avoid conflicts with other add-ons. *** Interaction with XPCOM *** Providing the combined object as an argument to any XPCOM method will generate a console error message, and will throw an exception where possible. For example, you cannot register observers directly on the combined object. This helps preventing mistakes due to the fact that the combined object reference changes when new integration overrides are registered. 10501
jar.mn 266
JSONFile.sys.mjs Handles serialization of the data and persistence into a file. This modules handles the raw data stored in JavaScript serializable objects, and contains no special validation or query logic, that is handled entirely by "storage.js" instead. The data can be manipulated only after it has been loaded from disk. The load process can happen asynchronously, through the "load" method, or synchronously, through "ensureDataReady". After any modification, the "saveSoon" method must be called to flush the data to disk asynchronously. The raw data should be manipulated synchronously, without waiting for the event loop or for promise resolution, so that the saved file is always consistent. This synchronous approach also simplifies the query and update logic. For example, it is possible to find an object and modify it immediately without caring whether other code modifies it in the meantime. An asynchronous shutdown observer makes sure that data is always saved before the browser is closed. The data cannot be modified during shutdown. The file is stored in JSON format, without indentation, using UTF-8 encoding. 16891
JsonSchema.sys.mjs A facade around @cfworker/json-schema that provides additional formats and convenience methods whil executing inside a sandbox. 5274
KeywordUtils.sys.mjs -*- mode: js; indent-tabs-mode: nil; js-indent-level: 2 -*- 3832
LayoutUtils.sys.mjs -*- mode: js; indent-tabs-mode: nil; js-indent-level: 2 -*- 1909
LightweightThemeConsumer.sys.mjs 20558
Log.sys.mjs Dump a message everywhere we can if we have a failure. 19479
moz.build 8572
NewTabUtils.sys.mjs Calculate the MD5 hash for a string. @param aValue The string to convert. @return The base64 representation of the MD5 hash. 69894
NLP.sys.mjs NLP, which stands for Natural Language Processing, is a module that provides an entry point to various methods to interface with human language. At least, that's the goal. Eventually. Right now, the find toolbar only really needs the Levenshtein distance algorithm. 1965
nsIBrowserWindowTracker.idl Return array of browser tabs that are currently visible. 739
nsIE10SUtils.idl C++ exposed interface for the `E10SUtils` object from the `resource://gre/modules/E10SUtils.sys.mjs` module. 1741
nsIRegion.idl The users current region. 622
ObjectUtils.jsm This tests objects & values for deep equality. We check using the most exact approximation of equality between two objects to keep the chance of false positives to a minimum. `JSON.stringify` is not designed to be used for this purpose; objects may have ambiguous `toJSON()` implementations that would influence the test. @param a (mixed) Object or value to be compared. @param b (mixed) Object or value to be compared. @return Boolean Whether the objects are deep equal. 5956
OsEnvironment.sys.mjs -*- js-indent-level: 2; indent-tabs-mode: nil -*- 3121
OSKeyStore.sys.mjs Helpers for using OS Key Store. 13956
PermissionsUtils.sys.mjs Import permissions from perferences to the Permissions Manager. After being imported, all processed permissions will be set to an empty string. Perferences are only processed once during the application's lifetime - it's safe to call this multiple times without worrying about doing unnecessary work, as the preferences branch will only be processed the first time. @param aPrefBranch Preferences branch to import from. The preferences under this branch can specify whitelist (ALLOW_ACTION) or blacklist (DENY_ACTION) additions using perference names of the form: * <BRANCH>.whitelist.add.<ID> * <BRANCH>.blacklist.add.<ID> Where <ID> can be any valid preference name. The value is expected to be a comma separated list of host named. eg: * something.example.com * foo.exmaple.com,bar.example.com @param aPermission Permission name to be passsed to the Permissions Manager. 3449
PopupNotifications.sys.mjs Given a DOM node inside a <popupnotification>, return the parent <popupnotification>. 68235
Preferences.sys.mjs Get the value of a pref, if any; otherwise return the default value. @param prefName {String|Array} the pref to get, or an array of prefs to get @param defaultValue the default value, if any, for prefs that don't have one @param valueType the XPCOM interface of the pref's complex value type, if any @returns the value of the pref, if any; otherwise the default value 14551
PrivateBrowsingUtils.sys.mjs 2459
ProcessType.sys.mjs Converts a key string to a fluent ID defined in processTypes.ftl. 1151
ProfileAge.sys.mjs Traverse the contents of the profile directory, finding the oldest file and returning its creation timestamp. 5920
PromiseUtils.sys.mjs Creates a new pending Promise and provide methods to resolve and reject this Promise. @return {Deferred} an object consisting of a pending Promise "promise" and methods "resolve" and "reject" to change its state. 2323
PropertyListUtils.sys.mjs Module for reading Property Lists (.plist) files ------------------------------------------------ This module functions as a reader for Apple Property Lists (.plist files). It supports both binary and xml formatted property lists. It does not support the legacy ASCII format. Reading of Cocoa's Keyed Archives serialized to binary property lists isn't supported either. Property Lists objects are represented by standard JS and Mozilla types, namely: XML type Cocoa Class Returned type(s) -------------------------------------------------------------------------- <true/> / <false/> NSNumber TYPE_PRIMITIVE boolean <integer> / <real> NSNumber TYPE_PRIMITIVE number TYPE_INT64 String [1] Not Available NSNull TYPE_PRIMITIVE null [2] TYPE_PRIMITIVE undefined [3] <date/> NSDate TYPE_DATE Date <data/> NSData TYPE_UINT8_ARRAY Uint8Array <array/> NSArray TYPE_ARRAY Array Not Available NSSet TYPE_ARRAY Array [2][4] <dict/> NSDictionary TYPE_DICTIONARY Map Use PropertyListUtils.getObjectType to detect the type of a Property list object. ------------- 1) Property lists supports storing U/Int64 numbers, while JS can only handle numbers that are in this limits of float-64 (±2^53). For numbers that do not outbound this limits, simple primitive number are always used. Otherwise, a String object. 2) About NSNull and NSSet values: While the xml format has no support for representing null and set values, the documentation for the binary format states that it supports storing both types. However, the Cocoa APIs for serializing property lists do not seem to support either types (test with NSPropertyListSerialization::propertyList:isValidForFormat). Furthermore, if an array or a dictionary (Map) contains a NSNull or a NSSet value, they cannot be serialized to a property list. As for usage within OS X, not surprisingly there's no known usage of storing either of these types in a property list. It seems that, for now, Apple is keeping the features of binary and xml formats in sync, probably as long as the XML format is not officially deprecated. 3) Not used anywhere. 4) About NSSet representation: For the time being, we represent those theoretical NSSet objects the same way NSArray is represented. While this would most certainly work, it is not the right way to handle it. A more correct representation for a set is a js generator, which would read the set lazily and has no indices semantics. 29711
Region.sys.mjs This module keeps track of the users current region (country). so the SearchService and other consumers can apply region specific customisations. 26929
RemotePageAccessManager.sys.mjs RemotePageAccessManager determines which RPM functions a given about page is allowed to access. It does this based on a map from about page URLs to allowed functions for that page/URL. An RPM function will be exported into the page only if it appears in the access managers's accessMap for that page's uri. This module may be used from both the child and parent process. Please note that prefs that one wants to update need to be explicitly allowed within AsyncPrefs.sys.mjs. 11470
ResetProfile.sys.mjs Check if reset is supported for the currently running profile. @return boolean whether reset is supported. 2611
ResponsivenessMonitor.sys.mjs 938
SelectionUtils.sys.mjs -*- mode: js; indent-tabs-mode: nil; js-indent-level: 2 -*- 5232
ServiceRequest.sys.mjs This module consolidates various code and data update requests, so flags can be set, Telemetry collected, etc. in a central place. 4762
Services.jsm 282
sessionstore
ShortcutUtils.sys.mjs Prettifies the modifier keys for an element. @param Node aElemKey The key element to get the modifiers from. @return string A prettified and properly separated modifier keys string. 12111
Sqlite.sys.mjs Once `true`, reject any attempt to open or close a database. 59769
SubDialog.sys.mjs The SubDialog resize callback. @callback SubDialog~resizeCallback @param {DOMNode} title - The title element of the dialog. @param {xul:browser} frame - The browser frame of the dialog. 37006
subprocess
tests
third_party
Timer.sys.mjs JS module implementation of setTimeout and clearTimeout. 3009
Troubleshoot.sys.mjs 31025
UpdateUtils.sys.mjs Read the update channel from defaults only. We do this to ensure that the channel is tightly coupled with the application and does not apply to other instances of the application that may use the same profile. @param [optional] aIncludePartners Whether or not to include the partner bits. Default: true. 37198
WebChannel.sys.mjs WebChannel is an abstraction that uses the Message Manager and Custom Events to create a two-way communication channel between chrome and content code. 9232
win.xhtml 254
WindowsRegistry.sys.mjs Safely reads a value from the registry. @param aRoot The root registry to use. @param aPath The registry path to the key. @param aKey The key name. @param [aRegistryNode=0] Optionally set to nsIWindowsRegKey.WOW64_64 (or nsIWindowsRegKey.WOW64_32) to access a 64-bit (32-bit) key from either a 32-bit or 64-bit application. @return The key value or undefined if it doesn't exist. If the key is a REG_MULTI_SZ, an array is returned. 2939