Backed out two changesets (bug 1442931) for Windows build bustage
authorKris Maglione <maglione.k@gmail.com>
Tue, 06 Mar 2018 20:47:41 -0800
changeset 406836 44b331a2a53d9d12106c1711814ab80a2cd8829e
parent 406835 926f80f2c5ccaa5b0374b48678d62c304cbc9a68
child 406837 608e21fcd1674dae3f8b685cedab85c43ffdb485
push id100523
push usermaglione.k@gmail.com
push dateWed, 07 Mar 2018 04:48:27 +0000
treeherdermozilla-inbound@44b331a2a53d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1442931
milestone60.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Backed out two changesets (bug 1442931) for Windows build bustage MozReview-Commit-ID: EAP1dIdvd8g
dom/bindings/Configuration.py
dom/bindings/mozwebidlcodegen/__init__.py
dom/chrome-webidl/ChannelWrapper.webidl
dom/chrome-webidl/ChromeUtils.webidl
dom/chrome-webidl/DominatorTree.webidl
dom/chrome-webidl/HeapSnapshot.webidl
dom/chrome-webidl/InspectorUtils.webidl
dom/chrome-webidl/MatchGlob.webidl
dom/chrome-webidl/MatchPattern.webidl
dom/chrome-webidl/MozStorageAsyncStatementParams.webidl
dom/chrome-webidl/MozStorageStatementParams.webidl
dom/chrome-webidl/MozStorageStatementRow.webidl
dom/chrome-webidl/PrecompiledScript.webidl
dom/chrome-webidl/PromiseDebugging.webidl
dom/chrome-webidl/StructuredCloneHolder.webidl
dom/chrome-webidl/WebExtensionContentScript.webidl
dom/chrome-webidl/WebExtensionPolicy.webidl
dom/chrome-webidl/moz.build
dom/moz.build
dom/webidl/ChannelWrapper.webidl
dom/webidl/ChromeUtils.webidl
dom/webidl/DominatorTree.webidl
dom/webidl/HeapSnapshot.webidl
dom/webidl/InspectorUtils.webidl
dom/webidl/MatchGlob.webidl
dom/webidl/MatchPattern.webidl
dom/webidl/MozStorageAsyncStatementParams.webidl
dom/webidl/MozStorageStatementParams.webidl
dom/webidl/MozStorageStatementRow.webidl
dom/webidl/PrecompiledScript.webidl
dom/webidl/PromiseDebugging.webidl
dom/webidl/StructuredCloneHolder.webidl
dom/webidl/WebExtensionContentScript.webidl
dom/webidl/WebExtensionPolicy.webidl
dom/webidl/moz.build
--- a/dom/bindings/Configuration.py
+++ b/dom/bindings/Configuration.py
@@ -13,36 +13,29 @@ class DescriptorProvider:
     """
     A way of getting descriptors for interface names.  Subclasses must
     have a getDescriptor method callable with the interface name only.
     """
     def __init__(self):
         pass
 
 
-def isChildPath(path, basePath):
-    return os.path.commonprefix((path, basePath)) == basePath
-
-
 class Configuration(DescriptorProvider):
     """
     Represents global configuration state based on IDL parse data and
     the configuration file.
     """
-    def __init__(self, filename, webRoots, parseData, generatedEvents=[]):
+    def __init__(self, filename, parseData, generatedEvents=[]):
         DescriptorProvider.__init__(self)
 
         # Read the configuration file.
         glbl = {}
         execfile(filename, glbl)
         config = glbl['DOMInterfaces']
 
-        def isInWebIDLRoot(path):
-            return any(isChildPath(path, root) for root in webRoots)
-
         # Build descriptors for all the interfaces we have in the parse data.
         # This allows callers to specify a subset of interfaces by filtering
         # |parseData|.
         self.descriptors = []
         self.interfaces = {}
         self.descriptorsByName = {}
         self.optimizedOutDescriptorNames = set()
         self.generatedEvents = generatedEvents
@@ -96,27 +89,16 @@ class Configuration(DescriptorProvider):
                         raise TypeError(
                             "The binding build system doesn't really support "
                             "partial interfaces which don't appear in the "
                             "file in which the interface they are extending is "
                             "defined.  Don't do this.\n"
                             "%s\n"
                             "%s" %
                             (partialIface.location, iface.location))
-                if not (iface.getExtendedAttribute("ChromeOnly") or
-                        not (iface.hasInterfaceObject() or
-                             iface.isNavigatorProperty()) or
-                        isInWebIDLRoot(iface.filename())):
-                    raise TypeError(
-                        "Interfaces which are exposed to the web may only be "
-                        "defined in a DOM WebIDL root %r. Consider marking "
-                        "the interface [ChromeOnly] if you do not want it "
-                        "exposed to the web.\n"
-                        "%s" %
-                        (webRoots, iface.location))
             self.interfaces[iface.identifier.name] = iface
             if iface.identifier.name not in config:
                 # Completely skip consequential interfaces with no descriptor
                 # if they have no interface object because chances are we
                 # don't need to do anything interesting with them.
                 if iface.isConsequential() and not iface.hasInterfaceObject():
                     self.optimizedOutDescriptorNames.add(iface.identifier.name)
                     continue
--- a/dom/bindings/mozwebidlcodegen/__init__.py
+++ b/dom/bindings/mozwebidlcodegen/__init__.py
@@ -145,17 +145,17 @@ class WebIDLCodegenManager(LoggingMixin)
         'RegisterWorkerBindings.cpp',
         'RegisterWorkerDebuggerBindings.cpp',
         'RegisterWorkletBindings.cpp',
         'ResolveSystemBinding.cpp',
         'UnionTypes.cpp',
         'PrototypeList.cpp',
     }
 
