***
Bug 1514594: Part 3a - Change ChromeUtils.import to return an exports object; not pollute global. r=mccr8
This changes the behavior of ChromeUtils.import() to return an exports object,
rather than a module global, in all cases except when `null` is passed as a
second argument, and changes the default behavior not to pollute the global
scope with the module's exports. Thus, the following code written for the old
model:
ChromeUtils.import("resource://gre/modules/Services.jsm");
is approximately the same as the following, in the new model:
var {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm");
Since the two behaviors are mutually incompatible, this patch will land with a
scripted rewrite to update all existing callers to use the new model rather
than the old.
***
Bug 1514594: Part 3b - Mass rewrite all JS code to use the new ChromeUtils.import API. rs=Gijs
This was done using the followng script:
https://bitbucket.org/kmaglione/m-c-rewrites/src/tip/processors/cu-import-exports.jsm
***
Bug 1514594: Part 3c - Update ESLint plugin for ChromeUtils.import API changes. r=Standard8
Differential Revision: https://phabricator.services.mozilla.com/D16747
***
Bug 1514594: Part 3d - Remove/fix hundreds of duplicate imports from sync tests. r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D16748
***
Bug 1514594: Part 3e - Remove no-op ChromeUtils.import() calls. r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D16749
***
Bug 1514594: Part 3f.1 - Cleanup various test corner cases after mass rewrite. r=Gijs
***
Bug 1514594: Part 3f.2 - Cleanup various non-test corner cases after mass rewrite. r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D16750
In about:debugging's browser_addon_reload.js test, we would request a reload
without waiting for it to reply. This led to the RDP connection closing before
the reply could be sent, triggering later errors.
For better test correctness, we now emit an event on reply and the test waits to
receive it before proceeding.
MozReview-Commit-ID: Jfps7MJ6Pzo
This changeset adds basic remote connection functionality to about:debugging.
About:debugging can target a remote firefox instance if the host and port
parameters are passed as URL search params.
The feature is not explicitly exposed at the moment and there is no UI to
connect an instance, and no UI feedback when connected to a remote instance.
When connected, about:debugging should correctly list tabs, workers and addons
for the target instance of Firefox. Debugging features work for all supported
targets.
Known limitations:
- preferences are read from the local Firefox instance (multiprocess, addon
debugging etc...). At the moment the remote instance must be manually
correctly configured
MozReview-Commit-ID: DOekSCb96XC
Most of the codebase that needs to create a debugger server
can use a server with all actors registered.
Define an additional method registerAllActors to do that.
By previous implementations, all the call sites that were
using browser: true were indirectly using tab & root: true
as well. So all the call sites using browser: true have been
migrated to registerAllActors and the specific behavior of
the browser: true case has been removed. Passing browser:true
to registerActors now only registers browser specific actors.
MozReview-Commit-ID: F3sx71eGrdG
DebuggerServer.init() already bails out if it was previously initialized
so we could avoid guarding the calls to init() with it everywhere.
Registering an actor module several times is also a noop as the Server
keeps a map of all the already registered modules and will bail out if
the module is already known.
MozReview-Commit-ID: 4ONLlx9253i
MozReview-Commit-ID: J1EmwxplNhA
Make actor registration more explicit and documented.
Each codepath depends on various set of actors, and it may be confused
as we often register actors if the DebuggerServer wasn't initialized yet.
But it is often already started by some other callsite...
This changeset also converts childtab to being just a module
and stop using DebuggerServer.addActors magic.
Use ReactDOM.render instead of React.render (same for unmountComponentAtNode)
Update tests to observe both childList and characterData mutations when
expecting only text changes.
MozReview-Commit-ID: ILTgypkpZRz
Make about:debugging code less verbose:
- use component factories to avoid having to remove calls to createElement
- use React.DOM helpers
- components only module.export their class
(require('my-component.js').MyComponent -> require('my-component.js'))
MozReview-Commit-ID: CBWLgcPUkMf