BuiltinCommands.jsm was huge to avoid slowing things down by having many
modules loading.
To avoid splitting it up from slowing things down we want to delay loading
commands. Create [add|remove]ItemsByModule to allow us to lazily add modules,
and convert all command modules to use this.
Then break up BuiltinCommands into a set of files, for each command, and do
some refactoring to use JS files rather than JSMs and use "use strict".
--HG--
rename : browser/devtools/commandline/Commands.jsm => browser/devtools/commandline/commands-index.js
rename : browser/devtools/debugger/CmdDebugger.jsm => browser/devtools/debugger/debugger-commands.js
rename : browser/devtools/inspector/CmdInspect.jsm => browser/devtools/inspector/inspector-commands.js
rename : browser/devtools/responsivedesign/CmdResize.jsm => browser/devtools/responsivedesign/resize-commands.js
rename : browser/devtools/scratchpad/CmdScratchpad.jsm => browser/devtools/scratchpad/scratchpad-commands.js
rename : browser/devtools/styleeditor/CmdEdit.jsm => browser/devtools/styleeditor/styleeditor-commands.js
rename : browser/devtools/tilt/CmdTilt.jsm => browser/devtools/tilt/tilt-commands.js
Subsequent patches were running into race conditions and bugs related to
Experiments instance initialization state. This patch plugs the
necessary holes in initialization state management to unblock work.
The fixes are far from robust. There are still race conditions and bugs.
They should probably be addressed later.
--HG--
extra : rebase_source : 5f0c7fa1f554d09a21b1452506884dc771cb829d
This patch was mostly generated with the following command:
find . -name "*.h" -o -name "*.cpp" | xargs sed -e '/WrapObject(JSContext/ {; N; s/\(WrapObject(JSContext *\* *a\{0,1\}[Cc]x\),\n\{0,1\} *JS::Handle<JSObject\*> a\{0,1\}[sS]cope/\1/ ; }' -i ""
and then reverting the changes that made to
dom/bindings/BindingUtils.h, since those WrapObject methods are not
the ones we're trying to change here, plus a bunch of manual fixups
for cases that this command did not catch (including all the callsites
of WrapObject()).
There is a lot of boilerplate testing code that performs common
AddonManager operations. Some common operations used for testing
Experiments have been refactored into a testing-only JSM that lives as
part of the Add-ons Manager.
--HG--
extra : rebase_source : f18cf54c7af6d390ed4437bd0ed0eb4beea76b0d
The experiments service insists on being in control of experiments.
Before, it wasn't being as assertive as it needed to be: other browser
components could install experiments behind its back. This patch
reasserts the experiments service as king of experiments add-on
management.
--HG--
extra : rebase_source : 91439622e47419fae7675d83890e83cf37db453b