-    def __init__(self, config_path, webidl_root, inputs, exported_header_dir,
+    def __init__(self, config_path, inputs, exported_header_dir,
                  codegen_dir, state_path, cache_dir=None, make_deps_path=None,
                  make_deps_target=None):
         """Create an instance that manages WebIDLs in the build system.
 
         config_path refers to a WebIDL config file (e.g. Bindings.conf).
         inputs is a 4-tuple describing the input .webidl files and how to
         process them. Members are:
             (set(.webidl files), set(basenames of exported files),
@@ -171,17 +171,16 @@ class WebIDLCodegenManager(LoggingMixin)
         make_deps_target is the target that receives the make dependencies. It
         must be defined if using make_deps_path.
         """
         self.populate_logger()
 
         input_paths, exported_stems, generated_events_stems, example_interfaces = inputs
 
         self._config_path = config_path
-        self._webidl_root = webidl_root
         self._input_paths = set(input_paths)
         self._exported_stems = set(exported_stems)
         self._generated_events_stems = set(generated_events_stems)
         self._generated_events_stems_as_array = generated_events_stems
         self._example_interfaces = set(example_interfaces)
         self._exported_header_dir = exported_header_dir
         self._codegen_dir = codegen_dir
         self._state_path = state_path
@@ -328,36 +327,18 @@ class WebIDLCodegenManager(LoggingMixin)
         parser = WebIDL.Parser(self._cache_dir)
 
         for path in sorted(self._input_paths):
             with open(path, 'rb') as fh:
                 data = fh.read()
                 hashes[path] = hashlib.sha1(data).hexdigest()
                 parser.parse(data, path)
 
-        # Only these directories may contain WebIDL files with interfaces
-        # which are exposed to the web. WebIDL files in these roots may not
-        # be changed without DOM peer review.
-        #
-        # Other directories may contain WebIDL files as long as they only
-        # contain ChromeOnly interfaces. These are not subject to mandatory
-        # DOM peer review.
-        web_roots = (
-            # The main WebIDL root.
-            self._webidl_root,
-            # The binding config root, which contains some test-only
-            # interfaces.
-            os.path.dirname(self._config_path),
-            # The objdir sub-directory which contains generated WebIDL files.
-            self._codegen_dir,
-        )
-
         self._parser_results = parser.finish()
-        self._config = Configuration(self._config_path, web_roots,
-                                     self._parser_results,
+        self._config = Configuration(self._config_path, self._parser_results,
                                      self._generated_events_stems_as_array)
         self._input_hashes = hashes
 
     def _write_global_derived(self):
         from Codegen import GlobalGenRoots
 
         things = [('declare', f) for f in self.GLOBAL_DECLARE_FILES]
         things.extend(('define', f) for f in self.GLOBAL_DEFINE_FILES)
@@ -560,34 +541,32 @@ class WebIDLCodegenManager(LoggingMixin)
         else:
             result[2].add(path)
 
 
 def create_build_system_manager(topsrcdir, topobjdir, dist_dir):
     """Create a WebIDLCodegenManager for use by the build system."""
     src_dir = os.path.join(topsrcdir, 'dom', 'bindings')
     obj_dir = os.path.join(topobjdir, 'dom', 'bindings')
-    webidl_root = os.path.join(topsrcdir, 'dom', 'webidl')
 
     with open(os.path.join(obj_dir, 'file-lists.json'), 'rb') as fh:
         files = json.load(fh)
 
     inputs = (files['webidls'], files['exported_stems'],
               files['generated_events_stems'], files['example_interfaces'])
 
     cache_dir = os.path.join(obj_dir, '_cache')
     try:
         os.makedirs(cache_dir)
     except OSError as e:
         if e.errno != errno.EEXIST:
             raise
 
     return WebIDLCodegenManager(
         os.path.join(src_dir, 'Bindings.conf'),
-        webidl_root,
         inputs,
         os.path.join(dist_dir, 'include', 'mozilla', 'dom'),
         obj_dir,
         os.path.join(obj_dir, 'codegen.json'),
         cache_dir=cache_dir,
         # The make rules include a codegen.pp file containing dependencies.
         make_deps_path=os.path.join(obj_dir, 'codegen.pp'),
         make_deps_target='codegen.pp',
deleted file mode 100644
--- a/dom/chrome-webidl/ChannelWrapper.webidl
+++ /dev/null
@@ -1,460 +0,0 @@
-/* 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/. */
-
-interface LoadInfo;
-interface MozChannel;
-interface TabParent;
-interface URI;
-interface nsISupports;
-
-/**
- * Load types that correspond to the external types in nsIContentPolicy.idl.
- * Please also update that IDL when updating this list.
- */
-enum MozContentPolicyType {
-  "main_frame",
-  "sub_frame",
-  "stylesheet",
-  "script",
-  "image",
-  "object",
-  "object_subrequest",
-  "xmlhttprequest",
-  "fetch",
-  "xbl",
-  "xslt",
-  "ping",
-  "beacon",
-  "xml_dtd",
-  "font",
-  "media",
-  "websocket",
-  "csp_report",
-  "imageset",
-  "web_manifest",
-  "other"
-};
-
-/**
- * A thin wrapper around nsIChannel and nsIHttpChannel that allows JS
- * callers to access them without XPConnect overhead.
- */
-[ChromeOnly, Exposed=System]
-interface ChannelWrapper : EventTarget {
-  /**
-   * Returns the wrapper instance for the given channel. The same wrapper is
-   * always returned for a given channel.
-   */
-  static ChannelWrapper get(MozChannel channel);
-
-  /**
-   * A unique ID for for the requests which remains constant throughout the
-   * redirect chain.
-   */
-  [Constant, StoreInSlot]
-  readonly attribute unsigned long long id;
-
-  // Not technically pure, since it's backed by a weak reference, but if JS
-  // has a reference to the previous value, we can depend on it not being
-  // collected.
-  [Pure]
-  attribute MozChannel? channel;
-
-
-  /**
-   * Cancels the request with the given nsresult status code.
-   */
-  [Throws]
-  void cancel(unsigned long result);
-
-  /**
-   * Redirects the wrapped HTTP channel to the given URI. For other channel
-   * types, this method will throw. The redirect is an internal redirect, and
-   * the behavior is the same as nsIHttpChannel.redirectTo.
-   */
-  [Throws]
-  void redirectTo(URI url);
-
-  /**
-   * Requests an upgrade of the HTTP channel to a secure request. For other channel
-   * types, this method will throw. The redirect is an internal redirect, and
-   * the behavior is the same as nsIHttpChannel.upgradeToSecure. Setting this
-   * flag is only effective during the WebRequest.onBeforeRequest in
-   * Web Extensions, calling this at any other point during the request will
-   * have no effect. Setting this flag in addition to calling redirectTo
-   * results in the redirect happening rather than the upgrade request.
-   */
-  [Throws]
-  void upgradeToSecure();
-
-  /**
-   * The content type of the request, usually as read from the Content-Type
-   * header. This should be used in preference to the header to determine the
-   * content type of the channel.
-   */
-  [Pure]
-  attribute ByteString contentType;
-
-
-  /**
-   * For HTTP requests, the request method (e.g., GET, POST, HEAD). For other
-   * request types, returns an empty string.
-   */
-  [Cached, Pure]
-  readonly attribute ByteString method;
-
-  /**
-   * For requests with LoadInfo, the content policy type that corresponds to
-   * the request. For requests without LoadInfo, returns "other".
-   */
-  [Cached, Pure]
-  readonly attribute MozContentPolicyType type;
-
-
-  /**
-   * When true, the request is currently suspended by the wrapper. When false,
-   * the request is not suspended by the wrapper, but may still be suspended
-   * by another caller.
-   */
-  [Pure, SetterThrows]
-  attribute boolean suspended;
-
-
-  /**
-   * The final URI of the channel (as returned by NS_GetFinalChannelURI) after
-   * any redirects have been processed.
-   */
-  [Cached, Pure]
-  readonly attribute URI finalURI;
-
-  /**
-   * The string version of finalURI (but cheaper to access than
-   * finalURI.spec).
-   */
-  [Cached, Pure]
-  readonly attribute DOMString finalURL;
-
-
-  /**
-   * Returns true if the request matches the given request filter, and the
-   * given extension has permission to access it.
-   */
-  boolean matches(optional MozRequestFilter filter,
-                  optional WebExtensionPolicy? extension = null,
-                  optional MozRequestMatchOptions options);
-
-
-  /**
-   * Register's this channel as traceable by the given add-on when accessed
-   * via the process of the given TabParent.
-   */
-  void registerTraceableChannel(WebExtensionPolicy extension, TabParent? tabParent);
-
-  /**
-   * The current HTTP status code of the request. This will be 0 if a response
-   * has not yet been received, or if the request is not an HTTP request.
-   */
-  [Cached, Pure]
-  readonly attribute unsigned long statusCode;
-
-  /**
-   * The HTTP status line for the request (e.g., "HTTP/1.0 200 Success"). This
-   * will be an empty string if a response has not yet been received, or if
-   * the request is not an HTTP request.
-   */
-  [Cached, Pure]
-  readonly attribute ByteString statusLine;
-
-
-  /**
-   * If the request has failed or been canceled, an opaque string representing
-   * the error. For requests that failed at the NSS layer, this is an NSS
-   * error message. For requests that failed for any other reason, it is the
-   * name of an nsresult error code. For requests which haven't failed, this
-   * is null.
-   *
-   * This string is used in the error message when notifying extension
-   * webRequest listeners of failure. The documentation specifically states
-   * that this value MUST NOT be parsed, and is only meant to be displayed to
-   * humans, but we all know how that works in real life.
-   */
-  [Cached, Pure]
-  readonly attribute DOMString? errorString;
-
-  /**
-   * Dispatched when the channel is closed with an error status. Check
-   * errorString for the error details.
-   */
-  attribute EventHandler onerror;
-
-  /**
-   * Checks the request's current status and dispatches an error event if the
-   * request has failed and one has not already been dispatched.
-   */
-  void errorCheck();
-
-
-  /**
-   * Dispatched when the channel begins receiving data.
-   */
-  attribute EventHandler onstart;
-
-  /**
-   * Dispatched when the channel has finished receiving data.
-   */
-  attribute EventHandler onstop;
-
-
-  /**
-   * Information about the proxy server which is handling this request, or
-   * null if the request is not proxied.
-   */
-  [Cached, Frozen, GetterThrows, Pure]
-  readonly attribute MozProxyInfo? proxyInfo;
-
-  /**
-   * For HTTP requests, the IP address of the remote server handling the
-   * request. For other request types, returns null.
-   */
-  [Cached, Pure]
-  readonly attribute ByteString? remoteAddress;
-
-
-  /**
-   * The LoadInfo object for this channel, if available. Null for channels
-   * without load info, until support for those is removed.
-   */
-  [Cached, Pure]
-  readonly attribute LoadInfo? loadInfo;
-
-  /**
-   * True if this load was triggered by a system caller. This currently always
-   * false if the request has no LoadInfo or is a top-level document load.
-   */
-  [Cached, Pure]
-  readonly attribute boolean isSystemLoad;
-
-  /**
-   * The URL of the principal that triggered this load. This is equivalent to
-   * the LoadInfo's triggeringPrincipal, and will only ever be null for
-   * requests without LoadInfo.
-   */
-  [Cached, Pure]
-  readonly attribute ByteString? originURL;
-
-  /**
-   * The URL of the document loading the content for this request. This is
-   * equivalent to the LoadInfo's loadingPrincipal. This may only ever be null
-   * for top-level requests and requests without LoadInfo.
-   */
-  [Cached, Pure]
-  readonly attribute ByteString? documentURL;
-
-  /**
-   * The URI version of originURL. Will be null only when originURL is null.
-   */
-  [Pure]
-  readonly attribute URI? originURI;
-
-  /**
-   * The URI version of documentURL. Will be null only when documentURL is
-   * null.
-   */
-  [Pure]
-  readonly attribute URI? documentURI;
-
-
-  /**
-   * True if extensions may modify this request. This is currently false only
-   * if the request belongs to a document which has access to the
-   * mozAddonManager API.
-   */
-  [Cached, GetterThrows, Pure]
-  readonly attribute boolean canModify;
-
-
-  /**
-   * The outer window ID of the frame that the request belongs to, or 0 if it
-   * is a top-level load or does not belong to a document.
-   */
-  [Cached, Constant]
-  readonly attribute long long windowId;
-
-  /**
-   * The outer window ID of the parent frame of the window that the request
-   * belongs to, 0 if that parent frame is the top-level frame, and -1 if the
-   * request belongs to a top-level frame.
-   */
-  [Cached, Constant]
-  readonly attribute long long parentWindowId;
-
-  /**
-   * For cross-process requests, the <browser> or <iframe> element to which the
-   * content loading this request belongs. For requests that don't originate
-   * from a remote browser, this is null.
-   */
-  [Cached, Pure]
-  readonly attribute nsISupports? browserElement;
-
-  /**
-   * Returns an array of objects that combine the url and frameId from the
-   * ancestorPrincipals and ancestorOuterWindowIDs on loadInfo.
-   * The immediate parent is the first entry, the last entry is always the top
-   * level frame.  It will be an empty list for toplevel window loads and
-   * non-subdocument resource loads within a toplevel window.  For the latter,
-   * originURL will provide information on what window is doing the load.  It
-   * will be null if the request is not associated with a window (e.g. XHR with
-   * mozBackgroundRequest = true).
-   */
-  [Cached, Frozen, GetterThrows, Pure]
-  readonly attribute sequence<MozFrameAncestorInfo>? frameAncestors;
-
-  /**
-   * For HTTP requests, returns an array of request headers which will be, or
-   * have been, sent with this request.
-   *
-   * For non-HTTP requests, throws NS_ERROR_UNEXPECTED.
-   */
-  [Throws]
-  sequence<MozHTTPHeader> getRequestHeaders();
-
-  /**
-   * For HTTP requests, returns an array of response headers which were
-   * received for this request, in the same format as returned by
-   * getRequestHeaders.
-
-   * Throws NS_ERROR_NOT_AVAILABLE if a response has not yet been received, or
-   * NS_ERROR_UNEXPECTED if the channel is not an HTTP channel.
-   *
-   * Note: The Content-Type header is handled specially. That header is
-   * usually not mutable after the request has been received, and the content
-   * type must instead be changed via the contentType attribute. If a caller
-   * attempts to set the Content-Type header via setRequestHeader, however,
-   * that value is assigned to the contentType attribute and its original
-   * string value is cached. That original value is returned in place of the
-   * actual Content-Type header.
-   */
-  [Throws]
-  sequence<MozHTTPHeader> getResponseHeaders();
-
-  /**
-   * Sets the given request header to the given value, overwriting any
-   * previous value. Setting a header to a null string has the effect of
-   * removing it.  If merge is true, then the passed value will be merged
-   * to any existing value that exists for the header. Otherwise, any prior
-   * value for the header will be overwritten. Merge is ignored for headers
-   * that cannot be merged.
-   *
-   * For non-HTTP requests, throws NS_ERROR_UNEXPECTED.
-   */
-  [Throws]
-  void setRequestHeader(ByteString header,
-                        ByteString value,
-                        optional boolean merge = false);
-
-  /**
-   * Sets the given response header to the given value, overwriting any
-   * previous value. Setting a header to a null string has the effect of
-   * removing it.  If merge is true, then the passed value will be merged
-   * to any existing value that exists for the header (e.g. handling multiple
-   * Set-Cookie headers).  Otherwise, any prior value for the header will be
-   * overwritten. Merge is ignored for headers that cannot be merged.
-   *
-   * For non-HTTP requests, throws NS_ERROR_UNEXPECTED.
-   *
-   * Note: The content type header is handled specially by this function. See
-   * getResponseHeaders() for details.
-   */
-  [Throws]
-  void setResponseHeader(ByteString header,
-                         ByteString value,
-                         optional boolean merge = false);
-};
-
-/**
- * Information about the proxy server handing a request. This is approximately
- * equivalent to nsIProxyInfo.
- */
-dictionary MozProxyInfo {
-  /**
-   * The hostname of the server.
-   */
-  required ByteString host;
-  /**
-   * The TCP port of the server.
-   */
-  required long port;
-  /**
-   * The type of proxy (e.g., HTTP, SOCKS).
-   */
-  required ByteString type;
-
-  /**
-   * True if the proxy is responsible for DNS lookups.
-   */
-  required boolean proxyDNS;
-
-  /**
-   * The authentication username for the proxy, if any.
-   */
-  ByteString? username = null;
-
-  /**
-   * The timeout, in seconds, before the network stack will failover to the
-   * next candidate proxy server if it has not received a response.
-   */
-  unsigned long failoverTimeout;
-};
-
-/**
- * MozFrameAncestorInfo combines loadInfo::AncestorPrincipals with
- * loadInfo::AncestorOuterWindowIDs for easier access in the WebRequest API.
- *
- * url represents the parent of the loading window.
- * frameId is the outerWindowID for the parent of the loading window.
- *
- * For further details see nsILoadInfo.idl and nsIDocument::AncestorPrincipals.
- */
-dictionary MozFrameAncestorInfo {
-  required ByteString url;
-  required unsigned long long frameId;
-};
-
-/**
- * Represents an HTTP request or response header.
- */
-dictionary MozHTTPHeader {
-  /**
-   * The case-insensitive, non-case-normalized header name.
-   */
-  required ByteString name;
-  /**
-   * The header value.
-   */
-  required ByteString value;
-};
-
-/**
- * An object used for filtering requests.
- */
-dictionary MozRequestFilter {
-  /**
-   * If present, the request only matches if its `type` attribute matches one
-   * of the given types.
-   */
-  sequence<MozContentPolicyType>? types = null;
-
-  /**
-   * If present, the request only matches if its finalURI matches the given
-   * match pattern set.
-   */
-  MatchPatternSet? urls = null;
-};
-
-dictionary MozRequestMatchOptions {
-  /**
-   * True if we're matching for the proxy portion of a proxied request.
-   */
-  boolean isProxy = false;
-};
deleted file mode 100644
--- a/dom/chrome-webidl/ChromeUtils.webidl
+++ /dev/null
@@ -1,421 +0,0 @@
-/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* 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/.
- */
-
-/**
- * A collection of static utility methods that are only exposed to system code.
- * This is exposed in all the system globals where we can expose stuff by
- * default, so should only include methods that are **thread-safe**.
- */
-[ChromeOnly, Exposed=(Window,System,Worker)]
-namespace ChromeUtils {
-  /**
-   * Serialize a snapshot of the heap graph, as seen by |JS::ubi::Node| and
-   * restricted by |boundaries|, and write it to the provided file path.
-   *
-   * @param boundaries        The portion of the heap graph to write.
-   *
-   * @returns                 The path to the file the heap snapshot was written
-   *                          to. This is guaranteed to be within the temp
-   *                          directory and its file name will match the regexp
-   *                          `\d+(\-\d+)?\.fxsnapshot`.
-   */
-  [Throws]
-  DOMString saveHeapSnapshot(optional HeapSnapshotBoundaries boundaries);
-
-  /**
-   * This is the same as saveHeapSnapshot, but with a different return value.
-   *
-   * @returns                 The snapshot ID of the file. This is the file name
-   *                          without the temp directory or the trailing
-   *                          `.fxsnapshot`.
-   */
-  [Throws]
-  DOMString saveHeapSnapshotGetId(optional HeapSnapshotBoundaries boundaries);
-
-  /**
-   * Deserialize a core dump into a HeapSnapshot.
-   *
-   * @param filePath          The file path to read the heap snapshot from.
-   */
-  [Throws, NewObject]
-  HeapSnapshot readHeapSnapshot(DOMString filePath);
-
-  /**
-   * Return the keys in a weak map.  This operation is
-   * non-deterministic because it is affected by the scheduling of the
-   * garbage collector and the cycle collector.
-   *
-   * @param aMap weak map or other JavaScript value
-   * @returns If aMap is a weak map object, return the keys of the weak
-   *          map as an array.  Otherwise, return undefined.
-   */
-  [Throws, NewObject]
-  any nondeterministicGetWeakMapKeys(any map);
-
-  /**
-   * Return the keys in a weak set.  This operation is
-   * non-deterministic because it is affected by the scheduling of the
-   * garbage collector and the cycle collector.
-   *
-   * @param aSet weak set or other JavaScript value
-   * @returns If aSet is a weak set object, return the keys of the weak
-   *          set as an array.  Otherwise, return undefined.
-   */
-  [Throws, NewObject]
-  any nondeterministicGetWeakSetKeys(any aSet);
-
-  /**
-   * Converts a buffer to a Base64 URL-encoded string per RFC 4648.
-   *
-   * @param source The buffer to encode.
-   * @param options Additional encoding options.
-   * @returns The encoded string.
-   */
-  [Throws]
-  ByteString base64URLEncode(BufferSource source,
-                             Base64URLEncodeOptions options);
-
-  /**
-   * Decodes a Base64 URL-encoded string per RFC 4648.
-   *
-   * @param string The string to decode.
-   * @param options Additional decoding options.
-   * @returns The decoded buffer.
-   */
-  [Throws, NewObject]
-  ArrayBuffer base64URLDecode(ByteString string,
-                              Base64URLDecodeOptions options);
-
-#ifdef NIGHTLY_BUILD
-
-  /**
-   * If the chrome code has thrown a JavaScript Dev Error
-   * in the current JSRuntime. the first such error, or `undefined`
-   * otherwise.
-   *
-   * A JavaScript Dev Error is an exception thrown by JavaScript
-   * code that matches both conditions:
-   * - it was thrown by chrome code;
-   * - it is either a `ReferenceError`, a `TypeError` or a `SyntaxError`.
-   *
-   * Such errors are stored regardless of whether they have been
-   * caught.
-   *
-   * This mechanism is designed to help ensure that the code of
-   * Firefox is free from Dev Errors, even if they are accidentally
-   * caught by clients.
-   *
-   * The object returned is not an exception. It has fields:
-   * - DOMString stack
-   * - DOMString filename
-   * - DOMString lineNumber
-   * - DOMString message
-   */
-  [Throws]
-  readonly attribute any recentJSDevError;
-
-  /**
-   * Reset `recentJSDevError` to `undefined` for the current JSRuntime.
-   */
-  void clearRecentJSDevError();
-#endif // NIGHTLY_BUILD
-
-  /**
-   * IF YOU ADD NEW METHODS HERE, MAKE SURE THEY ARE THREAD-SAFE.
-   */
-};
-
-/**
- * Additional ChromeUtils methods that are _not_ thread-safe, and hence not
- * exposed in workers.
- */
-[Exposed=(Window,System)]
-partial namespace ChromeUtils {
-  /**
-   * A helper that converts OriginAttributesDictionary to a opaque suffix string.
-   *
-   * @param originAttrs       The originAttributes from the caller.
-   */
-  ByteString
-  originAttributesToSuffix(optional OriginAttributesDictionary originAttrs);
-
-  /**
-   * Returns true if the members of |originAttrs| match the provided members
-   * of |pattern|.
-   *
-   * @param originAttrs       The originAttributes under consideration.
-   * @param pattern           The pattern to use for matching.
-   */
-  boolean
-  originAttributesMatchPattern(optional OriginAttributesDictionary originAttrs,
-                               optional OriginAttributesPatternDictionary pattern);
-
-  /**
-   * Returns an OriginAttributesDictionary with values from the |origin| suffix
-   * and unspecified attributes added and assigned default values.
-   *
-   * @param origin            The origin URI to create from.
-   * @returns                 An OriginAttributesDictionary with values from
-   *                          the origin suffix and unspecified attributes
-   *                          added and assigned default values.
-   */
-  [Throws]
-  OriginAttributesDictionary
-  createOriginAttributesFromOrigin(DOMString origin);
-
-  /**
-   * Returns an OriginAttributesDictionary that is a copy of |originAttrs| with
-   * unspecified attributes added and assigned default values.
-   *
-   * @param originAttrs       The origin attributes to copy.
-   * @returns                 An OriginAttributesDictionary copy of |originAttrs|
-   *                          with unspecified attributes added and assigned
-   *                          default values.
-   */
-  OriginAttributesDictionary
-  fillNonDefaultOriginAttributes(optional OriginAttributesDictionary originAttrs);
-
-  /**
-   * Returns true if the 2 OriginAttributes are equal.
-   */
-  boolean
-  isOriginAttributesEqual(optional OriginAttributesDictionary aA,
-                          optional OriginAttributesDictionary aB);
-
-  /**
-   * Loads and compiles the script at the given URL and returns an object
-   * which may be used to execute it repeatedly, in different globals, without
-   * re-parsing.
-   */
-  [NewObject]
-  Promise<PrecompiledScript>
-  compileScript(DOMString url, optional CompileScriptOptionsDictionary options);
-
-  /**
-   * Waive Xray on a given value. Identity op for primitives.
-   */
-  [Throws]
-  any waiveXrays(any val);
-
-  /**
-   * Strip off Xray waivers on a given value. Identity op for primitives.
-   */
-  [Throws]
-  any unwaiveXrays(any val);
-
-  /**
-   * Gets the name of the JSClass of the object.
-   *
-   * if |unwrap| is true, all wrappers are unwrapped first. Unless you're
-   * specifically trying to detect whether the object is a proxy, this is
-   * probably what you want.
-   */
-  DOMString getClassName(object obj, optional boolean unwrap = true);
-
-  /**
-   * Clones the properties of the given object into a new object in the given
-   * target compartment (or the caller compartment if no target is provided).
-   * Property values themeselves are not cloned.
-   *
-   * Ignores non-enumerable properties, properties on prototypes, and properties
-   * with getters or setters.
-   */
-  [Throws]
-  object shallowClone(object obj, optional object? target = null);
-
-  /**
-   * Dispatches the given callback to the main thread when it would be
-   * otherwise idle. Similar to Window.requestIdleCallback, but not bound to a
-   * particular DOM windw.
-   */
-  [Throws]
-  void idleDispatch(IdleRequestCallback callback,
-                    optional IdleRequestOptions options);
-
-  /**
-   * Synchronously loads and evaluates the js file located at
-   * 'aResourceURI' with a new, fully privileged global object.
-   *
-   * If 'aTargetObj' is specified and null, this method just returns
-   * the module's global object. Otherwise (if 'aTargetObj' is not
-   * specified, or 'aTargetObj' is != null) looks for a property
-   * 'EXPORTED_SYMBOLS' on the new global object. 'EXPORTED_SYMBOLS'
-   * is expected to be an array of strings identifying properties on
-   * the global object.  These properties will be installed as
-   * properties on 'targetObj', or, if 'aTargetObj' is not specified,
-   * on the caller's global object. If 'EXPORTED_SYMBOLS' is not
-   * found, an error is thrown.
-   *
-   * @param aResourceURI A resource:// URI string to load the module from.
-   * @param aTargetObj the object to install the exported properties on or null.
-   * @returns the module code's global object.
-   *
-   * The implementation maintains a hash of aResourceURI->global obj.
-   * Subsequent invocations of import with 'aResourceURI' pointing to
-   * the same file will not cause the module to be re-evaluated, but
-   * the symbols in EXPORTED_SYMBOLS will be exported into the
-   * specified target object and the global object returned as above.
-   */
-  [Throws]
-  object import(DOMString aResourceURI, optional object? aTargetObj);
-
-  /**
-   * Defines a property on the given target which lazily imports a JavaScript
-   * module when accessed.
-   *
-   * The first time the property is accessed, the module at the given URL is
-   * imported, and the property is replaced with the module's exported symbol
-   * of the same name.
-   *
-   * Some points to note when using this utility:
-   *
-   * - The cached module export is always stored on the `this` object that was
-   *   used to access the getter. This means that if you define the lazy
-   *   getter on a prototype, the module will be re-imported every time the
-   *   property is accessed on a new instance.
-   *
-   * - The getter property may be overwritten by simple assignment, but as
-   *   with imports, the new property value is always defined on the `this`
-   *   object that the setter is called with.
-   *
-   * - If the module import fails, the getter will throw an error, and the
-   *   property will not be replaced. Each subsequent attempt to access the
-   *   getter will attempt to re-import the object, which will likely continue
-   *   to result in errors.
-   *
-   * @param target The target object on which to define the property.
-   * @param id The name of the property to define, and of the symbol to
-   *           import.
-   * @param resourceURI The resource URI of the module, as passed to
-   *                    ChromeUtils.import.
-   */
-  [Throws]
-  void defineModuleGetter(object target, DOMString id, DOMString resourceURI);
-
-  /**
-   * Returns the scripted location of the first ancestor stack frame with a
-   * principal which is subsumed by the given principal. If no such frame
-   * exists on the call stack, returns null.
-   */
-  object? getCallerLocation(Principal principal);
-
-  /**
-   * Creates a JS Error object with the given message and stack.
-   *
-   * If a stack object is provided, the error object is created in the global
-   * that it belongs to.
-   */
-  [Throws]
-  object createError(DOMString message, optional object? stack = null);
-};
-
-/**
- * Used by principals and the script security manager to represent origin
- * attributes. The first dictionary is designed to contain the full set of
- * OriginAttributes, the second is used for pattern-matching (i.e. does this
- * OriginAttributesDictionary match the non-empty attributes in this pattern).
- *
- * IMPORTANT: If you add any members here, you need to do the following:
- * (1) Add them to both dictionaries.
- * (2) Update the methods on mozilla::OriginAttributes, including equality,
- *     serialization, deserialization, and inheritance.
- * (3) Update the methods on mozilla::OriginAttributesPattern, including matching.
- */
-dictionary OriginAttributesDictionary {
-  unsigned long appId = 0;
-  unsigned long userContextId = 0;
-  boolean inIsolatedMozBrowser = false;
-  unsigned long privateBrowsingId = 0;
-  DOMString firstPartyDomain = "";
-};
-dictionary OriginAttributesPatternDictionary {
-  unsigned long appId;
-  unsigned long userContextId;
-  boolean inIsolatedMozBrowser;
-  unsigned long privateBrowsingId;
-  DOMString firstPartyDomain;
-};
-
-dictionary CompileScriptOptionsDictionary {
-  /**
-   * The character set from which to decode the script.
-   */
-  DOMString charset = "utf-8";
-
-  /**
-   * If true, certain parts of the script may be parsed lazily, the first time
-   * they are used, rather than eagerly parsed at load time.
-   */
-  boolean lazilyParse = false;
-
-  /**
-   * If true, the script will be compiled so that its last expression will be
-   * returned as the value of its execution. This makes certain types of
-   * optimization impossible, and disables the JIT in many circumstances, so
-   * should not be used when not absolutely necessary.
-   */
-  boolean hasReturnValue = false;
-};
-
-/**
- * A JS object whose properties specify what portion of the heap graph to
- * write. The recognized properties are:
- *
- * * globals: [ global, ... ]
- *   Dump only nodes that either:
- *   - belong in the compartment of one of the given globals;
- *   - belong to no compartment, but do belong to a Zone that contains one of
- *     the given globals;
- *   - are referred to directly by one of the last two kinds of nodes; or
- *   - is the fictional root node, described below.
- *
- * * debugger: Debugger object
- *   Like "globals", but use the Debugger's debuggees as the globals.
- *
- * * runtime: true
- *   Dump the entire heap graph, starting with the JSRuntime's roots.
- *
- * One, and only one, of these properties must exist on the boundaries object.
- *
- * The root of the dumped graph is a fictional node whose ubi::Node type name is
- * "CoreDumpRoot". If we are dumping the entire ubi::Node graph, this root node
- * has an edge for each of the JSRuntime's roots. If we are dumping a selected
- * set of globals, the root has an edge to each global, and an edge for each
- * incoming JS reference to the selected Zones.
- */
-dictionary HeapSnapshotBoundaries {
-  sequence<object> globals;
-  object           debugger;
-  boolean          runtime;
-};
-
-dictionary Base64URLEncodeOptions {
-  /** Specifies whether the output should be padded with "=" characters. */
-  required boolean pad;
-};
-
-enum Base64URLDecodePadding {
-  /**
-   * Fails decoding if the input is unpadded. RFC 4648, section 3.2 requires
-   * padding, unless the referring specification prohibits it.
-   */
-  "require",
-
-  /** Tolerates padded and unpadded input. */
-  "ignore",
-
-  /**
-   * Fails decoding if the input is padded. This follows the strict base64url
-   * variant used in JWS (RFC 7515, Appendix C) and HTTP Encrypted
-   * Content-Encoding (draft-ietf-httpbis-encryption-encoding-01).
-   */
-  "reject"
-};
-
-dictionary Base64URLDecodeOptions {
-  /** Specifies the padding mode for decoding the input. */
-  required Base64URLDecodePadding padding;
-};
deleted file mode 100644
--- a/dom/chrome-webidl/DominatorTree.webidl
+++ /dev/null
@@ -1,70 +0,0 @@
-/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* 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/.
- */
-
-typedef unsigned long long NodeId;
-typedef unsigned long long NodeSize;
-
-/**
- * In a directed graph with a root node `R`, a node `A` is said to "dominate" a
- * node `B` iff every path from `R` to `B` contains `A`. A node `A` is said to
- * be the "immediate dominator" of a node `B` iff it dominates `B`, is not `B`
- * itself, and does not dominate any other nodes which also dominate `B` in
- * turn.
- *
- * If we take every node from a graph `G` and create a new graph `T` with edges
- * to each node from its immediate dominator, then `T` is a tree (each node has
- * only one immediate dominator, or none if it is the root). This tree is called
- * a "dominator tree".
- *
- * This interface represents a dominator tree constructed from a HeapSnapshot's
- * heap graph. The domination relationship and dominator trees are useful tools
- * for analyzing heap graphs because they tell you:
- *
- *   - Exactly what could be reclaimed by the GC if some node `A` became
- *     unreachable: those nodes which are dominated by `A`,
- *
- *   - The "retained size" of a node in the heap graph, in contrast to its
- *     "shallow size". The "shallow size" is the space taken by a node itself,
- *     not counting anything it references. The "retained size" of a node is its
- *     shallow size plus the size of all the things that would be collected if
- *     the original node wasn't (directly or indirectly) referencing them. In
- *     other words, the retained size is the shallow size of a node plus the
- *     shallow sizes of every other node it dominates. For example, the root
- *     node in a binary tree might have a small shallow size that does not take
- *     up much space itself, but it dominates the rest of the binary tree and
- *     its retained size is therefore significant (assuming no external
- *     references into the tree).
- */
-[ChromeOnly, Exposed=(Window,System,Worker)]
-interface DominatorTree {
-  /**
-   * The `NodeId` for the root of the dominator tree. This is a "meta-root" in
-   * that it has an edge to each GC root in the heap snapshot this dominator
-   * tree was created from.
-   */
-  readonly attribute NodeId root;
-
-  /**
-   * Get the retained size of the node with the given id. If given an invalid
-   * id, null is returned. Throws an error on OOM.
-   */
-  [Throws]
-  NodeSize? getRetainedSize(NodeId node);
-
-  /**
-   * Get the set of ids of nodes immediately dominated by the node with the
-   * given id. The resulting array is sorted by greatest to least retained
-   * size. If given an invalid id, null is returned. Throws an error on OOM.
-   */
-  [Throws]
-  sequence<NodeId>? getImmediatelyDominated(NodeId node);
-
-  /**
-   * Get the immediate dominator of the node with the given id. Returns null if
-   * given an invalid id, or the id of the root node.
-   */
-  NodeId? getImmediateDominator(NodeId node);
-};
deleted file mode 100644
--- a/dom/chrome-webidl/HeapSnapshot.webidl
+++ /dev/null
@@ -1,105 +0,0 @@
-/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* 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/.
- */
-
-/**
- * A HeapSnapshot represents a snapshot of the heap graph
- */
-[ChromeOnly, Exposed=(Window,System,Worker)]
-interface HeapSnapshot {
-  /**
-   * A time stamp of when the heap snapshot was taken, if available. Units are
-   * microseconds since midnight (00:00:00) 1 January 1970 UTC.
-   */
-  readonly attribute unsigned long long? creationTime;
-
-  /**
-   * Take a census of the heap snapshot.
-   *
-   * This is the same as |Debugger.Memory.prototype.takeCensus|, but operates on
-   * the offline heap snapshot's serialized heap graph rather than the live heap
-   * graph. The same optional configuration options that can be passed to that
-   * function can be passed here.
-   *
-   * The returned value is determined by the `"breakdown"` option used, and is
-   * usually a `Map`, `Object`, or `Array`. For example, the following breakdown
-   *
-   *     {
-   *       by: "coarseType",
-   *       objects: { by: "objectClass" },
-   *       other:   { by: "internalType" }
-   *     }
-   *
-   * produces a result like this:
-   *
-   *     {
-   *       "objects": {
-   *         "Function":         { "count": 404, "bytes": 37328 },
-   *         "Object":           { "count": 11,  "bytes": 1264 },
-   *         "Debugger":         { "count": 1,   "bytes": 416 },
-   *         "ScriptSource":     { "count": 1,   "bytes": 64 },
-   *         // ... omitted for brevity...
-   *       },
-   *       "scripts":            { "count": 1,   "bytes": 0 },
-   *       "strings":            { "count": 701, "bytes": 49080 },
-   *       "other": {
-   *         "js::Shape":        { "count": 450, "bytes": 0 },
-   *         "js::BaseShape":    { "count": 21,  "bytes": 0 },
-   *         "js::ObjectGroup":  { "count": 17,  "bytes": 0 }
-   *       }
-   *     }
-   *
-   * See the `takeCensus` section of the `js/src/doc/Debugger/Debugger.Memory.md`
-   * file for detailed documentation.
-   */
-  [Throws]
-  any takeCensus(object? options);
-
-  /**
-   * Describe `node` with the specified `breakdown`. See the comment above
-   * `takeCensus` or `js/src/doc/Debugger/Debugger.Memory.md` for detailed
-   * documentation on breakdowns.
-   *
-   * Throws an error when `node` is not the id of a node in the heap snapshot,
-   * or if the breakdown is invalid.
-   */
-  [Throws]
-  any describeNode(object breakdown, NodeId node);
-
-  /**
-   * Compute the dominator tree for this heap snapshot.
-   *
-   * @see DominatorTree.webidl
-   */
-  [Throws]
-  DominatorTree computeDominatorTree();
-
-  /**
-   * Find the shortest retaining paths from the node associated with the ID
-   * `start` to each node associated with the IDs in `targets`. Find at most
-   * `maxNumPaths` retaining paths for each target node.
-   *
-   * The return value is a Map object mapping from each target node ID to an
-   * array of retaining paths. The array may be empty if we did not find any
-   * retaining paths.
-   *
-   * A path is an array of objects of the form:
-   *
-   *     {
-   *         predecessor: <node ID>,
-   *         edge: <string or null>,
-   *     }
-   *
-   * The first `predecessor` will always be `start`. The last edge in the path
-   * leads to the `target` node that is mapped to the path; the `target` does
-   * not appear as a `predecessor` in the path.
-   *
-   * Throws when `start` or any of the elements of `targets` are not an ID of a
-   * node in the snapshot, or if we encounter an out of memory exception.
-   */
-  [Throws]
-  object computeShortestPaths(NodeId start, sequence<NodeId> targets,
-                              unsigned long long maxNumPaths);
-};
deleted file mode 100644
--- a/dom/chrome-webidl/InspectorUtils.webidl
+++ /dev/null
@@ -1,162 +0,0 @@
-/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* 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/.
- */
-
-/**
- * A collection of utility methods for use by devtools.
- *
- * See InspectorUtils.h for documentation on these methods.
- */
-[ChromeOnly]
-namespace InspectorUtils {
-  sequence<StyleSheet> getAllStyleSheets(Document document);
-  sequence<CSSRule> getCSSStyleRules(
-    Element element,
-    [TreatNullAs=EmptyString] optional DOMString pseudo = "");
-  unsigned long getRuleLine(CSSRule rule);
-  unsigned long getRuleColumn(CSSRule rule);
-  unsigned long getRelativeRuleLine(CSSRule rule);
-  boolean hasRulesModifiedByCSSOM(CSSStyleSheet sheet);
-  [NewObject] CSSLexer getCSSLexer(DOMString text);
-  unsigned long getSelectorCount(CSSStyleRule rule);
-  [Throws] DOMString getSelectorText(CSSStyleRule rule,
-                                     unsigned long selectorIndex);
-  [Throws] unsigned long long getSpecificity(CSSStyleRule rule,
-                                             unsigned long selectorIndex);
-  [Throws] boolean selectorMatchesElement(
-      Element element,
-      CSSStyleRule rule,
-      unsigned long selectorIndex,
-      [TreatNullAs=EmptyString] optional DOMString pseudo = "");
-  boolean isInheritedProperty(DOMString property);
-  sequence<DOMString> getCSSPropertyNames(optional PropertyNamesOptions options);
-  [Throws] sequence<DOMString> getCSSValuesForProperty(DOMString property);
-  [Throws] DOMString rgbToColorName(octet r, octet g, octet b);
-  InspectorRGBATuple? colorToRGBA(DOMString colorString);
-  boolean isValidCSSColor(DOMString colorString);
-  [Throws] sequence<DOMString> getSubpropertiesForCSSProperty(DOMString property);
-  [Throws] boolean cssPropertyIsShorthand(DOMString property);
-
-  // TODO: Change this to use an enum.
-  const unsigned long TYPE_LENGTH = 0;
-  const unsigned long TYPE_PERCENTAGE = 1;
-  const unsigned long TYPE_COLOR = 2;
-  const unsigned long TYPE_URL = 3;
-  const unsigned long TYPE_ANGLE = 4;
-  const unsigned long TYPE_FREQUENCY = 5;
-  const unsigned long TYPE_TIME = 6;
-  const unsigned long TYPE_GRADIENT = 7;
-  const unsigned long TYPE_TIMING_FUNCTION = 8;
-  const unsigned long TYPE_IMAGE_RECT = 9;
-  const unsigned long TYPE_NUMBER = 10;
-  [Throws] boolean cssPropertySupportsType(DOMString property, unsigned long type);
-
-  boolean isIgnorableWhitespace(CharacterData dataNode);
-  Node? getParentForNode(Node node, boolean showingAnonymousContent);
-  [NewObject] NodeList getChildrenForNode(Node node,
-                                          boolean showingAnonymousContent);
-  sequence<DOMString> getBindingURLs(Element element);
-  [Throws] boolean setContentState(Element element, unsigned long long state);
-  [Throws] boolean removeContentState(
-      Element element,
-      unsigned long long state,
-      optional boolean clearActiveDocument = false);
-  unsigned long long getContentState(Element element);
-
-  // Get the font face(s) actually used to render the text in /range/,
-  // as a collection of InspectorFontFace objects (below).
-  // If /maxRanges/ is greater than zero, each InspectorFontFace will record
-  // up to /maxRanges/ fragments of content that used the face, for the caller
-  // to access via its .ranges attribute.
-  [NewObject, Throws] sequence<InspectorFontFace> getUsedFontFaces(
-      Range range,
-      optional unsigned long maxRanges = 0);
-
-  sequence<DOMString> getCSSPseudoElementNames();
-  void addPseudoClassLock(Element element,
-                          DOMString pseudoClass,
-                          optional boolean enabled = true);
-  void removePseudoClassLock(Element element, DOMString pseudoClass);
-  boolean hasPseudoClassLock(Element element, DOMString pseudoClass);
-  void clearPseudoClassLocks(Element element);
-  [Throws] void parseStyleSheet(CSSStyleSheet sheet, DOMString input);
-  void scrollElementIntoView(Element element);
-};
-
-dictionary PropertyNamesOptions {
-  boolean includeAliases = false;
-};
-
-dictionary InspectorRGBATuple {
-  /*
-   * NOTE: This tuple is in the normal 0-255-sized RGB space but can be
-   * fractional and may extend outside the 0-255 range.
-   *
-   * a is in the range 0 - 1.
-   */
-  double r = 0;
-  double g = 0;
-  double b = 0;
-  double a = 1;
-};
-
-dictionary InspectorVariationAxis {
-  required DOMString tag;
-  required DOMString name;
-  required float minValue;
-  required float maxValue;
-  required float defaultValue;
-};
-
-dictionary InspectorVariationValue {
-  required DOMString axis;
-  required float value;
-};
-
-dictionary InspectorVariationInstance {
-  required DOMString name;
-  required sequence<InspectorVariationValue> values;
-};
-
-dictionary InspectorFontFeature {
-  required DOMString tag;
-  required DOMString script;
-  required DOMString languageSystem;
-};
-
-[ChromeOnly]
-interface InspectorFontFace {
-  // An indication of how we found this font during font-matching.
-  // Note that the same physical font may have been found in multiple ways within a range.
-  readonly attribute boolean fromFontGroup;
-  readonly attribute boolean fromLanguagePrefs;
-  readonly attribute boolean fromSystemFallback;
-
-  // available for all fonts
-  readonly attribute DOMString name; // full font name as obtained from the font resource
-  readonly attribute DOMString CSSFamilyName; // a family name that could be used in CSS font-family
-                                              // (not necessarily the actual name that was used,
-                                              // due to aliases, generics, localized names, etc)
-
-  [NewObject,Throws] sequence<InspectorVariationAxis> getVariationAxes();
-  [NewObject,Throws] sequence<InspectorVariationInstance> getVariationInstances();
-  [NewObject,Throws] sequence<InspectorFontFeature> getFeatures();
-
-  // A list of Ranges of text rendered with this face.
-  // This will list the first /maxRanges/ ranges found when InspectorUtils.getUsedFontFaces
-  // was called (so it will be empty unless a non-zero maxRanges argument was passed).
-  // Note that this indicates how the document was rendered at the time of calling
-  // getUsedFontFaces; it does not reflect any subsequent modifications, so if styles
-  // have been modified since calling getUsedFontFaces, it may no longer be accurate.
-  [Constant,Cached]  readonly attribute sequence<Range> ranges;
-
-  // meaningful only when the font is a user font defined using @font-face
-  readonly attribute CSSFontFaceRule? rule; // null if no associated @font-face rule
-  readonly attribute long srcIndex; // index in the rule's src list, -1 if no @font-face rule
-  readonly attribute DOMString URI; // empty string if not a downloaded font, i.e. local
-  readonly attribute DOMString localName; // empty string  if not a src:local(...) rule
-  readonly attribute DOMString format; // as per http://www.w3.org/TR/css3-webfonts/#referencing
-  readonly attribute DOMString metadata; // XML metadata from WOFF file (if any)
-};
deleted file mode 100644
--- a/dom/chrome-webidl/MatchGlob.webidl
+++ /dev/null
@@ -1,24 +0,0 @@
-/* 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/. */
-
-/**
- * Represents a simple glob pattern matcher. Any occurrence of "*" in the glob
- * pattern matches any literal string of characters in the string being
- * compared. Additionally, if created with `allowQuestion = true`, any
- * occurrence of "?" in the glob matches any single literal character.
- */
-[Constructor(DOMString glob, optional boolean allowQuestion = true),
- ChromeOnly, Exposed=(Window,System)]
-interface MatchGlob {
-  /**
-   * Returns true if the string matches the glob.
-   */
-  boolean matches(DOMString string);
-
-  /**
-   * The glob string this MatchGlob represents.
-   */
-  [Constant]
-  readonly attribute DOMString glob;
-};
deleted file mode 100644
--- a/dom/chrome-webidl/MatchPattern.webidl
+++ /dev/null
@@ -1,128 +0,0 @@
-/* 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/. */
-
-interface Cookie;
-interface URI;
-
-/**
- * A URL match pattern as used by the WebExtension and Chrome extension APIs.
- *
- * A match pattern is a string with one of the following formats:
- *
- *  - "<all_urls>"
- *    The literal string "<all_urls>" matches any URL with a supported
- *    protocol.
- *
- *  - <proto>://<host>/<path>
- *    A URL pattern with the following placeholders:
- *
- *    - <proto>
- *      The protocol to match, or "*" to match either "http" or "https".
- *    - <host>
- *      The hostname to match. May be either a complete, literal hostname to
- *      match a specific host, the wildcard character "*", to match any host,
- *      or a subdomain pattern, with "*." followed by a domain name, to match
- *      that domain name or any subdomain thereof.
- *    - <path>
- *      A glob pattern for paths to match. A "*" may appear anywhere within
- *      the path, and will match any string of characters. If no "*" appears,
- *      the URL path must exactly match the pattern path.
- */
-[Constructor(DOMString pattern, optional MatchPatternOptions options),
- ChromeOnly, Exposed=(Window,System)]
-interface MatchPattern {
-  /**
-   * Returns true if the given URI matches the pattern.
-   *
-   * If explicit is true, only explicit domain matches, without wildcards, are
-   * considered.
-   */
-  [Throws]
-  boolean matches(URI uri, optional boolean explicit = false);
-
-  [Throws]
-  boolean matches(DOMString url, optional boolean explicit = false);
-
-  /**
-   * Returns true if a URL exists which a) would be able to access the given
-   * cookie, and b) would be matched by this match pattern.
-   */
-  boolean matchesCookie(Cookie cookie);
-
-  /**
-   * Returns true if this pattern will match any host which would be matched
-   * by the given pattern.
-   */
-  boolean subsumes(MatchPattern pattern);
-
-  /**
-   * Returns true if there is any host which would be matched by both this
-   * pattern and the given pattern.
-   */
-  boolean overlaps(MatchPattern pattern);
-
-  /**
-   * The match pattern string represented by this pattern.
-   */
-  [Constant]
-  readonly attribute DOMString pattern;
-};
-
-/**
- * A set of MatchPattern objects, which implements the MatchPattern API and
- * matches when any of its sub-patterns matches.
- */
-[Constructor(sequence<(DOMString or MatchPattern)> patterns, optional MatchPatternOptions options),
- ChromeOnly, Exposed=(Window,System)]
-interface MatchPatternSet {
-  /**
-   * Returns true if the given URI matches any sub-pattern.
-   *
-   * If explicit is true, only explicit domain matches, without wildcards, are
-   * considered.
-   */
-  [Throws]
-  boolean matches(URI uri, optional boolean explicit = false);
-
-  [Throws]
-  boolean matches(DOMString url, optional boolean explicit = false);
-
-  /**
-   * Returns true if any sub-pattern matches the given cookie.
-   */
-  boolean matchesCookie(Cookie cookie);
-
-  /**
-   * Returns true if any sub-pattern subsumes the given pattern.
-   */
-  boolean subsumes(MatchPattern pattern);
-
-  /**
-   * Returns true if any sub-pattern overlaps the given pattern.
-   */
-  boolean overlaps(MatchPattern pattern);
-
-  /**
-   * Returns true if any sub-pattern overlaps any sub-pattern the given
-   * pattern set.
-   */
-  boolean overlaps(MatchPatternSet patternSet);
-
-  /**
-   * Returns true if any sub-pattern overlaps *every* sub-pattern in the given
-   * pattern set.
-   */
-  boolean overlapsAll(MatchPatternSet patternSet);
-
-  [Cached, Constant, Frozen]
-  readonly attribute sequence<MatchPattern> patterns;
-};
-
-dictionary MatchPatternOptions {
-  /**
-   * If true, the path portion of the pattern is ignored, and replaced with a
-   * wildcard. The `pattern` property is updated to reflect this.
-   */
-  boolean ignorePath = false;
-};
deleted file mode 100644
--- a/dom/chrome-webidl/MozStorageAsyncStatementParams.webidl
+++ /dev/null
@@ -1,22 +0,0 @@
-/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* 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/. */
-
-[ChromeOnly]
-interface MozStorageAsyncStatementParams
-{
-  readonly attribute unsigned long length;
-
-  [Throws]
-  getter any(unsigned long index);
-
-  [Throws]
-  getter any(DOMString name);
-
-  [Throws]
-  setter void(unsigned long index, any arg);
-
-  [Throws]
-  setter void(DOMString name, any arg);
-};
deleted file mode 100644
--- a/dom/chrome-webidl/MozStorageStatementParams.webidl
+++ /dev/null
@@ -1,22 +0,0 @@
-/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* 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/. */
-
-[ChromeOnly]
-interface MozStorageStatementParams
-{
-  readonly attribute unsigned long length;
-
-  [Throws]
-  getter any(unsigned long index);
-
-  [Throws]
-  getter any(DOMString name);
-
-  [Throws]
-  setter void(unsigned long index, any arg);
-
-  [Throws]
-  setter void(DOMString name, any arg);
-};
deleted file mode 100644
--- a/dom/chrome-webidl/MozStorageStatementRow.webidl
+++ /dev/null
@@ -1,11 +0,0 @@
-/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* 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/. */
-
-[ChromeOnly]
-interface MozStorageStatementRow
-{
-  [Throws]
-  getter any(DOMString name);
-};
deleted file mode 100644
--- a/dom/chrome-webidl/PrecompiledScript.webidl
+++ /dev/null
@@ -1,33 +0,0 @@
-/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* 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/.
- */
-
-/**
- * Represents a pre-compiled JS script, which can be repeatedly executed in
- * different globals without being re-parsed.
- */
-[ChromeOnly, Exposed=(Window,System)]
-interface PrecompiledScript {
-  /**
-   * Executes the script in the context of, and with the security principal
-   * of, the given object's global. If compiled with a return value, returns
-   * the value of the script's last expression. Otherwise returns undefined.
-   */
-  [Throws]
-  any executeInGlobal(object global);
-
-  /**
-   * The URL that the script was loaded from.
-   */
-  [Pure]
-  readonly attribute DOMString url;
-
-  /**
-   * True if the script was compiled with a return value, and will return the
-   * value of its last expression when executed.
-   */
-  [Pure]
-  readonly attribute boolean hasReturnValue;
-};
deleted file mode 100644
--- a/dom/chrome-webidl/PromiseDebugging.webidl
+++ /dev/null
@@ -1,108 +0,0 @@
-/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* 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/.
- */
-
-/* This is a utility namespace for promise-debugging functionality */
-
-
-dictionary PromiseDebuggingStateHolder {
-  PromiseDebuggingState state = "pending";
-  any value;
-  any reason;
-};
-enum PromiseDebuggingState { "pending", "fulfilled", "rejected" };
-
-/**
- * An observer for Promise that _may_ be leaking uncaught rejections.
- *
- * It is generally a programming error to leave a Promise rejected and
- * not consume its rejection. The information exposed by this
- * interface is designed to allow clients to track down such Promise,
- * i.e. Promise that are currently
- * - in `rejected` state;
- * - last of their chain.
- *
- * Note, however, that a promise in such a state at the end of a tick
- * may eventually be consumed in some ulterior tick. Implementers of
- * this interface are responsible for presenting the information
- * in a meaningful manner.
- */
-callback interface UncaughtRejectionObserver {
-  /**
-   * A Promise has been left in `rejected` state and is the
-   * last in its chain.
-   *
-   * @param p A currently uncaught Promise. If `p` is is eventually
-   * caught, i.e. if its `then` callback is called, `onConsumed` will
-   * be called.
-   */
-  void onLeftUncaught(object p);
-
-  /**
-   * A Promise previously left uncaught is not the last in its
-   * chain anymore.
-   *
-   * @param p A Promise that was previously left in uncaught state is
-   * now caught, i.e. it is not the last in its chain anymore.
-   */
-  void onConsumed(object p);
-};
-
-[ChromeOnly, Exposed=(Window,System)]
-interface PromiseDebugging {
-  /**
-   * The various functions on this interface all expect to take promises but
-   * don't want the WebIDL behavior of assimilating random passed-in objects
-   * into promises.  They also want to treat Promise subclass instances as
-   * promises instead of wrapping them in a vanilla Promise, which is what the
-   * IDL spec says to do.  So we list all our arguments as "object" instead of
-   * "Promise" and check for them being a Promise internally.
-   */
-
-  /**
-   * Get the current state of the given promise.
-   */
-  [Throws]
-  static PromiseDebuggingStateHolder getState(object p);
-
-  /**
-   * Return an identifier for a promise. This identifier is guaranteed
-   * to be unique to the current process.
-   */
-  [Throws]
-  static DOMString getPromiseID(object p);
-
-  /**
-   * Return the stack to the promise's allocation point.  This can
-   * return null if the promise was not created from script.
-   */
-  [Throws]
-  static object? getAllocationStack(object p);
-
-  /**
-   * Return the stack to the promise's rejection point, if the
-   * rejection happened from script.  This can return null if the
-   * promise has not been rejected or was not rejected from script.
-   */
-  [Throws]
-  static object? getRejectionStack(object p);
-
-  /**
-   * Return the stack to the promise's fulfillment point, if the
-   * fulfillment happened from script.  This can return null if the
-   * promise has not been fulfilled or was not fulfilled from script.
-   */
-  [Throws]
-  static object? getFullfillmentStack(object p);
-
-  /**
-   * Watching uncaught rejections on the current thread.
-   *
-   * Adding an observer twice will cause it to be notified twice
-   * of events.
-   */
-  static void addUncaughtRejectionObserver(UncaughtRejectionObserver o);
-  static boolean removeUncaughtRejectionObserver(UncaughtRejectionObserver o);
-};
deleted file mode 100644
--- a/dom/chrome-webidl/StructuredCloneHolder.webidl
+++ /dev/null
@@ -1,27 +0,0 @@
-/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* 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/.
- */
-
-/**
- * A holder for structured-clonable data which can itself be cloned with
- * little overhead, and deserialized into an arbitrary global.
- */
-[ChromeOnly, Exposed=(Window,System,Worker),
- /**
-  * Serializes the given value to an opaque structured clone blob, and
-  * returns the result.
-  *
-  * The serialization happens in the compartment of the given global or, if no
-  * global is provided, the compartment of the data value.
-  */
- Constructor(any data, optional object? global = null)]
-interface StructuredCloneHolder {
-  /**
-   * Deserializes the structured clone data in the scope of the given global,
-   * and returns the result.
-   */
-  [Throws]
-  any deserialize(object global);
-};
deleted file mode 100644
--- a/dom/chrome-webidl/WebExtensionContentScript.webidl
+++ /dev/null
@@ -1,163 +0,0 @@
-/* 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/. */
-
-interface LoadInfo;
-interface URI;
-interface WindowProxy;
-
-/**
- * Describes the earliest point in the load cycle at which a script should
- * run.
- */
-enum ContentScriptRunAt {
-  /**
-   * The point in the load cycle just after the document element has been
-   * inserted, before any page scripts have been allowed to run.
-   */
-  "document_start",
-  /**
-   * The point after which the page DOM has fully loaded, but before all page
-   * resources have necessarily been loaded. Corresponds approximately to the
-   * DOMContentLoaded event.
-   */
-  "document_end",
-  /**
-   * The first point after the page and all of its resources has fully loaded
-   * when the event loop is idle, and can run scripts without delaying a paint
-   * event.
-   */
-  "document_idle",
-};
-
-[Constructor(WebExtensionPolicy extension, WebExtensionContentScriptInit options), ChromeOnly, Exposed=System]
-interface WebExtensionContentScript {
-  /**
-   * Returns true if the script's match and exclude patterns match the given
-   * URI, without reference to attributes such as `allFrames`.
-   */
-  boolean matchesURI(URI uri);
-
-  /**
-   * Returns true if the script matches the given URI and LoadInfo objects.
-   * This should be used to determine whether to begin pre-loading a content
-   * script based on network events.
-   */
-  boolean matchesLoadInfo(URI uri, LoadInfo loadInfo);
-
-  /**
-   * Returns true if the script matches the given window. This should be used
-   * to determine whether to run a script in a window at load time.
-   */
-  boolean matchesWindow(WindowProxy window);
-
-  /**
-   * The policy object for the extension that this script belongs to.
-   */
-  [Constant]
-  readonly attribute WebExtensionPolicy extension;
-
-  /**
-   * If true, this script runs in all frames. If false, it only runs in
-   * top-level frames.
-   */
-  [Constant]
-  readonly attribute boolean allFrames;
-
-  /**
-   * If true, this (misleadingly-named, but inherited from Chrome) attribute
-   * causes the script to run in frames with URLs which inherit a principal
-   * that matches one of the match patterns, such as about:blank or
-   * about:srcdoc. If false, the script only runs in frames with an explicit
-   * matching URL.
-   */
-  [Constant]
-  readonly attribute boolean matchAboutBlank;
-
-  /**
-   * The earliest point in the load cycle at which this script should run. For
-   * static content scripts, in extensions which were present at browser
-   * startup, the browser makes every effort to make sure that the script runs
-   * no later than this point in the load cycle. For dynamic content scripts,
-   * and scripts from extensions installed during this session, the scripts
-   * may run at a later point.
-   */
-  [Constant]
-  readonly attribute ContentScriptRunAt runAt;
-
-  /**
-   * The outer window ID of the frame in which to run the script, or 0 if it
-   * should run in the top-level frame. Should only be used for
-   * dynamically-injected scripts.
-   */
-  [Constant]
-  readonly attribute unsigned long long? frameID;
-
-  /**
-   * The set of match patterns for URIs of pages in which this script should
-   * run. This attribute is mandatory, and is a prerequisite for all other
-   * match patterns.
-   */
-  [Constant]
-  readonly attribute MatchPatternSet matches;
-
-  /**
-   * A set of match patterns for URLs in which this script should not run,
-   * even if they match other include patterns or globs.
-   */
-  [Constant]
-  readonly attribute MatchPatternSet? excludeMatches;
-
-  /**
-   * A set of glob matchers for URLs in which this script should run. If this
-   * list is present, the script will only run in URLs which match the
-   * `matches` pattern as well as one of these globs.
-   */
-  [Cached, Constant, Frozen]
-  readonly attribute sequence<MatchGlob>? includeGlobs;
-
-  /**
-   * A set of glob matchers for URLs in which this script should not run, even
-   * if they match other include patterns or globs.
-   */
-  [Cached, Constant, Frozen]
-  readonly attribute sequence<MatchGlob>? excludeGlobs;
-
-  /**
-   * A set of paths, relative to the extension root, of CSS sheets to inject
-   * into matching pages.
-   */
-  [Cached, Constant, Frozen]
-  readonly attribute sequence<DOMString> cssPaths;
-
-  /**
-   * A set of paths, relative to the extension root, of JavaScript scripts to
-   * execute in matching pages.
-   */
-  [Cached, Constant, Frozen]
-  readonly attribute sequence<DOMString> jsPaths;
-};
-
-dictionary WebExtensionContentScriptInit {
-  boolean allFrames = false;
-
-  boolean matchAboutBlank = false;
-
-  ContentScriptRunAt runAt = "document_idle";
-
-  unsigned long long? frameID = null;
-
-  boolean hasActiveTabPermission = false;
-
-  required MatchPatternSet matches;
-
-  MatchPatternSet? excludeMatches = null;
-
-  sequence<MatchGlob>? includeGlobs = null;
-
-  sequence<MatchGlob>? excludeGlobs = null;
-
-  sequence<DOMString> cssPaths = [];
-
-  sequence<DOMString> jsPaths = [];
-};
deleted file mode 100644
--- a/dom/chrome-webidl/WebExtensionPolicy.webidl
+++ /dev/null
@@ -1,185 +0,0 @@
-/* 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/. */
-
-interface URI;
-interface WindowProxy;
-
-callback WebExtensionLocalizeCallback = DOMString (DOMString unlocalizedText);
-
-/**
- * Defines the platform-level policies for a WebExtension, including its
- * permissions and the characteristics of its moz-extension: URLs.
- */
-[Constructor(WebExtensionInit options), ChromeOnly, Exposed=System]
-interface WebExtensionPolicy {
-  /**
-   * The add-on's internal ID, as specified in its manifest.json file or its
-   * XPI signature.
-   */
-  [Constant, StoreInSlot]
-  readonly attribute DOMString id;
-
-  /**
-   * The hostname part of the extension's moz-extension: URLs. This value is
-   * generated randomly at install time.
-   */
-  [Constant, StoreInSlot]
-  readonly attribute ByteString mozExtensionHostname;
-
-  /**
-   * The file: or jar: URL to use for the base of the extension's
-   * moz-extension: URL root.
-   */
-  [Constant]
-  readonly attribute ByteString baseURL;
-
-  /**
-   * The extension's user-visible name.
-   */
-  [Constant]
-  readonly attribute DOMString name;
-
-  /**
-   * The content security policy string to apply to all pages loaded from the
-   * extension's moz-extension: protocol.
-   */
-  [Constant]
-  readonly attribute DOMString contentSecurityPolicy;
-
-
-  /**
-   * The list of currently-active permissions for the extension, as specified
-   * in its manifest.json file. May be updated to reflect changes in the
-   * extension's optional permissions.
-   */
-  [Cached, Frozen, Pure]
-  attribute sequence<DOMString> permissions;
-
-  /**
-   * Match patterns for the set of web origins to which the extension is
-   * currently allowed access. May be updated to reflect changes in the
-   * extension's optional permissions.
-   */
-  [Pure]
-  attribute MatchPatternSet allowedOrigins;
-
-  /**
-   * The set of content scripts active for this extension.
-   */
-  [Cached, Frozen, Pure]
-  readonly attribute sequence<WebExtensionContentScript> contentScripts;
-
-  /**
-   * True if the extension is currently active, false otherwise. When active,
-   * the extension's moz-extension: protocol will point to the given baseURI,
-   * and the set of policies for this object will be active for its ID.
-   *
-   * Only one extension policy with a given ID or hostname may be active at a
-   * time. Attempting to activate a policy while a conflicting policy is
-   * active will raise an error.
-   */
-  [Affects=Everything, SetterThrows]
-  attribute boolean active;
-
-  /**
-   * True if both e10s and webextensions.remote are enabled.  This must be
-   * used instead of checking the remote pref directly since remote extensions
-   * require both to be enabled.
-   */
-  static readonly attribute boolean useRemoteWebExtensions;
-
-  /**
-   * True if the calling process is an extension process.
-   */
-  static readonly attribute boolean isExtensionProcess;
-
-  /**
-   * Returns true if the extension has cross-origin access to the given URI.
-   */
-  boolean canAccessURI(URI uri, optional boolean explicit = false);
-
-  /**
-   * Returns true if the extension currently has the given permission.
-   */
-  boolean hasPermission(DOMString permission);
-
-  /**
-   * Returns true if the given path relative to the extension's moz-extension:
-   * URL root may be accessed by web content.
-   */
-  boolean isPathWebAccessible(DOMString pathname);
-
-  /**
-   * Replaces localization placeholders in the given string with localized
-   * text from the extension's currently active locale.
-   */
-  DOMString localize(DOMString unlocalizedText);
-
-  /**
-   * Returns the moz-extension: URL for the given path.
-   */
-  [Throws]
-  DOMString getURL(optional DOMString path = "");
-
-  /**
-   * Register a new content script programmatically.
-   */
-  [Throws]
-  void registerContentScript(WebExtensionContentScript script);
-
-  /**
-   * Unregister a content script.
-   */
-  [Throws]
-  void unregisterContentScript(WebExtensionContentScript script);
-
-  /**
-   * Returns the list of currently active extension policies.
-   */
-  static sequence<WebExtensionPolicy> getActiveExtensions();
-
-  /**
-   * Returns the currently-active policy for the extension with the given ID,
-   * or null if no policy is active for that ID.
-   */
-  static WebExtensionPolicy? getByID(DOMString id);
-
-  /**
-   * Returns the currently-active policy for the extension with the given
-   * moz-extension: hostname, or null if no policy is active for that
-   * hostname.
-   */
-  static WebExtensionPolicy? getByHostname(ByteString hostname);
-
-  /**
-   * Returns the currently-active policy for the extension extension URI, or
-   * null if the URI is not an extension URI, or no policy is currently active
-   * for it.
-   */
-  static WebExtensionPolicy? getByURI(URI uri);
-};
-
-dictionary WebExtensionInit {
-  required DOMString id;
-
-  required ByteString mozExtensionHostname;
-
-  required DOMString baseURL;
-
-  DOMString name = "";
-
-  required WebExtensionLocalizeCallback localizeCallback;
-
-  required MatchPatternSet allowedOrigins;
-
-  sequence<DOMString> permissions = [];
-
-  sequence<MatchGlob> webAccessibleResources = [];
-
-  sequence<WebExtensionContentScriptInit> contentScripts = [];
-
-  DOMString? contentSecurityPolicy = null;
-
-  sequence<DOMString>? backgroundScripts = null;
-};
deleted file mode 100644
--- a/dom/chrome-webidl/moz.build
+++ /dev/null
@@ -1,47 +0,0 @@
-# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
-# vim: set filetype=python:
-# 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/.
-
-with Files("**"):
-    BUG_COMPONENT = ("Core", "DOM")
-
-with Files("ChannelWrapper.webidl"):
-    BUG_COMPONENT = ("Toolkit", "WebExtensions: Request Handling")
-
-with Files("HeapSnapshot.webidl"):
-    BUG_COMPONENT = ("Firefox", "Developer Tools: Memory")
-
-with Files("InspectorUtils.webidl"):
-    BUG_COMPONENT = ("Firefox", "Developer Tools: Inspector")
-
-with Files("MatchGlob.webidl"):
-    BUG_COMPONENT = ("Toolkit", "WebExtensions: General")
-
-with Files("MatchPattern.webidl"):
-    BUG_COMPONENT = ("Toolkit", "WebExtensions: General")
-
-with Files("WebExtension*.webidl"):
-    BUG_COMPONENT = ("Toolkit", "WebExtensions: General")
-
-PREPROCESSED_WEBIDL_FILES = [
-    'ChromeUtils.webidl',
-]
-
-WEBIDL_FILES = [
-    'ChannelWrapper.webidl',
-    'DominatorTree.webidl',
-    'HeapSnapshot.webidl',
-    'InspectorUtils.webidl',
-    'MatchGlob.webidl',
-    'MatchPattern.webidl',
-    'MozStorageAsyncStatementParams.webidl',
-    'MozStorageStatementParams.webidl',
-    'MozStorageStatementRow.webidl',
-    'PrecompiledScript.webidl',
-    'PromiseDebugging.webidl',
-    'StructuredCloneHolder.webidl',
-    'WebExtensionContentScript.webidl',
-    'WebExtensionPolicy.webidl',
-]
--- a/dom/moz.build
+++ b/dom/moz.build
@@ -36,17 +36,16 @@ DIRS += [
     'abort',
     'animation',
     'base',
     'bindings',
     'battery',
     'browser-element',
     'cache',
     'canvas',
-    'chrome-webidl',
     'clients',
     'commandhandler',
     'credentialmanagement',
     'crypto',
     'encoding',
     'events',
     'fetch',
     'file',
new file mode 100644
--- /dev/null
+++ b/dom/webidl/ChannelWrapper.webidl
@@ -0,0 +1,460 @@
+/* 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/. */
+
+interface LoadInfo;
+interface MozChannel;
+interface TabParent;
+interface URI;
+interface nsISupports;
+
+/**
+ * Load types that correspond to the external types in nsIContentPolicy.idl.
+ * Please also update that IDL when updating this list.
+ */
+enum MozContentPolicyType {
+  "main_frame",
+  "sub_frame",
+  "stylesheet",
+  "script",
+  "image",
+  "object",
+  "object_subrequest",
+  "xmlhttprequest",
+  "fetch",
+  "xbl",
+  "xslt",
+  "ping",
+  "beacon",
+  "xml_dtd",
+  "font",
+  "media",
+  "websocket",
+  "csp_report",
+  "imageset",
+  "web_manifest",
+  "other"
+};
+
+/**
+ * A thin wrapper around nsIChannel and nsIHttpChannel that allows JS
+ * callers to access them without XPConnect overhead.
+ */
+[ChromeOnly, Exposed=System]
+interface ChannelWrapper : EventTarget {
+  /**
+   * Returns the wrapper instance for the given channel. The same wrapper is
+   * always returned for a given channel.
+   */
+  static ChannelWrapper get(MozChannel channel);
+
+  /**
+   * A unique ID for for the requests which remains constant throughout the
+   * redirect chain.
+   */
+  [Constant, StoreInSlot]
+  readonly attribute unsigned long long id;
+
+  // Not technically pure, since it's backed by a weak reference, but if JS
+  // has a reference to the previous value, we can depend on it not being
+  // collected.
+  [Pure]
+  attribute MozChannel? channel;
+
+
+  /**
+   * Cancels the request with the given nsresult status code.
+   */
+  [Throws]
+  void cancel(unsigned long result);
+
+  /**
+   * Redirects the wrapped HTTP channel to the given URI. For other channel
+   * types, this method will throw. The redirect is an internal redirect, and
+   * the behavior is the same as nsIHttpChannel.redirectTo.
+   */
+  [Throws]
+  void redirectTo(URI url);
+
+  /**
+   * Requests an upgrade of the HTTP channel to a secure request. For other channel
+   * types, this method will throw. The redirect is an internal redirect, and
+   * the behavior is the same as nsIHttpChannel.upgradeToSecure. Setting this
+   * flag is only effective during the WebRequest.onBeforeRequest in
+   * Web Extensions, calling this at any other point during the request will
+   * have no effect. Setting this flag in addition to calling redirectTo
+   * results in the redirect happening rather than the upgrade request.
+   */
+  [Throws]
+  void upgradeToSecure();
+
+  /**
+   * The content type of the request, usually as read from the Content-Type
+   * header. This should be used in preference to the header to determine the
+   * content type of the channel.
+   */
+  [Pure]
+  attribute ByteString contentType;
+
+
+  /**
+   * For HTTP requests, the request method (e.g., GET, POST, HEAD). For other
+   * request types, returns an empty string.
+   */
+  [Cached, Pure]
+  readonly attribute ByteString method;
+
+  /**
+   * For requests with LoadInfo, the content policy type that corresponds to
+   * the request. For requests without LoadInfo, returns "other".
+   */
+  [Cached, Pure]
+  readonly attribute MozContentPolicyType type;
+
+
+  /**
+   * When true, the request is currently suspended by the wrapper. When false,
+   * the request is not suspended by the wrapper, but may still be suspended
+   * by another caller.
+   */
+  [Pure, SetterThrows]
+  attribute boolean suspended;
+
+
+  /**
+   * The final URI of the channel (as returned by NS_GetFinalChannelURI) after
+   * any redirects have been processed.
+   */
+  [Cached, Pure]
+  readonly attribute URI finalURI;
+
+  /**
+   * The string version of finalURI (but cheaper to access than
+   * finalURI.spec).
+   */
+  [Cached, Pure]
+  readonly attribute DOMString finalURL;
+
+
+  /**
+   * Returns true if the request matches the given request filter, and the
+   * given extension has permission to access it.
+   */
+  boolean matches(optional MozRequestFilter filter,
+                  optional WebExtensionPolicy? extension = null,
+                  optional MozRequestMatchOptions options);
+
+
+  /**
+   * Register's this channel as traceable by the given add-on when accessed
+   * via the process of the given TabParent.
+   */
+  void registerTraceableChannel(WebExtensionPolicy extension, TabParent? tabParent);
+
+  /**
+   * The current HTTP status code of the request. This will be 0 if a response
+   * has not yet been received, or if the request is not an HTTP request.
+   */
+  [Cached, Pure]
+  readonly attribute unsigned long statusCode;
+
+  /**
+   * The HTTP status line for the request (e.g., "HTTP/1.0 200 Success"). This
+   * will be an empty string if a response has not yet been received, or if
+   * the request is not an HTTP request.
+   */
+  [Cached, Pure]
+  readonly attribute ByteString statusLine;
+
+
+  /**
+   * If the request has failed or been canceled, an opaque string representing
+   * the error. For requests that failed at the NSS layer, this is an NSS
+   * error message. For requests that failed for any other reason, it is the
+   * name of an nsresult error code. For requests which haven't failed, this
+   * is null.
+   *
+   * This string is used in the error message when notifying extension
+   * webRequest listeners of failure. The documentation specifically states
+   * that this value MUST NOT be parsed, and is only meant to be displayed to
+   * humans, but we all know how that works in real life.
+   */
+  [Cached, Pure]
+  readonly attribute DOMString? errorString;
+
+  /**
+   * Dispatched when the channel is closed with an error status. Check
+   * errorString for the error details.
+   */
+  attribute EventHandler onerror;
+
+  /**
+   * Checks the request's current status and dispatches an error event if the
+   * request has failed and one has not already been dispatched.
+   */
+  void errorCheck();
+
+
+  /**
+   * Dispatched when the channel begins receiving data.
+   */
+  attribute EventHandler onstart;
+
+  /**
+   * Dispatched when the channel has finished receiving data.
+   */
+  attribute EventHandler onstop;
+
+
+  /**
+   * Information about the proxy server which is handling this request, or
+   * null if the request is not proxied.
+   */
+  [Cached, Frozen, GetterThrows, Pure]
+  readonly attribute MozProxyInfo? proxyInfo;
+
+  /**
+   * For HTTP requests, the IP address of the remote server handling the
+   * request. For other request types, returns null.
+   */
+  [Cached, Pure]
+  readonly attribute ByteString? remoteAddress;
+
+
+  /**
+   * The LoadInfo object for this channel, if available. Null for channels
+   * without load info, until support for those is removed.
+   */
+  [Cached, Pure]
+  readonly attribute LoadInfo? loadInfo;
+
+  /**
+   * True if this load was triggered by a system caller. This currently always
+   * false if the request has no LoadInfo or is a top-level document load.
+   */
+  [Cached, Pure]
+  readonly attribute boolean isSystemLoad;
+
+  /**
+   * The URL of the principal that triggered this load. This is equivalent to
+   * the LoadInfo's triggeringPrincipal, and will only ever be null for
+   * requests without LoadInfo.
+   */
+  [Cached, Pure]
+  readonly attribute ByteString? originURL;
+
+  /**
+   * The URL of the document loading the content for this request. This is
+   * equivalent to the LoadInfo's loadingPrincipal. This may only ever be null
+   * for top-level requests and requests without LoadInfo.
+   */
+  [Cached, Pure]
+  readonly attribute ByteString? documentURL;
+
+  /**
+   * The URI version of originURL. Will be null only when originURL is null.
+   */
+  [Pure]
+  readonly attribute URI? originURI;
+
+  /**
+   * The URI version of documentURL. Will be null only when documentURL is
+   * null.
+   */
+  [Pure]
+  readonly attribute URI? documentURI;
+
+
+  /**
+   * True if extensions may modify this request. This is currently false only
+   * if the request belongs to a document which has access to the
+   * mozAddonManager API.
+   */
+  [Cached, GetterThrows, Pure]
+  readonly attribute boolean canModify;
+
+
+  /**
+   * The outer window ID of the frame that the request belongs to, or 0 if it
+   * is a top-level load or does not belong to a document.
+   */
+  [Cached, Constant]
+  readonly attribute long long windowId;
+
+  /**
+   * The outer window ID of the parent frame of the window that the request
+   * belongs to, 0 if that parent frame is the top-level frame, and -1 if the
+   * request belongs to a top-level frame.
+   */
+  [Cached, Constant]
+  readonly attribute long long parentWindowId;
+
+  /**
+   * For cross-process requests, the <browser> or <iframe> element to which the
+   * content loading this request belongs. For requests that don't originate
+   * from a remote browser, this is null.
+   */
+  [Cached, Pure]
+  readonly attribute nsISupports? browserElement;
+
+  /**
+   * Returns an array of objects that combine the url and frameId from the
+   * ancestorPrincipals and ancestorOuterWindowIDs on loadInfo.
+   * The immediate parent is the first entry, the last entry is always the top
+   * level frame.  It will be an empty list for toplevel window loads and
+   * non-subdocument resource loads within a toplevel window.  For the latter,
+   * originURL will provide information on what window is doing the load.  It
+   * will be null if the request is not associated with a window (e.g. XHR with
+   * mozBackgroundRequest = true).
+   */
+  [Cached, Frozen, GetterThrows, Pure]
+  readonly attribute sequence<MozFrameAncestorInfo>? frameAncestors;
+
+  /**
+   * For HTTP requests, returns an array of request headers which will be, or
+   * have been, sent with this request.
+   *
+   * For non-HTTP requests, throws NS_ERROR_UNEXPECTED.
+   */
+  [Throws]
+  sequence<MozHTTPHeader> getRequestHeaders();
+
+  /**
+   * For HTTP requests, returns an array of response headers which were
+   * received for this request, in the same format as returned by
+   * getRequestHeaders.
+
+   * Throws NS_ERROR_NOT_AVAILABLE if a response has not yet been received, or
+   * NS_ERROR_UNEXPECTED if the channel is not an HTTP channel.
+   *
+   * Note: The Content-Type header is handled specially. That header is
+   * usually not mutable after the request has been received, and the content
+   * type must instead be changed via the contentType attribute. If a caller
+   * attempts to set the Content-Type header via setRequestHeader, however,
+   * that value is assigned to the contentType attribute and its original
+   * string value is cached. That original value is returned in place of the
+   * actual Content-Type header.
+   */
+  [Throws]
+  sequence<MozHTTPHeader> getResponseHeaders();
+
+  /**
+   * Sets the given request header to the given value, overwriting any
+   * previous value. Setting a header to a null string has the effect of
+   * removing it.  If merge is true, then the passed value will be merged
+   * to any existing value that exists for the header. Otherwise, any prior
+   * value for the header will be overwritten. Merge is ignored for headers
+   * that cannot be merged.
+   *
+   * For non-HTTP requests, throws NS_ERROR_UNEXPECTED.
+   */
+  [Throws]
+  void setRequestHeader(ByteString header,
+                        ByteString value,
+                        optional boolean merge = false);
+
+  /**
+   * Sets the given response header to the given value, overwriting any
+   * previous value. Setting a header to a null string has the effect of
+   * removing it.  If merge is true, then the passed value will be merged
+   * to any existing value that exists for the header (e.g. handling multiple
+   * Set-Cookie headers).  Otherwise, any prior value for the header will be
+   * overwritten. Merge is ignored for headers that cannot be merged.
+   *
+   * For non-HTTP requests, throws NS_ERROR_UNEXPECTED.
+   *
+   * Note: The content type header is handled specially by this function. See
+   * getResponseHeaders() for details.
+   */
+  [Throws]
+  void setResponseHeader(ByteString header,
+                         ByteString value,
+                         optional boolean merge = false);
+};
+
+/**
+ * Information about the proxy server handing a request. This is approximately
+ * equivalent to nsIProxyInfo.
+ */
+dictionary MozProxyInfo {
+  /**
+   * The hostname of the server.
+   */
+  required ByteString host;
+  /**
+   * The TCP port of the server.
+   */
+  required long port;
+  /**
+   * The type of proxy (e.g., HTTP, SOCKS).
+   */
+  required ByteString type;
+
+  /**
+   * True if the proxy is responsible for DNS lookups.
+   */
+  required boolean proxyDNS;
+
+  /**
+   * The authentication username for the proxy, if any.
+   */
+  ByteString? username = null;
+
+  /**
+   * The timeout, in seconds, before the network stack will failover to the
+   * next candidate proxy server if it has not received a response.
+   */
+  unsigned long failoverTimeout;
+};
+
+/**
+ * MozFrameAncestorInfo combines loadInfo::AncestorPrincipals with
+ * loadInfo::AncestorOuterWindowIDs for easier access in the WebRequest API.
+ *
+ * url represents the parent of the loading window.
+ * frameId is the outerWindowID for the parent of the loading window.
+ *
+ * For further details see nsILoadInfo.idl and nsIDocument::AncestorPrincipals.
+ */
+dictionary MozFrameAncestorInfo {
+  required ByteString url;
+  required unsigned long long frameId;
+};
+
+/**
+ * Represents an HTTP request or response header.
+ */
+dictionary MozHTTPHeader {
+  /**
+   * The case-insensitive, non-case-normalized header name.
+   */
+  required ByteString name;
+  /**
+   * The header value.
+   */
+  required ByteString value;
+};
+
+/**
+ * An object used for filtering requests.
+ */
+dictionary MozRequestFilter {
+  /**
+   * If present, the request only matches if its `type` attribute matches one
+   * of the given types.
+   */
+  sequence<MozContentPolicyType>? types = null;
+
+  /**
+   * If present, the request only matches if its finalURI matches the given
+   * match pattern set.
+   */
+  MatchPatternSet? urls = null;
+};
+
+dictionary MozRequestMatchOptions {
+  /**
+   * True if we're matching for the proxy portion of a proxied request.
+   */
+  boolean isProxy = false;
+};
new file mode 100644
--- /dev/null
+++ b/dom/webidl/ChromeUtils.webidl
@@ -0,0 +1,421 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ */
+
+/**
+ * A collection of static utility methods that are only exposed to system code.
+ * This is exposed in all the system globals where we can expose stuff by
+ * default, so should only include methods that are **thread-safe**.
+ */
+[ChromeOnly, Exposed=(Window,System,Worker)]
+namespace ChromeUtils {
+  /**
+   * Serialize a snapshot of the heap graph, as seen by |JS::ubi::Node| and
+   * restricted by |boundaries|, and write it to the provided file path.
+   *
+   * @param boundaries        The portion of the heap graph to write.
+   *
+   * @returns                 The path to the file the heap snapshot was written
+   *                          to. This is guaranteed to be within the temp
+   *                          directory and its file name will match the regexp
+   *                          `\d+(\-\d+)?\.fxsnapshot`.
+   */
+  [Throws]
+  DOMString saveHeapSnapshot(optional HeapSnapshotBoundaries boundaries);
+
+  /**
+   * This is the same as saveHeapSnapshot, but with a different return value.
+   *
+   * @returns                 The snapshot ID of the file. This is the file name
+   *                          without the temp directory or the trailing
+   *                          `.fxsnapshot`.
+   */
+  [Throws]
+  DOMString saveHeapSnapshotGetId(optional HeapSnapshotBoundaries boundaries);
+
+  /**
+   * Deserialize a core dump into a HeapSnapshot.
+   *
+   * @param filePath          The file path to read the heap snapshot from.
+   */
+  [Throws, NewObject]
+  HeapSnapshot readHeapSnapshot(DOMString filePath);
+
+  /**
+   * Return the keys in a weak map.  This operation is
+   * non-deterministic because it is affected by the scheduling of the
+   * garbage collector and the cycle collector.
+   *
+   * @param aMap weak map or other JavaScript value
+   * @returns If aMap is a weak map object, return the keys of the weak
+   *          map as an array.  Otherwise, return undefined.
+   */
+  [Throws, NewObject]
+  any nondeterministicGetWeakMapKeys(any map);
+
+  /**
+   * Return the keys in a weak set.  This operation is
+   * non-deterministic because it is affected by the scheduling of the
+   * garbage collector and the cycle collector.
+   *
+   * @param aSet weak set or other JavaScript value
+   * @returns If aSet is a weak set object, return the keys of the weak
+   *          set as an array.  Otherwise, return undefined.
+   */
+  [Throws, NewObject]
+  any nondeterministicGetWeakSetKeys(any aSet);
+
+  /**
+   * Converts a buffer to a Base64 URL-encoded string per RFC 4648.
+   *
+   * @param source The buffer to encode.
+   * @param options Additional encoding options.
+   * @returns The encoded string.
+   */
+  [Throws]
+  ByteString base64URLEncode(BufferSource source,
+                             Base64URLEncodeOptions options);
+
+  /**
+   * Decodes a Base64 URL-encoded string per RFC 4648.
+   *
+   * @param string The string to decode.
+   * @param options Additional decoding options.
+   * @returns The decoded buffer.
+   */
+  [Throws, NewObject]
+  ArrayBuffer base64URLDecode(ByteString string,
+                              Base64URLDecodeOptions options);
+
+#ifdef NIGHTLY_BUILD
+
+  /**
+   * If the chrome code has thrown a JavaScript Dev Error
+   * in the current JSRuntime. the first such error, or `undefined`
+   * otherwise.
+   *
+   * A JavaScript Dev Error is an exception thrown by JavaScript
+   * code that matches both conditions:
+   * - it was thrown by chrome code;
+   * - it is either a `ReferenceError`, a `TypeError` or a `SyntaxError`.
+   *
+   * Such errors are stored regardless of whether they have been
+   * caught.
+   *
+   * This mechanism is designed to help ensure that the code of
+   * Firefox is free from Dev Errors, even if they are accidentally
+   * caught by clients.
+   *
+   * The object returned is not an exception. It has fields:
+   * - DOMString stack
+   * - DOMString filename
+   * - DOMString lineNumber
+   * - DOMString message
+   */
+  [Throws]
+  readonly attribute any recentJSDevError;
+
+  /**
+   * Reset `recentJSDevError` to `undefined` for the current JSRuntime.
+   */
+  void clearRecentJSDevError();
+#endif // NIGHTLY_BUILD
+
+  /**
+   * IF YOU ADD NEW METHODS HERE, MAKE SURE THEY ARE THREAD-SAFE.
+   */
+};
+
+/**
+ * Additional ChromeUtils methods that are _not_ thread-safe, and hence not
+ * exposed in workers.
+ */
+[Exposed=(Window,System)]
+partial namespace ChromeUtils {
+  /**
+   * A helper that converts OriginAttributesDictionary to a opaque suffix string.
+   *
+   * @param originAttrs       The originAttributes from the caller.
+   */
+  ByteString
+  originAttributesToSuffix(optional OriginAttributesDictionary originAttrs);
+
+  /**
+   * Returns true if the members of |originAttrs| match the provided members
+   * of |pattern|.
+   *
+   * @param originAttrs       The originAttributes under consideration.
+   * @param pattern           The pattern to use for matching.
+   */
+  boolean
+  originAttributesMatchPattern(optional OriginAttributesDictionary originAttrs,
+                               optional OriginAttributesPatternDictionary pattern);
+
+  /**
+   * Returns an OriginAttributesDictionary with values from the |origin| suffix
+   * and unspecified attributes added and assigned default values.
+   *
+   * @param origin            The origin URI to create from.
+   * @returns                 An OriginAttributesDictionary with values from
+   *                          the origin suffix and unspecified attributes
+   *                          added and assigned default values.
+   */
+  [Throws]
+  OriginAttributesDictionary
+  createOriginAttributesFromOrigin(DOMString origin);
+
+  /**
+   * Returns an OriginAttributesDictionary that is a copy of |originAttrs| with
+   * unspecified attributes added and assigned default values.
+   *
+   * @param originAttrs       The origin attributes to copy.
+   * @returns                 An OriginAttributesDictionary copy of |originAttrs|
+   *                          with unspecified attributes added and assigned
+   *                          default values.
+   */
+  OriginAttributesDictionary
+  fillNonDefaultOriginAttributes(optional OriginAttributesDictionary originAttrs);
+
+  /**
+   * Returns true if the 2 OriginAttributes are equal.
+   */
+  boolean
+  isOriginAttributesEqual(optional OriginAttributesDictionary aA,
+                          optional OriginAttributesDictionary aB);
+
+  /**
+   * Loads and compiles the script at the given URL and returns an object
+   * which may be used to execute it repeatedly, in different globals, without
+   * re-parsing.
+   */
+  [NewObject]
+  Promise<PrecompiledScript>
+  compileScript(DOMString url, optional CompileScriptOptionsDictionary options);
+
+  /**
+   * Waive Xray on a given value. Identity op for primitives.
+   */
+  [Throws]
+  any waiveXrays(any val);
+
+  /**
+   * Strip off Xray waivers on a given value. Identity op for primitives.
+   */
+  [Throws]
+  any unwaiveXrays(any val);
+
+  /**
+   * Gets the name of the JSClass of the object.
+   *
+   * if |unwrap| is true, all wrappers are unwrapped first. Unless you're
+   * specifically trying to detect whether the object is a proxy, this is
+   * probably what you want.
+   */
+  DOMString getClassName(object obj, optional boolean unwrap = true);
+
+  /**
+   * Clones the properties of the given object into a new object in the given
+   * target compartment (or the caller compartment if no target is provided).
+   * Property values themeselves are not cloned.
+   *
+   * Ignores non-enumerable properties, properties on prototypes, and properties
+   * with getters or setters.
+   */
+  [Throws]
+  object shallowClone(object obj, optional object? target = null);
+
+  /**
+   * Dispatches the given callback to the main thread when it would be
+   * otherwise idle. Similar to Window.requestIdleCallback, but not bound to a
+   * particular DOM windw.
+   */
+  [Throws]
+  void idleDispatch(IdleRequestCallback callback,
+                    optional IdleRequestOptions options);
+
+  /**
+   * Synchronously loads and evaluates the js file located at
+   * 'aResourceURI' with a new, fully privileged global object.
+   *
+   * If 'aTargetObj' is specified and null, this method just returns
+   * the module's global object. Otherwise (if 'aTargetObj' is not
+   * specified, or 'aTargetObj' is != null) looks for a property
+   * 'EXPORTED_SYMBOLS' on the new global object. 'EXPORTED_SYMBOLS'
+   * is expected to be an array of strings identifying properties on
+   * the global object.  These properties will be installed as
+   * properties on 'targetObj', or, if 'aTargetObj' is not specified,
+   * on the caller's global object. If 'EXPORTED_SYMBOLS' is not
+   * found, an error is thrown.
+   *
+   * @param aResourceURI A resource:// URI string to load the module from.
+   * @param aTargetObj the object to install the exported properties on or null.
+   * @returns the module code's global object.
+   *
+   * The implementation maintains a hash of aResourceURI->global obj.
+   * Subsequent invocations of import with 'aResourceURI' pointing to
+   * the same file will not cause the module to be re-evaluated, but
+   * the symbols in EXPORTED_SYMBOLS will be exported into the
+   * specified target object and the global object returned as above.
+   */
+  [Throws]
+  object import(DOMString aResourceURI, optional object? aTargetObj);
+
+  /**
+   * Defines a property on the given target which lazily imports a JavaScript
+   * module when accessed.
+   *
+   * The first time the property is accessed, the module at the given URL is
+   * imported, and the property is replaced with the module's exported symbol
+   * of the same name.
+   *
+   * Some points to note when using this utility:
+   *
+   * - The cached module export is always stored on the `this` object that was
+   *   used to access the getter. This means that if you define the lazy
+   *   getter on a prototype, the module will be re-imported every time the
+   *   property is accessed on a new instance.
+   *
+   * - The getter property may be overwritten by simple assignment, but as
+   *   with imports, the new property value is always defined on the `this`
+   *   object that the setter is called with.
+   *
+   * - If the module import fails, the getter will throw an error, and the
+   *   property will not be replaced. Each subsequent attempt to access the
+   *   getter will attempt to re-import the object, which will likely continue
+   *   to result in errors.
+   *
+   * @param target The target object on which to define the property.
+   * @param id The name of the property to define, and of the symbol to
+   *           import.
+   * @param resourceURI The resource URI of the module, as passed to
+   *                    ChromeUtils.import.
+   */
+  [Throws]
+  void defineModuleGetter(object target, DOMString id, DOMString resourceURI);
+
+  /**
+   * Returns the scripted location of the first ancestor stack frame with a
+   * principal which is subsumed by the given principal. If no such frame
+   * exists on the call stack, returns null.
+   */
+  object? getCallerLocation(Principal principal);
+
+  /**
+   * Creates a JS Error object with the given message and stack.
+   *
+   * If a stack object is provided, the error object is created in the global
+   * that it belongs to.
+   */
+  [Throws]
+  object createError(DOMString message, optional object? stack = null);
+};
+
+/**
+ * Used by principals and the script security manager to represent origin
+ * attributes. The first dictionary is designed to contain the full set of
+ * OriginAttributes, the second is used for pattern-matching (i.e. does this
+ * OriginAttributesDictionary match the non-empty attributes in this pattern).
+ *
+ * IMPORTANT: If you add any members here, you need to do the following:
+ * (1) Add them to both dictionaries.
+ * (2) Update the methods on mozilla::OriginAttributes, including equality,
+ *     serialization, deserialization, and inheritance.
+ * (3) Update the methods on mozilla::OriginAttributesPattern, including matching.
+ */
+dictionary OriginAttributesDictionary {
+  unsigned long appId = 0;
+  unsigned long userContextId = 0;
+  boolean inIsolatedMozBrowser = false;
+  unsigned long privateBrowsingId = 0;
+  DOMString firstPartyDomain = "";
+};
+dictionary OriginAttributesPatternDictionary {
+  unsigned long appId;
+  unsigned long userContextId;
+  boolean inIsolatedMozBrowser;
+  unsigned long privateBrowsingId;
+  DOMString firstPartyDomain;
+};
+
+dictionary CompileScriptOptionsDictionary {
+  /**
+   * The character set from which to decode the script.
+   */
+  DOMString charset = "utf-8";
+
+  /**
+   * If true, certain parts of the script may be parsed lazily, the first time
+   * they are used, rather than eagerly parsed at load time.
+   */
+  boolean lazilyParse = false;
+
+  /**
+   * If true, the script will be compiled so that its last expression will be
+   * returned as the value of its execution. This makes certain types of
+   * optimization impossible, and disables the JIT in many circumstances, so
+   * should not be used when not absolutely necessary.
+   */
+  boolean hasReturnValue = false;
+};
+
+/**
+ * A JS object whose properties specify what portion of the heap graph to
+ * write. The recognized properties are:
+ *
+ * * globals: [ global, ... ]
+ *   Dump only nodes that either:
+ *   - belong in the compartment of one of the given globals;
+ *   - belong to no compartment, but do belong to a Zone that contains one of
+ *     the given globals;
+ *   - are referred to directly by one of the last two kinds of nodes; or
+ *   - is the fictional root node, described below.
+ *
+ * * debugger: Debugger object
+ *   Like "globals", but use the Debugger's debuggees as the globals.
+ *
+ * * runtime: true
+ *   Dump the entire heap graph, starting with the JSRuntime's roots.
+ *
+ * One, and only one, of these properties must exist on the boundaries object.
+ *
+ * The root of the dumped graph is a fictional node whose ubi::Node type name is
+ * "CoreDumpRoot". If we are dumping the entire ubi::Node graph, this root node
+ * has an edge for each of the JSRuntime's roots. If we are dumping a selected
+ * set of globals, the root has an edge to each global, and an edge for each
+ * incoming JS reference to the selected Zones.
+ */
+dictionary HeapSnapshotBoundaries {
+  sequence<object> globals;
+  object           debugger;
+  boolean          runtime;
+};
+
+dictionary Base64URLEncodeOptions {
+  /** Specifies whether the output should be padded with "=" characters. */
+  required boolean pad;
+};
+
+enum Base64URLDecodePadding {
+  /**
+   * Fails decoding if the input is unpadded. RFC 4648, section 3.2 requires
+   * padding, unless the referring specification prohibits it.
+   */
+  "require",
+
+  /** Tolerates padded and unpadded input. */
+  "ignore",
+
+  /**
+   * Fails decoding if the input is padded. This follows the strict base64url
+   * variant used in JWS (RFC 7515, Appendix C) and HTTP Encrypted
+   * Content-Encoding (draft-ietf-httpbis-encryption-encoding-01).
+   */
+  "reject"
+};
+
+dictionary Base64URLDecodeOptions {
+  /** Specifies the padding mode for decoding the input. */
+  required Base64URLDecodePadding padding;
+};
new file mode 100644
--- /dev/null
+++ b/dom/webidl/DominatorTree.webidl
@@ -0,0 +1,70 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ */
+
+typedef unsigned long long NodeId;
+typedef unsigned long long NodeSize;
+
+/**
+ * In a directed graph with a root node `R`, a node `A` is said to "dominate" a
+ * node `B` iff every path from `R` to `B` contains `A`. A node `A` is said to
+ * be the "immediate dominator" of a node `B` iff it dominates `B`, is not `B`
+ * itself, and does not dominate any other nodes which also dominate `B` in
+ * turn.
+ *
+ * If we take every node from a graph `G` and create a new graph `T` with edges
+ * to each node from its immediate dominator, then `T` is a tree (each node has
+ * only one immediate dominator, or none if it is the root). This tree is called
+ * a "dominator tree".
+ *
+ * This interface represents a dominator tree constructed from a HeapSnapshot's
+ * heap graph. The domination relationship and dominator trees are useful tools
+ * for analyzing heap graphs because they tell you:
+ *
+ *   - Exactly what could be reclaimed by the GC if some node `A` became
+ *     unreachable: those nodes which are dominated by `A`,
+ *
+ *   - The "retained size" of a node in the heap graph, in contrast to its
+ *     "shallow size". The "shallow size" is the space taken by a node itself,
+ *     not counting anything it references. The "retained size" of a node is its
+ *     shallow size plus the size of all the things that would be collected if
+ *     the original node wasn't (directly or indirectly) referencing them. In
+ *     other words, the retained size is the shallow size of a node plus the
+ *     shallow sizes of every other node it dominates. For example, the root
+ *     node in a binary tree might have a small shallow size that does not take
+ *     up much space itself, but it dominates the rest of the binary tree and
+ *     its retained size is therefore significant (assuming no external
+ *     references into the tree).
+ */
+[ChromeOnly, Exposed=(Window,System,Worker)]
+interface DominatorTree {
+  /**
+   * The `NodeId` for the root of the dominator tree. This is a "meta-root" in
+   * that it has an edge to each GC root in the heap snapshot this dominator
+   * tree was created from.
+   */
+  readonly attribute NodeId root;
+
+  /**
+   * Get the retained size of the node with the given id. If given an invalid
+   * id, null is returned. Throws an error on OOM.
+   */
+  [Throws]
+  NodeSize? getRetainedSize(NodeId node);
+
+  /**
+   * Get the set of ids of nodes immediately dominated by the node with the
+   * given id. The resulting array is sorted by greatest to least retained
+   * size. If given an invalid id, null is returned. Throws an error on OOM.
+   */
+  [Throws]
+  sequence<NodeId>? getImmediatelyDominated(NodeId node);
+
+  /**
+   * Get the immediate dominator of the node with the given id. Returns null if
+   * given an invalid id, or the id of the root node.
+   */
+  NodeId? getImmediateDominator(NodeId node);
+};
new file mode 100644
--- /dev/null
+++ b/dom/webidl/HeapSnapshot.webidl
@@ -0,0 +1,105 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ */
+
+/**
+ * A HeapSnapshot represents a snapshot of the heap graph
+ */
+[ChromeOnly, Exposed=(Window,System,Worker)]
+interface HeapSnapshot {
+  /**
+   * A time stamp of when the heap snapshot was taken, if available. Units are
+   * microseconds since midnight (00:00:00) 1 January 1970 UTC.
+   */
+  readonly attribute unsigned long long? creationTime;
+
+  /**
+   * Take a census of the heap snapshot.
+   *
+   * This is the same as |Debugger.Memory.prototype.takeCensus|, but operates on
+   * the offline heap snapshot's serialized heap graph rather than the live heap
+   * graph. The same optional configuration options that can be passed to that
+   * function can be passed here.
+   *
+   * The returned value is determined by the `"breakdown"` option used, and is
+   * usually a `Map`, `Object`, or `Array`. For example, the following breakdown
+   *
+   *     {
+   *       by: "coarseType",
+   *       objects: { by: "objectClass" },
+   *       other:   { by: "internalType" }
+   *     }
+   *
+   * produces a result like this:
+   *
+   *     {
+   *       "objects": {
+   *         "Function":         { "count": 404, "bytes": 37328 },
+   *         "Object":           { "count": 11,  "bytes": 1264 },
+   *         "Debugger":         { "count": 1,   "bytes": 416 },
+   *         "ScriptSource":     { "count": 1,   "bytes": 64 },
+   *         // ... omitted for brevity...
+   *       },
+   *       "scripts":            { "count": 1,   "bytes": 0 },
+   *       "strings":            { "count": 701, "bytes": 49080 },
+   *       "other": {
+   *         "js::Shape":        { "count": 450, "bytes": 0 },
+   *         "js::BaseShape":    { "count": 21,  "bytes": 0 },
+   *         "js::ObjectGroup":  { "count": 17,  "bytes": 0 }
+   *       }
+   *     }
+   *
+   * See the `takeCensus` section of the `js/src/doc/Debugger/Debugger.Memory.md`
+   * file for detailed documentation.
+   */
+  [Throws]
+  any takeCensus(object? options);
+
+  /**
+   * Describe `node` with the specified `breakdown`. See the comment above
+   * `takeCensus` or `js/src/doc/Debugger/Debugger.Memory.md` for detailed
+   * documentation on breakdowns.
+   *
+   * Throws an error when `node` is not the id of a node in the heap snapshot,
+   * or if the breakdown is invalid.
+   */
+  [Throws]
+  any describeNode(object breakdown, NodeId node);
+
+  /**
+   * Compute the dominator tree for this heap snapshot.
+   *
+   * @see DominatorTree.webidl
+   */
+  [Throws]
+  DominatorTree computeDominatorTree();
+
+  /**
+   * Find the shortest retaining paths from the node associated with the ID
+   * `start` to each node associated with the IDs in `targets`. Find at most
+   * `maxNumPaths` retaining paths for each target node.
+   *
+   * The return value is a Map object mapping from each target node ID to an
+   * array of retaining paths. The array may be empty if we did not find any
+   * retaining paths.
+   *
+   * A path is an array of objects of the form:
+   *
+   *     {
+   *         predecessor: <node ID>,
+   *         edge: <string or null>,
+   *     }
+   *
+   * The first `predecessor` will always be `start`. The last edge in the path
+   * leads to the `target` node that is mapped to the path; the `target` does
+   * not appear as a `predecessor` in the path.
+   *
+   * Throws when `start` or any of the elements of `targets` are not an ID of a
+   * node in the snapshot, or if we encounter an out of memory exception.
+   */
+  [Throws]
+  object computeShortestPaths(NodeId start, sequence<NodeId> targets,
+                              unsigned long long maxNumPaths);
+};
new file mode 100644
--- /dev/null
+++ b/dom/webidl/InspectorUtils.webidl
@@ -0,0 +1,162 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ */
+
+/**
+ * A collection of utility methods for use by devtools.
+ *
+ * See InspectorUtils.h for documentation on these methods.
+ */
+[ChromeOnly]
+namespace InspectorUtils {
+  sequence<StyleSheet> getAllStyleSheets(Document document);
+  sequence<CSSRule> getCSSStyleRules(
+    Element element,
+    [TreatNullAs=EmptyString] optional DOMString pseudo = "");
+  unsigned long getRuleLine(CSSRule rule);
+  unsigned long getRuleColumn(CSSRule rule);
+  unsigned long getRelativeRuleLine(CSSRule rule);
+  boolean hasRulesModifiedByCSSOM(CSSStyleSheet sheet);
+  [NewObject] CSSLexer getCSSLexer(DOMString text);
+  unsigned long getSelectorCount(CSSStyleRule rule);
+  [Throws] DOMString getSelectorText(CSSStyleRule rule,
+                                     unsigned long selectorIndex);
+  [Throws] unsigned long long getSpecificity(CSSStyleRule rule,
+                                             unsigned long selectorIndex);
+  [Throws] boolean selectorMatchesElement(
+      Element element,
+      CSSStyleRule rule,
+      unsigned long selectorIndex,
+      [TreatNullAs=EmptyString] optional DOMString pseudo = "");
+  boolean isInheritedProperty(DOMString property);
+  sequence<DOMString> getCSSPropertyNames(optional PropertyNamesOptions options);
+  [Throws] sequence<DOMString> getCSSValuesForProperty(DOMString property);
+  [Throws] DOMString rgbToColorName(octet r, octet g, octet b);
+  InspectorRGBATuple? colorToRGBA(DOMString colorString);
+  boolean isValidCSSColor(DOMString colorString);
+  [Throws] sequence<DOMString> getSubpropertiesForCSSProperty(DOMString property);
+  [Throws] boolean cssPropertyIsShorthand(DOMString property);
+
+  // TODO: Change this to use an enum.
+  const unsigned long TYPE_LENGTH = 0;
+  const unsigned long TYPE_PERCENTAGE = 1;
+  const unsigned long TYPE_COLOR = 2;
+  const unsigned long TYPE_URL = 3;
+  const unsigned long TYPE_ANGLE = 4;
+  const unsigned long TYPE_FREQUENCY = 5;
+  const unsigned long TYPE_TIME = 6;
+  const unsigned long TYPE_GRADIENT = 7;
+  const unsigned long TYPE_TIMING_FUNCTION = 8;
+  const unsigned long TYPE_IMAGE_RECT = 9;
+  const unsigned long TYPE_NUMBER = 10;
+  [Throws] boolean cssPropertySupportsType(DOMString property, unsigned long type);
+
+  boolean isIgnorableWhitespace(CharacterData dataNode);
+  Node? getParentForNode(Node node, boolean showingAnonymousContent);
+  [NewObject] NodeList getChildrenForNode(Node node,
+                                          boolean showingAnonymousContent);
+  sequence<DOMString> getBindingURLs(Element element);
+  [Throws] boolean setContentState(Element element, unsigned long long state);
+  [Throws] boolean removeContentState(
+      Element element,
+      unsigned long long state,
+      optional boolean clearActiveDocument = false);
+  unsigned long long getContentState(Element element);
+
+  // Get the font face(s) actually used to render the text in /range/,
+  // as a collection of InspectorFontFace objects (below).
+  // If /maxRanges/ is greater than zero, each InspectorFontFace will record
+  // up to /maxRanges/ fragments of content that used the face, for the caller
+  // to access via its .ranges attribute.
+  [NewObject, Throws] sequence<InspectorFontFace> getUsedFontFaces(
+      Range range,
+      optional unsigned long maxRanges = 0);
+
+  sequence<DOMString> getCSSPseudoElementNames();
+  void addPseudoClassLock(Element element,
+                          DOMString pseudoClass,
+                          optional boolean enabled = true);
+  void removePseudoClassLock(Element element, DOMString pseudoClass);
+  boolean hasPseudoClassLock(Element element, DOMString pseudoClass);
+  void clearPseudoClassLocks(Element element);
+  [Throws] void parseStyleSheet(CSSStyleSheet sheet, DOMString input);
+  void scrollElementIntoView(Element element);
+};
+
+dictionary PropertyNamesOptions {
+  boolean includeAliases = false;
+};
+
+dictionary InspectorRGBATuple {
+  /*
+   * NOTE: This tuple is in the normal 0-255-sized RGB space but can be
+   * fractional and may extend outside the 0-255 range.
+   *
+   * a is in the range 0 - 1.
+   */
+  double r = 0;
+  double g = 0;
+  double b = 0;
+  double a = 1;
+};
+
+dictionary InspectorVariationAxis {
+  required DOMString tag;
+  required DOMString name;
+  required float minValue;
+  required float maxValue;
+  required float defaultValue;
+};
+
+dictionary InspectorVariationValue {
+  required DOMString axis;
+  required float value;
+};
+
+dictionary InspectorVariationInstance {
+  required DOMString name;
+  required sequence<InspectorVariationValue> values;
+};
+
+dictionary InspectorFontFeature {
+  required DOMString tag;
+  required DOMString script;
+  required DOMString languageSystem;
+};
+
+[ChromeOnly]
+interface InspectorFontFace {
+  // An indication of how we found this font during font-matching.
+  // Note that the same physical font may have been found in multiple ways within a range.
+  readonly attribute boolean fromFontGroup;
+  readonly attribute boolean fromLanguagePrefs;
+  readonly attribute boolean fromSystemFallback;
+
+  // available for all fonts
+  readonly attribute DOMString name; // full font name as obtained from the font resource
+  readonly attribute DOMString CSSFamilyName; // a family name that could be used in CSS font-family
+                                              // (not necessarily the actual name that was used,
+                                              // due to aliases, generics, localized names, etc)
+
+  [NewObject,Throws] sequence<InspectorVariationAxis> getVariationAxes();
+  [NewObject,Throws] sequence<InspectorVariationInstance> getVariationInstances();
+  [NewObject,Throws] sequence<InspectorFontFeature> getFeatures();
+
+  // A list of Ranges of text rendered with this face.
+  // This will list the first /maxRanges/ ranges found when InspectorUtils.getUsedFontFaces
+  // was called (so it will be empty unless a non-zero maxRanges argument was passed).
+  // Note that this indicates how the document was rendered at the time of calling
+  // getUsedFontFaces; it does not reflect any subsequent modifications, so if styles
+  // have been modified since calling getUsedFontFaces, it may no longer be accurate.
+  [Constant,Cached]  readonly attribute sequence<Range> ranges;
+
+  // meaningful only when the font is a user font defined using @font-face
+  readonly attribute CSSFontFaceRule? rule; // null if no associated @font-face rule
+  readonly attribute long srcIndex; // index in the rule's src list, -1 if no @font-face rule
+  readonly attribute DOMString URI; // empty string if not a downloaded font, i.e. local
+  readonly attribute DOMString localName; // empty string  if not a src:local(...) rule
+  readonly attribute DOMString format; // as per http://www.w3.org/TR/css3-webfonts/#referencing
+  readonly attribute DOMString metadata; // XML metadata from WOFF file (if any)
+};
new file mode 100644
--- /dev/null
+++ b/dom/webidl/MatchGlob.webidl
@@ -0,0 +1,24 @@
+/* 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/. */
+
+/**
+ * Represents a simple glob pattern matcher. Any occurrence of "*" in the glob
+ * pattern matches any literal string of characters in the string being
+ * compared. Additionally, if created with `allowQuestion = true`, any
+ * occurrence of "?" in the glob matches any single literal character.
+ */
+[Constructor(DOMString glob, optional boolean allowQuestion = true),
+ ChromeOnly, Exposed=(Window,System)]
+interface MatchGlob {
+  /**
+   * Returns true if the string matches the glob.
+   */
+  boolean matches(DOMString string);
+
+  /**
+   * The glob string this MatchGlob represents.
+   */
+  [Constant]
+  readonly attribute DOMString glob;
+};
new file mode 100644
--- /dev/null
+++ b/dom/webidl/MatchPattern.webidl
@@ -0,0 +1,128 @@
+/* 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/. */
+
+interface Cookie;
+interface URI;
+
+/**
+ * A URL match pattern as used by the WebExtension and Chrome extension APIs.
+ *
+ * A match pattern is a string with one of the following formats:
+ *
+ *  - "<all_urls>"
+ *    The literal string "<all_urls>" matches any URL with a supported
+ *    protocol.
+ *
+ *  - <proto>://<host>/<path>
+ *    A URL pattern with the following placeholders:
+ *
+ *    - <proto>
+ *      The protocol to match, or "*" to match either "http" or "https".
+ *    - <host>
+ *      The hostname to match. May be either a complete, literal hostname to
+ *      match a specific host, the wildcard character "*", to match any host,
+ *      or a subdomain pattern, with "*." followed by a domain name, to match
+ *      that domain name or any subdomain thereof.
+ *    - <path>
+ *      A glob pattern for paths to match. A "*" may appear anywhere within
+ *      the path, and will match any string of characters. If no "*" appears,
+ *      the URL path must exactly match the pattern path.
+ */
+[Constructor(DOMString pattern, optional MatchPatternOptions options),
+ ChromeOnly, Exposed=(Window,System)]
+interface MatchPattern {
+  /**
+   * Returns true if the given URI matches the pattern.
+   *
+   * If explicit is true, only explicit domain matches, without wildcards, are
+   * considered.
+   */
+  [Throws]
+  boolean matches(URI uri, optional boolean explicit = false);
+
+  [Throws]
+  boolean matches(DOMString url, optional boolean explicit = false);
+
+  /**
+   * Returns true if a URL exists which a) would be able to access the given
+   * cookie, and b) would be matched by this match pattern.
+   */
+  boolean matchesCookie(Cookie cookie);
+
+  /**
+   * Returns true if this pattern will match any host which would be matched
+   * by the given pattern.
+   */
+  boolean subsumes(MatchPattern pattern);
+
+  /**
+   * Returns true if there is any host which would be matched by both this
+   * pattern and the given pattern.
+   */
+  boolean overlaps(MatchPattern pattern);
+
+  /**
+   * The match pattern string represented by this pattern.
+   */
+  [Constant]
+  readonly attribute DOMString pattern;
+};
+
+/**
+ * A set of MatchPattern objects, which implements the MatchPattern API and
+ * matches when any of its sub-patterns matches.
+ */
+[Constructor(sequence<(DOMString or MatchPattern)> patterns, optional MatchPatternOptions options),
+ ChromeOnly, Exposed=(Window,System)]
+interface MatchPatternSet {
+  /**
+   * Returns true if the given URI matches any sub-pattern.
+   *
+   * If explicit is true, only explicit domain matches, without wildcards, are
+   * considered.
+   */
+  [Throws]
+  boolean matches(URI uri, optional boolean explicit = false);
+
+  [Throws]
+  boolean matches(DOMString url, optional boolean explicit = false);
+
+  /**
+   * Returns true if any sub-pattern matches the given cookie.
+   */
+  boolean matchesCookie(Cookie cookie);
+
+  /**
+   * Returns true if any sub-pattern subsumes the given pattern.
+   */
+  boolean subsumes(MatchPattern pattern);
+
+  /**
+   * Returns true if any sub-pattern overlaps the given pattern.
+   */
+  boolean overlaps(MatchPattern pattern);
+
+  /**
+   * Returns true if any sub-pattern overlaps any sub-pattern the given
+   * pattern set.
+   */
+  boolean overlaps(MatchPatternSet patternSet);
+
+  /**
+   * Returns true if any sub-pattern overlaps *every* sub-pattern in the given
+   * pattern set.
+   */
+  boolean overlapsAll(MatchPatternSet patternSet);
+
+  [Cached, Constant, Frozen]
+  readonly attribute sequence<MatchPattern> patterns;
+};
+
+dictionary MatchPatternOptions {
+  /**
+   * If true, the path portion of the pattern is ignored, and replaced with a
+   * wildcard. The `pattern` property is updated to reflect this.
+   */
+  boolean ignorePath = false;
+};
new file mode 100644
--- /dev/null
+++ b/dom/webidl/MozStorageAsyncStatementParams.webidl
@@ -0,0 +1,22 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/. */
+
+[ChromeOnly]
+interface MozStorageAsyncStatementParams
+{
+  readonly attribute unsigned long length;
+
+  [Throws]
+  getter any(unsigned long index);
+
+  [Throws]
+  getter any(DOMString name);
+
+  [Throws]
+  setter void(unsigned long index, any arg);
+
+  [Throws]
+  setter void(DOMString name, any arg);
+};
new file mode 100644
--- /dev/null
+++ b/dom/webidl/MozStorageStatementParams.webidl
@@ -0,0 +1,22 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/. */
+
+[ChromeOnly]
+interface MozStorageStatementParams
+{
+  readonly attribute unsigned long length;
+
+  [Throws]
+  getter any(unsigned long index);
+
+  [Throws]
+  getter any(DOMString name);
+
+  [Throws]
+  setter void(unsigned long index, any arg);
+
+  [Throws]
+  setter void(DOMString name, any arg);
+};
new file mode 100644
--- /dev/null
+++ b/dom/webidl/MozStorageStatementRow.webidl
@@ -0,0 +1,11 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/. */
+
+[ChromeOnly]
+interface MozStorageStatementRow
+{
+  [Throws]
+  getter any(DOMString name);
+};
new file mode 100644
--- /dev/null
+++ b/dom/webidl/PrecompiledScript.webidl
@@ -0,0 +1,33 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ */
+
+/**
+ * Represents a pre-compiled JS script, which can be repeatedly executed in
+ * different globals without being re-parsed.
+ */
+[ChromeOnly, Exposed=(Window,System)]
+interface PrecompiledScript {
+  /**
+   * Executes the script in the context of, and with the security principal
+   * of, the given object's global. If compiled with a return value, returns
+   * the value of the script's last expression. Otherwise returns undefined.
+   */
+  [Throws]
+  any executeInGlobal(object global);
+
+  /**
+   * The URL that the script was loaded from.
+   */
+  [Pure]
+  readonly attribute DOMString url;
+
+  /**
+   * True if the script was compiled with a return value, and will return the
+   * value of its last expression when executed.
+   */
+  [Pure]
+  readonly attribute boolean hasReturnValue;
+};
new file mode 100644
--- /dev/null
+++ b/dom/webidl/PromiseDebugging.webidl
@@ -0,0 +1,108 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ */
+
+/* This is a utility namespace for promise-debugging functionality */
+
+
+dictionary PromiseDebuggingStateHolder {
+  PromiseDebuggingState state = "pending";
+  any value;
+  any reason;
+};
+enum PromiseDebuggingState { "pending", "fulfilled", "rejected" };
+
+/**
+ * An observer for Promise that _may_ be leaking uncaught rejections.
+ *
+ * It is generally a programming error to leave a Promise rejected and
+ * not consume its rejection. The information exposed by this
+ * interface is designed to allow clients to track down such Promise,
+ * i.e. Promise that are currently
+ * - in `rejected` state;
+ * - last of their chain.
+ *
+ * Note, however, that a promise in such a state at the end of a tick
+ * may eventually be consumed in some ulterior tick. Implementers of
+ * this interface are responsible for presenting the information
+ * in a meaningful manner.
+ */
+callback interface UncaughtRejectionObserver {
+  /**
+   * A Promise has been left in `rejected` state and is the
+   * last in its chain.
+   *
+   * @param p A currently uncaught Promise. If `p` is is eventually
+   * caught, i.e. if its `then` callback is called, `onConsumed` will
+   * be called.
+   */
+  void onLeftUncaught(object p);
+
+  /**
+   * A Promise previously left uncaught is not the last in its
+   * chain anymore.
+   *
+   * @param p A Promise that was previously left in uncaught state is
+   * now caught, i.e. it is not the last in its chain anymore.
+   */
+  void onConsumed(object p);
+};
+
+[ChromeOnly, Exposed=(Window,System)]
+interface PromiseDebugging {
+  /**
+   * The various functions on this interface all expect to take promises but
+   * don't want the WebIDL behavior of assimilating random passed-in objects
+   * into promises.  They also want to treat Promise subclass instances as
+   * promises instead of wrapping them in a vanilla Promise, which is what the
+   * IDL spec says to do.  So we list all our arguments as "object" instead of
+   * "Promise" and check for them being a Promise internally.
+   */
+
+  /**
+   * Get the current state of the given promise.
+   */
+  [Throws]
+  static PromiseDebuggingStateHolder getState(object p);
+
+  /**
+   * Return an identifier for a promise. This identifier is guaranteed
+   * to be unique to the current process.
+   */
+  [Throws]
+  static DOMString getPromiseID(object p);
+
+  /**
+   * Return the stack to the promise's allocation point.  This can
+   * return null if the promise was not created from script.
+   */
+  [Throws]
+  static object? getAllocationStack(object p);
+
+  /**
+   * Return the stack to the promise's rejection point, if the
+   * rejection happened from script.  This can return null if the
+   * promise has not been rejected or was not rejected from script.
+   */
+  [Throws]
+  static object? getRejectionStack(object p);
+
+  /**
+   * Return the stack to the promise's fulfillment point, if the
+   * fulfillment happened from script.  This can return null if the
+   * promise has not been fulfilled or was not fulfilled from script.
+   */
+  [Throws]
+  static object? getFullfillmentStack(object p);
+
+  /**
+   * Watching uncaught rejections on the current thread.
+   *
+   * Adding an observer twice will cause it to be notified twice
+   * of events.
+   */
+  static void addUncaughtRejectionObserver(UncaughtRejectionObserver o);
+  static boolean removeUncaughtRejectionObserver(UncaughtRejectionObserver o);
+};
new file mode 100644
--- /dev/null
+++ b/dom/webidl/StructuredCloneHolder.webidl
@@ -0,0 +1,27 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ */
+
+/**
+ * A holder for structured-clonable data which can itself be cloned with
+ * little overhead, and deserialized into an arbitrary global.
+ */
+[ChromeOnly, Exposed=(Window,System,Worker),
+ /**
+  * Serializes the given value to an opaque structured clone blob, and
+  * returns the result.
+  *
+  * The serialization happens in the compartment of the given global or, if no
+  * global is provided, the compartment of the data value.
+  */
+ Constructor(any data, optional object? global = null)]
+interface StructuredCloneHolder {
+  /**
+   * Deserializes the structured clone data in the scope of the given global,
+   * and returns the result.
+   */
+  [Throws]
+  any deserialize(object global);
+};
new file mode 100644
--- /dev/null
+++ b/dom/webidl/WebExtensionContentScript.webidl
@@ -0,0 +1,163 @@
+/* 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/. */
+
+interface LoadInfo;
+interface URI;
+interface WindowProxy;
+
+/**
+ * Describes the earliest point in the load cycle at which a script should
+ * run.
+ */
+enum ContentScriptRunAt {
+  /**
+   * The point in the load cycle just after the document element has been
+   * inserted, before any page scripts have been allowed to run.
+   */
+  "document_start",
+  /**
+   * The point after which the page DOM has fully loaded, but before all page
+   * resources have necessarily been loaded. Corresponds approximately to the
+   * DOMContentLoaded event.
+   */
+  "document_end",
+  /**
+   * The first point after the page and all of its resources has fully loaded
+   * when the event loop is idle, and can run scripts without delaying a paint
+   * event.
+   */
+  "document_idle",
+};
+
+[Constructor(WebExtensionPolicy extension, WebExtensionContentScriptInit options), ChromeOnly, Exposed=System]
+interface WebExtensionContentScript {
+  /**
+   * Returns true if the script's match and exclude patterns match the given
+   * URI, without reference to attributes such as `allFrames`.
+   */
+  boolean matchesURI(URI uri);
+
+  /**
+   * Returns true if the script matches the given URI and LoadInfo objects.
+   * This should be used to determine whether to begin pre-loading a content
+   * script based on network events.
+   */
+  boolean matchesLoadInfo(URI uri, LoadInfo loadInfo);
+
+  /**
+   * Returns true if the script matches the given window. This should be used
+   * to determine whether to run a script in a window at load time.
+   */
+  boolean matchesWindow(WindowProxy window);
+
+  /**
+   * The policy object for the extension that this script belongs to.
+   */
+  [Constant]
+  readonly attribute WebExtensionPolicy extension;
+
+  /**
+   * If true, this script runs in all frames. If false, it only runs in
+   * top-level frames.
+   */
+  [Constant]
+  readonly attribute boolean allFrames;
+
+  /**
+   * If true, this (misleadingly-named, but inherited from Chrome) attribute
+   * causes the script to run in frames with URLs which inherit a principal
+   * that matches one of the match patterns, such as about:blank or
+   * about:srcdoc. If false, the script only runs in frames with an explicit
+   * matching URL.
+   */
+  [Constant]
+  readonly attribute boolean matchAboutBlank;
+
+  /**
+   * The earliest point in the load cycle at which this script should run. For
+   * static content scripts, in extensions which were present at browser
+   * startup, the browser makes every effort to make sure that the script runs
+   * no later than this point in the load cycle. For dynamic content scripts,
+   * and scripts from extensions installed during this session, the scripts
+   * may run at a later point.
+   */
+  [Constant]
+  readonly attribute ContentScriptRunAt runAt;
+
+  /**
+   * The outer window ID of the frame in which to run the script, or 0 if it
+   * should run in the top-level frame. Should only be used for
+   * dynamically-injected scripts.
+   */
+  [Constant]
+  readonly attribute unsigned long long? frameID;
+
+  /**
+   * The set of match patterns for URIs of pages in which this script should
+   * run. This attribute is mandatory, and is a prerequisite for all other
+   * match patterns.
+   */
+  [Constant]
+  readonly attribute MatchPatternSet matches;
+
+  /**
+   * A set of match patterns for URLs in which this script should not run,
+   * even if they match other include patterns or globs.
+   */
+  [Constant]
+  readonly attribute MatchPatternSet? excludeMatches;
+
+  /**
+   * A set of glob matchers for URLs in which this script should run. If this
+   * list is present, the script will only run in URLs which match the
+   * `matches` pattern as well as one of these globs.
+   */
+  [Cached, Constant, Frozen]
+  readonly attribute sequence<MatchGlob>? includeGlobs;
+
+  /**
+   * A set of glob matchers for URLs in which this script should not run, even
+   * if they match other include patterns or globs.
+   */
+  [Cached, Constant, Frozen]
+  readonly attribute sequence<MatchGlob>? excludeGlobs;
+
+  /**
+   * A set of paths, relative to the extension root, of CSS sheets to inject
+   * into matching pages.
+   */
+  [Cached, Constant, Frozen]
+  readonly attribute sequence<DOMString> cssPaths;
+
+  /**
+   * A set of paths, relative to the extension root, of JavaScript scripts to
+   * execute in matching pages.
+   */
+  [Cached, Constant, Frozen]
+  readonly attribute sequence<DOMString> jsPaths;
+};
+
+dictionary WebExtensionContentScriptInit {
+  boolean allFrames = false;
+
+  boolean matchAboutBlank = false;
+
+  ContentScriptRunAt runAt = "document_idle";
+
+  unsigned long long? frameID = null;
+
+  boolean hasActiveTabPermission = false;
+
+  required MatchPatternSet matches;
+
+  MatchPatternSet? excludeMatches = null;
+
+  sequence<MatchGlob>? includeGlobs = null;
+
+  sequence<MatchGlob>? excludeGlobs = null;
+
+  sequence<DOMString> cssPaths = [];
+
+  sequence<DOMString> jsPaths = [];
+};
new file mode 100644
--- /dev/null
+++ b/dom/webidl/WebExtensionPolicy.webidl
@@ -0,0 +1,185 @@
+/* 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/. */
+
+interface URI;
+interface WindowProxy;
+
+callback WebExtensionLocalizeCallback = DOMString (DOMString unlocalizedText);
+
+/**
+ * Defines the platform-level policies for a WebExtension, including its
+ * permissions and the characteristics of its moz-extension: URLs.
+ */
+[Constructor(WebExtensionInit options), ChromeOnly, Exposed=System]
+interface WebExtensionPolicy {
+  /**
+   * The add-on's internal ID, as specified in its manifest.json file or its
+   * XPI signature.
+   */
+  [Constant, StoreInSlot]
+  readonly attribute DOMString id;
+
+  /**
+   * The hostname part of the extension's moz-extension: URLs. This value is
+   * generated randomly at install time.
+   */
+  [Constant, StoreInSlot]
+  readonly attribute ByteString mozExtensionHostname;
+
+  /**
+   * The file: or jar: URL to use for the base of the extension's
+   * moz-extension: URL root.
+   */
+  [Constant]
+  readonly attribute ByteString baseURL;
+
+  /**
+   * The extension's user-visible name.
+   */
+  [Constant]
+  readonly attribute DOMString name;
+
+  /**
+   * The content security policy string to apply to all pages loaded from the
+   * extension's moz-extension: protocol.
+   */
+  [Constant]
+  readonly attribute DOMString contentSecurityPolicy;
+
+
+  /**
+   * The list of currently-active permissions for the extension, as specified
+   * in its manifest.json file. May be updated to reflect changes in the
+   * extension's optional permissions.
+   */
+  [Cached, Frozen, Pure]
+  attribute sequence<DOMString> permissions;
+
+  /**
+   * Match patterns for the set of web origins to which the extension is
+   * currently allowed access. May be updated to reflect changes in the
+   * extension's optional permissions.
+   */
+  [Pure]
+  attribute MatchPatternSet allowedOrigins;
+
+  /**
+   * The set of content scripts active for this extension.
+   */
+  [Cached, Frozen, Pure]
+  readonly attribute sequence<WebExtensionContentScript> contentScripts;
+
+  /**
+   * True if the extension is currently active, false otherwise. When active,
+   * the extension's moz-extension: protocol will point to the given baseURI,
+   * and the set of policies for this object will be active for its ID.
+   *
+   * Only one extension policy with a given ID or hostname may be active at a
+   * time. Attempting to activate a policy while a conflicting policy is
+   * active will raise an error.
+   */
+  [Affects=Everything, SetterThrows]
+  attribute boolean active;
+
+  /**
+   * True if both e10s and webextensions.remote are enabled.  This must be
+   * used instead of checking the remote pref directly since remote extensions
+   * require both to be enabled.
+   */
+  static readonly attribute boolean useRemoteWebExtensions;
+
+  /**
+   * True if the calling process is an extension process.
+   */
+  static readonly attribute boolean isExtensionProcess;
+
+  /**
+   * Returns true if the extension has cross-origin access to the given URI.
+   */
+  boolean canAccessURI(URI uri, optional boolean explicit = false);
+
+  /**
+   * Returns true if the extension currently has the given permission.
+   */
+  boolean hasPermission(DOMString permission);
+
+  /**
+   * Returns true if the given path relative to the extension's moz-extension:
+   * URL root may be accessed by web content.
+   */
+  boolean isPathWebAccessible(DOMString pathname);
+
+  /**
+   * Replaces localization placeholders in the given string with localized
+   * text from the extension's currently active locale.
+   */
+  DOMString localize(DOMString unlocalizedText);
+
+  /**
+   * Returns the moz-extension: URL for the given path.
+   */
+  [Throws]
+  DOMString getURL(optional DOMString path = "");
+
+  /**
+   * Register a new content script programmatically.
+   */
+  [Throws]
+  void registerContentScript(WebExtensionContentScript script);
+
+  /**
+   * Unregister a content script.
+   */
+  [Throws]
+  void unregisterContentScript(WebExtensionContentScript script);
+
+  /**
+   * Returns the list of currently active extension policies.
+   */
+  static sequence<WebExtensionPolicy> getActiveExtensions();
+
+  /**
+   * Returns the currently-active policy for the extension with the given ID,
+   * or null if no policy is active for that ID.
+   */
+  static WebExtensionPolicy? getByID(DOMString id);
+
+  /**
+   * Returns the currently-active policy for the extension with the given
+   * moz-extension: hostname, or null if no policy is active for that
+   * hostname.
+   */
+  static WebExtensionPolicy? getByHostname(ByteString hostname);
+
+  /**
+   * Returns the currently-active policy for the extension extension URI, or
+   * null if the URI is not an extension URI, or no policy is currently active
+   * for it.
+   */
+  static WebExtensionPolicy? getByURI(URI uri);
+};
+
+dictionary WebExtensionInit {
+  required DOMString id;
+
+  required ByteString mozExtensionHostname;
+
+  required DOMString baseURL;
+
+  DOMString name = "";
+
+  required WebExtensionLocalizeCallback localizeCallback;
+
+  required MatchPatternSet allowedOrigins;
+
+  sequence<DOMString> permissions = [];
+
+  sequence<MatchGlob> webAccessibleResources = [];
+
+  sequence<WebExtensionContentScriptInit> contentScripts = [];
+
+  DOMString? contentSecurityPolicy = null;
+
+  sequence<DOMString>? backgroundScripts = null;
+};
--- a/dom/webidl/moz.build
+++ b/dom/webidl/moz.build
@@ -134,16 +134,19 @@ with Files("GroupedHistoryEvent.webidl")
     BUG_COMPONENT = ("Core", "Document Navigation")
 
 with Files("HTML*"):
     BUG_COMPONENT = ("Core", "DOM: Core & HTML")
 
 with Files("HashChangeEvent.webidl"):
     BUG_COMPONENT = ("Core", "DOM: Events")
 
+with Files("HeapSnapshot.webidl"):
+    BUG_COMPONENT = ("Firefox", "Developer Tools: Memory")
+
 with Files("HiddenPluginEvent.webidl"):
     BUG_COMPONENT = ("Core", "Plug-ins")
 
 with Files("IDB*"):
     BUG_COMPONENT = ("Core", "DOM: IndexedDB")
 
 with Files("IIRFilterNode.webidl"):
     BUG_COMPONENT = ("Core", "Web Audio")
@@ -155,16 +158,19 @@ with Files("ImageCapture*"):
     BUG_COMPONENT = ("Core", "Audio/Video")
 
 with Files("InputEvent.webidl"):
     BUG_COMPONENT = ("Core", "DOM: Events")
 
 with Files("InstallTrigger.webidl"):
     BUG_COMPONENT = ("Toolkit", "Add-ons Manager")
 
+with Files("InspectorUtils.webidl"):
+    BUG_COMPONENT = ("Firefox", "Developer Tools: Inspector")
+
 with Files("KeyAlgorithm.webidl"):
     BUG_COMPONENT = ("Core", "DOM: Security")
 
 with Files("Key*Event*"):
     BUG_COMPONENT = ("Core", "DOM: Events")
 
 with Files("KeyIdsInitData.webidl"):
     BUG_COMPONENT = ("Core", "Audio/Video: Playback")
@@ -349,16 +355,17 @@ with Files("WindowOrWorkerGlobalScope.we
 with Files("Worker*"):
     BUG_COMPONENT = ("Core", "DOM: Workers")
 
 GENERATED_WEBIDL_FILES = [
     'CSS2Properties.webidl',
 ]
 
 PREPROCESSED_WEBIDL_FILES = [
+    'ChromeUtils.webidl',
     'Node.webidl',
     'Window.webidl',
 ]
 
 WEBIDL_FILES = [
     'AbortController.webidl',
     'AbortSignal.webidl',
     'AboutCapabilities.webidl',
@@ -406,16 +413,17 @@ WEBIDL_FILES = [
     'Cache.webidl',
     'CacheStorage.webidl',
     'CanvasCaptureMediaStream.webidl',
     'CanvasRenderingContext2D.webidl',
     'CaretPosition.webidl',
     'CDATASection.webidl',
     'ChannelMergerNode.webidl',
     'ChannelSplitterNode.webidl',
+    'ChannelWrapper.webidl',
     'CharacterData.webidl',
     'CheckerboardReportService.webidl',
     'ChildNode.webidl',
     'ChromeNodeList.webidl',
     'Client.webidl',
     'Clients.webidl',
     'ClipboardEvent.webidl',
     'CommandEvent.webidl',
@@ -470,16 +478,17 @@ WEBIDL_FILES = [
     'DocumentFragment.webidl',
     'DocumentOrShadowRoot.webidl',
     'DocumentTimeline.webidl',
     'DocumentType.webidl',
     'DOMCursor.webidl',
     'DOMError.webidl',
     'DOMException.webidl',
     'DOMImplementation.webidl',
+    'DominatorTree.webidl',
     'DOMMatrix.webidl',
     'DOMParser.webidl',
     'DOMPoint.webidl',
     'DOMQuad.webidl',
     'DOMRect.webidl',
     'DOMRectList.webidl',
     'DOMRequest.webidl',
     'DOMStringList.webidl',
@@ -522,16 +531,17 @@ WEBIDL_FILES = [
     'GamepadHapticActuator.webidl',
     'GamepadPose.webidl',
     'GamepadServiceTest.webidl',
     'Geolocation.webidl',
     'GeometryUtils.webidl',
     'GetUserMediaRequest.webidl',
     'Grid.webidl',
     'Headers.webidl',
+    'HeapSnapshot.webidl',
     'History.webidl',
     'HTMLAllCollection.webidl',
     'HTMLAnchorElement.webidl',
     'HTMLAreaElement.webidl',
     'HTMLAudioElement.webidl',
     'HTMLBaseElement.webidl',
     'HTMLBodyElement.webidl',
     'HTMLBRElement.webidl',
@@ -620,31 +630,34 @@ WEBIDL_FILES = [
     'IdleDeadline.webidl',
     'IIRFilterNode.webidl',
     'ImageBitmap.webidl',
     'ImageBitmapRenderingContext.webidl',
     'ImageCapture.webidl',
     'ImageData.webidl',
     'ImageDocument.webidl',
     'InputEvent.webidl',
+    'InspectorUtils.webidl',
     'IntersectionObserver.webidl',
     'IntlUtils.webidl',
     'IterableIterator.webidl',
     'KeyAlgorithm.webidl',
     'KeyboardEvent.webidl',
     'KeyEvent.webidl',
     'KeyframeAnimationOptions.webidl',
     'KeyframeEffect.webidl',
     'KeyIdsInitData.webidl',
     'L10nUtils.webidl',
     'LegacyQueryInterface.webidl',
     'LinkStyle.webidl',
     'ListBoxObject.webidl',
     'LocalMediaStream.webidl',
     'Location.webidl',
+    'MatchGlob.webidl',
+    'MatchPattern.webidl',
     'MediaDeviceInfo.webidl',
     'MediaDevices.webidl',
     'MediaElementAudioSourceNode.webidl',
     'MediaEncryptedEvent.webidl',
     'MediaError.webidl',
     'MediaKeyError.webidl',
     'MediaKeyMessageEvent.webidl',
     'MediaKeys.webidl',
@@ -675,16 +688,19 @@ WEBIDL_FILES = [
     'MIDIOptions.webidl',
     'MIDIOutput.webidl',
     'MIDIOutputMap.webidl',
     'MIDIPort.webidl',
     'MimeType.webidl',
     'MimeTypeArray.webidl',
     'MouseEvent.webidl',
     'MouseScrollEvent.webidl',
+    'MozStorageAsyncStatementParams.webidl',
+    'MozStorageStatementParams.webidl',
+    'MozStorageStatementRow.webidl',
     'MutationEvent.webidl',
     'MutationObserver.webidl',
     'NamedNodeMap.webidl',
     'NativeOSFileInternals.webidl',
     'Navigator.webidl',
     'NetDashboard.webidl',
     'NetworkInformation.webidl',
     'NetworkOptions.webidl',
@@ -721,25 +737,27 @@ WEBIDL_FILES = [
     'Permissions.webidl',
     'PermissionStatus.webidl',
     'Plugin.webidl',
     'PluginArray.webidl',
     'PointerEvent.webidl',
     'PopupBoxObject.webidl',
     'Position.webidl',
     'PositionError.webidl',
+    'PrecompiledScript.webidl',
     'Presentation.webidl',
     'PresentationAvailability.webidl',
     'PresentationConnection.webidl',
     'PresentationConnectionList.webidl',
     'PresentationReceiver.webidl',
     'PresentationRequest.webidl',
     'ProcessingInstruction.webidl',
     'ProfileTimelineMarker.webidl',
     'Promise.webidl',
+    'PromiseDebugging.webidl',
     'PushEvent.webidl',
     'PushManager.webidl',
     'PushManager.webidl',
     'PushMessageData.webidl',
     'PushSubscription.webidl',
     'PushSubscriptionOptions.webidl',
     'RadioNodeList.webidl',
     'Range.webidl',
@@ -767,16 +785,17 @@ WEBIDL_FILES = [
     'SourceBufferList.webidl',
     'StereoPannerNode.webidl',
     'Storage.webidl',
     'StorageEvent.webidl',
     'StorageManager.webidl',
     'StorageType.webidl',
     'StreamFilter.webidl',
     'StreamFilterDataEvent.webidl',
+    'StructuredCloneHolder.webidl',
     'StyleSheet.webidl',
     'StyleSheetList.webidl',
     'SubtleCrypto.webidl',
     'SVGAElement.webidl',
     'SVGAngle.webidl',
     'SVGAnimatedAngle.webidl',
     'SVGAnimatedBoolean.webidl',
     'SVGAnimatedEnumeration.webidl',
@@ -921,16 +940,18 @@ WEBIDL_FILES = [
     'VRDisplay.webidl',
     'VRDisplayEvent.webidl',
     'VRServiceTest.webidl',
     'VTTCue.webidl',
     'VTTRegion.webidl',
     'WaveShaperNode.webidl',
     'WebAuthentication.webidl',
     'WebComponents.webidl',
+    'WebExtensionContentScript.webidl',
+    'WebExtensionPolicy.webidl',
     'WebGL2RenderingContext.webidl',
     'WebGLRenderingContext.webidl',
     'WebKitCSSMatrix.webidl',
     'WebSocket.webidl',
     'WheelEvent.webidl',
     'WidevineCDMManifest.webidl',
     'WindowOrWorkerGlobalScope.webidl',
     'WindowRoot.webidl',