initializer.js (1104B)
1 /* This Source Code Form is subject to the terms of the Mozilla Public 2 * License, v. 2.0. If a copy of the MPL was not distributed with this 3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 4 5 "use strict"; 6 7 const { BrowserLoader } = ChromeUtils.importESModule( 8 "resource://devtools/shared/loader/browser-loader.sys.mjs" 9 ); 10 const { require } = BrowserLoader({ 11 baseURI: "resource://devtools/client/aboutdebugging/", 12 window, 13 }); 14 15 // The only purpose of this module is to load the real aboutdebugging module via the 16 // BrowserLoader. 17 // This cannot be done using an inline script tag in index.html because we are applying 18 // CSP for about: pages in Bug 1492063. 19 // And this module cannot be merged with aboutdebugging.js because modules loaded with 20 // script tags are using Promises bound to the lifecycle of the document, while modules 21 // loaded with a devtools loader use Promises that will still resolve if the document is 22 // destroyed. This is particularly useful to ensure asynchronous destroy() calls succeed. 23 require("resource://devtools/client/aboutdebugging/aboutdebugging.js");