Name Description Size
AboutPagesUtils.jsm 1299
ActorManagerParent.jsm This module handles JavaScript-implemented JSWindowActors, registered through DOM IPC infrastructure, and are fission-compatible. 12531
AppConstants.jsm 7281
AppMenuNotifications.jsm 5440
AsyncPrefs.jsm 4741
BinarySearch.jsm 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. 2574
BrowserTelemetryUtils.jsm -*- mode: js; indent-tabs-mode: nil; js-indent-level: 2 -*- 6816
BrowserUtils.jsm -*- mode: js; indent-tabs-mode: nil; js-indent-level: 2 -*- 4536
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.jsm 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. 7374
Color.jsm 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 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} 3741
Console.jsm 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) 22700
ContentDOMReference.jsm 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. 5648
CreditCard.jsm 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 12666
DateTimePickerPanel.jsm 9510
DeferredTask.jsm -*- indent-tabs-mode: nil; js-indent-level: 2 -*- 12253
Deprecated.jsm Build a callstack log message. @param nsIStackFrame aStack A callstack to be converted into a string log message. 2402
docs 4
E10SUtils.jsm 32484
EventEmitter.jsm Decorate an object with event emitter functionality. @param Object objectToDecorate Bind all public methods of EventEmitter to the objectToDecorate object. 5863
FileUtils.jsm -*- indent-tabs-mode: nil; js-indent-level: 2 -*- 6296
FindBarContent.jsm Please keep in sync with toolkit/content/widgets/findbar.js 3020
Finder.jsm 23724
FinderHighlighter.jsm 71798
FinderIterator.jsm FinderIterator. See the documentation for the `start()` method to learn more. 26612
FinderParent.jsm 18114
FirstStartup.jsm 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. 2847
FormLikeFactory.jsm 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. 6308
Geometry.jsm Simple Point class. Any method that takes an x and y may also take a point. 9199
GMPExtractorWorker.js eslint-env mozilla/chrome-worker 3124
GMPInstallManager.jsm If downloading from the network fails (AUS server is down), load the sources from local build configuration. 19450
GMPUtils.jsm 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. 8345
HiddenFrame.jsm An hidden frame object. It takes care of creating a windowless browser and passing the window containing a blank XUL <window> back. 3750
Http.jsm 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.jsm). 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"]]. 3716
IgnoreLists.jsm 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. 2850
IndexedDB.jsm -*- Mode: indent-tabs-mode: nil; js-indent-level: 2 -*- 12545
InlineSpellChecker.jsm 17818
InlineSpellCheckerContent.jsm 3544
Integration.jsm 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 + "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);"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. 10749 266
JSONFile.jsm 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. 17047
KeywordUtils.jsm -*- mode: js; indent-tabs-mode: nil; js-indent-level: 2 -*- 3810
LayoutUtils.jsm -*- mode: js; indent-tabs-mode: nil; js-indent-level: 2 -*- 1352
LightweightThemeConsumer.jsm 13450
Log.jsm Dump a message everywhere we can if we have a failure. 19229 8253
NewTabUtils.jsm Calculate the MD5 hash for a string. @param aValue The string to convert. @return The base64 representation of the MD5 hash. 68047
NLP.jsm 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. 2006
nsIBrowserWindowTracker.idl Return array of browser tabs that are currently visible. 627
nsIE10SUtils.idl C++ exposed interface for the `E10SUtils` object from the `resource://gre/modules/E10SUtils.jsm` module. 3120
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.jsm -*- js-indent-level: 2; indent-tabs-mode: nil -*- 3142
OSKeyStore.jsm Helpers for using OS Key Store. 13978
PageMenu.jsm 8674
PermissionsUtils.jsm 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: * *, @param aPermission Permission name to be passsed to the Permissions Manager. 3433
PopupNotifications.jsm Given a DOM node inside a <popupnotification>, return the parent <popupnotification>. 68419
Preferences.jsm 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 14666
PrivateBrowsingUtils.jsm 2583
ProcessType.jsm Converts a key string to a fluent ID defined in processTypes.ftl. 1169
ProfileAge.jsm Traverse the contents of the profile directory, finding the oldest file and returning its creation timestamp. 6078
Promise-backend.js -*- indent-tabs-mode: nil; js-indent-level: 2 -*- 33790
Promise.jsm -*- indent-tabs-mode: nil; js-indent-level: 2 -*- 4118
PromiseUtils.jsm 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. 2454
PropertyListUtils.jsm 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. 29953
Region.jsm This module keeps track of the users current region (country). so the SearchService and other consumers can apply region specific customisations. 27000
RemotePageAccessManager.jsm Used for all kinds of permissions checks which requires explicit whitelisting of specific permissions granted through Remote Pages. 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 whitelisted within AsyncPrefs.jsm. 11493
ResetProfile.jsm Check if reset is supported for the currently running profile. @return boolean whether reset is supported. 2846
ResponsivenessMonitor.jsm 997
secondscreen 2
SelectionUtils.jsm -*- mode: js; indent-tabs-mode: nil; js-indent-level: 2 -*- 5365
ServiceRequest.jsm This module consolidates various code and data update requests, so flags can be set, Telemetry collected, etc. in a central place. 1704
Services.jsm 285
sessionstore 4
ShortcutUtils.jsm 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. 12170
Sqlite.jsm Once `true`, reject any attempt to open or close a database. 56615
SubDialog.jsm 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. 35456
subprocess 14
tests 4
third_party 2
Timer.jsm JS module implementation of setTimeout and clearTimeout. 3194
Troubleshoot.jsm Captures a snapshot of data that may help troubleshooters troubleshoot trouble. @param done A function that will be asynchronously called when the snapshot completes. It will be passed the snapshot object. 30824
UpdateUtils.jsm globals fetch 37382
WebChannel.jsm WebChannel is an abstraction that uses the Message Manager and Custom Events to create a two-way communication channel between chrome and content code. 9359
win.xhtml 254
WindowsRegistry.jsm 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. 2992