Forked from
The Tor Project / Applications / Tor Browser
-
Rob Wu authored
Bug 1837185 - Use realistic loader in test_webext_apis.js + fix failures r=devtools-reviewers,jdescottes, a=dmeehan listAddons was broken because webbrowser.js imported AddonManager through the wrong loader. Consequently, a new instance of the AddonManager module was loaded, instead of the alreaady-initialized one from the browser. This lead to the observed bug in the report. test_webext_apis.js was not realistic because it did not use a dedicated loader like DevToolsStartup. That prevented the test from catching the regression. This patch fixes that by replicating the logic at https://searchfox.org/mozilla-central/rev/aec3a901e6f6b3041b5ec457c9111a042cef1fb1/devtools/startup/DevToolsStartup.sys.mjs#1075-1101 Differential Revision: https://phabricator.services.mozilla.com/D180253
Rob Wu authoredBug 1837185 - Use realistic loader in test_webext_apis.js + fix failures r=devtools-reviewers,jdescottes, a=dmeehan listAddons was broken because webbrowser.js imported AddonManager through the wrong loader. Consequently, a new instance of the AddonManager module was loaded, instead of the alreaady-initialized one from the browser. This lead to the observed bug in the report. test_webext_apis.js was not realistic because it did not use a dedicated loader like DevToolsStartup. That prevented the test from catching the regression. This patch fixes that by replicating the logic at https://searchfox.org/mozilla-central/rev/aec3a901e6f6b3041b5ec457c9111a042cef1fb1/devtools/startup/DevToolsStartup.sys.mjs#1075-1101 Differential Revision: https://phabricator.services.mozilla.com/D180253
test_webext_apis.js 5.22 KiB