This patch is generated by the following sed script:
find . ! -wholename '*/.hg*' -type f \( -iname '*.html' -o -iname '*.xhtml' -o -iname '*.xul' -o -iname '*.js' \) -exec sed -i -e 's/\(\(text\|application\)\/javascript\);version=1.[0-9]/\1/g' {} \;
MozReview-Commit-ID: AzhtdwJwVNg
Toolbox sets the dir attribute on a panel document element when loading a panel,
if the panel is using a HTML document.
Using the ForceRTL addon, the dir attribute should be automatically updated whenever
the direction is changed by the addon.
MozReview-Commit-ID: 2r18APw7IBs
If we happen to pass the current scope (`this`), the browser-loader codebase fails
when passing it as sandboxPrototype. It only works when passing an xray wrapper.
The document scope happen to not be an xray when using the addon, whereas `window`
always is no matter if we are using the addon or not.
MozReview-Commit-ID: GjYHkaCGBDd
Pretty much all of the browser mochitests for the memory panel have very
infrequent (about once a month) timeouts. In every case, the test has not hung
and just sat there, but is still actively doing work and just loses the race
against the timeout timer by fractions of a second. Ideally, we would speed up
the tests, but given that we already use small (in terms of heap size) test
cases and do as many analyses as we can in parallel, I think the best we can do
is increase the timeout threshold for these problematic tests.
There are two leaks addressed in this commit:
1. The thread actor's `_debuggerSourcesSeen` set was never cleared. This set
exists only as a performance optimization to speed up `_addSource` in cases
where we've already added the source. Unfortunately, this set wasn't getting
cleared when we cleared debuggees out and it ended up keeping the
`Debugger.Source`, its referent, and transitively its referent's global alive. I
figured it was simpler to make it a `WeakSet` than to add it as a special case
in `ThreadActor.prototype._clearDebuggees` and manage the lifetimes by hand. I
think this fits well with its intended use as an ephemeral performance
optimization.
2. Due to a logic error, we were not clearing debuggees in the memory actor's
`Debugger` instance on navigations. This isn't really a "proper" leak, in that
if you forced a GC, the old debuggees would go away as `Debugger` holds them
weakly, however if there was no GC between navigations, then you could still see
the old windows (and everything they "retained") as roots in the snapshot. This
issue is straightforward to fix once identified: ensure that `_clearDebuggees`
is actually called on navigation.
Finally, this commit adds a test that we don't leak Window objects when devtools
are open and we keep refreshing a tab. When it fails, it prints out the leaking
window's retaining paths.
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
This adds the INDIVIDUALS view state to the memory panel, renames "dominator
tree display" to "label display", and adds a view for listing the individual
nodes in a census group and inspecting each nodes' retaining paths.