Once upon a time (bug 862341), we decided to enable network listening by
default in DevTools.
In a general sense, that's fine. When you open a toolbox, we listen to that
tab and stop listening when the toolbox closes.
GCLI / Developer Toolbar is quite different, though. It connects to the whole
browser. This meant that enabling GCLI would start listening to network
activity in *every* tab (even though it doesn't have any way to even use that
data). This of course will slow down performance with all the extra tracking
and eat up memory with the tracked request data.
In this change, we move the step to enable network listening into the toolbox,
which seems more like what we intended anyway.
MozReview-Commit-ID: 2UYoQtWCAE1
Adds a new `getRoot` request to the root actor which lists the global actors
only (leaving out the tabs). This is a much better fit for callers who want to
access some global actor only, since it avoids visiting every tab, which could
be a very expensive operation.
MozReview-Commit-ID: 1lIAuaV7zoF
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.
For simple rules like function spacing, we can auto-fix these across the code
base so they are followed in a consistent way.
To generate this patch, I ran:
./mach eslint devtools --no-ignore --fix
After this, I reverted any changes to third party files that we really do want
to ignore.
MozReview-Commit-ID: 6Q8BApkAW20
Check the "isFrameSwitching" property of the tabNavigated event before
updating the devtools title. If frameSwitching is true, the event is a
fake event generated by the webbrowser actor when switching the frame
context in the devtools.
Added another mochitest to verify this.
MozReview-Commit-ID: LDycPcf0tLv
The devtools host window updates its title when its target navigates.
This was done using a contentDocument CPOW, and thus failing on e10s.
The url and title are now stored in TabTarget and updated on tab navigation.
Updated existing test to cover the case of pages with a title.
MozReview-Commit-ID: 4G1keOA7yB6
This commit creates the HeapSnapshotFileActor and moves the transferHeapSnapshot
method from MemoryActor to HeapSnapshotFileActor. This is necessary because
child processes in e10s are sandboxed and do not have access to the file system,
and because MemoryActor is in the sandboxed child process it cannot open the
file and send it over the RDP.
This complexity is hidden at the MemoryFront layer. Users of MemoryFront will
still simply call its saveHeapSnapshot method, and do not need to worry about
the inner workings of how heap snapshot files are transferred over the RDP. This
required adding a third parameter to MemoryFront's initialize method: the
listTabs response.
This commit creates the HeapSnapshotFileActor and moves the transferHeapSnapshot
method from MemoryActor to HeapSnapshotFileActor. This is necessary because
child processes in e10s are sandboxed and do not have access to the file system,
and because MemoryActor is in the sandboxed child process it cannot open the
file and send it over the RDP.
This complexity is hidden at the MemoryFront layer. Users of MemoryFront will
still simply call its saveHeapSnapshot method, and do not need to worry about
the inner workings of how heap snapshot files are transferred over the RDP. This
required adding a third parameter to MemoryFront's initialize method: the
listTabs response.
In a following patch, all DevTools moz.build files will use DevToolsModules to
install JS modules at a path that corresponds directly to their source tree
location. Here we rewrite all require and import calls to match the new
location that these files are installed to.
Move major DevTools files to new directories using the following steps:
hg mv browser/devtools devtools/client
hg mv toolkit/devtools/server devtools/server
hg mv toolkit/devtools devtools/shared
No other changes are made.