Looking at changes to generated code following bug 2039576 I can see a bunch of
extra stack save/load instructions on CallbackTracer::onEdge paths because this
can no longer tail call onChild. Pushing the return value through this should
remove six stack load/store instructions at the cost of a single move
instruction to set up the return value.
This is unlikely to make much difference to anything but I thought it was worth
a try.
Differential Revision: https://phabricator.services.mozilla.com/D303003
JSTracer::onFooEdge methods now return a bool, which is passed out from
TraceEdge methods. Sweeping tracers no longer clear edges whose targets are
dying.
Since the default trace functions no longer clear the edge, this it adds
TraceOrClearWeakEdge for cases where that's what you want.
Differential Revision: https://phabricator.services.mozilla.com/D300567
This changes TraversalTracer to use the generic tracer setup.
I did some benchmarking locally (on macOS) and the results were very noisy.
Despite this it looks like this is a 10% improvement on median traversal rate.
Differential Revision: https://phabricator.services.mozilla.com/D301022
The changeset has been generated automatically through:
./mach static-analysis check --output ./clang-tidy-bugprone.json --format json --fix
followed by manual adjustment when needed or when the auto-fixer bailed out.
This paves the way for Bug 2023527
Differential Revision: https://phabricator.services.mozilla.com/D287941
The changeset has been generated automatically through:
./mach static-analysis check --output ./clang-tidy-bugprone.json --format json --fix
followed by manual adjustment when needed or when the auto-fixer bailed out.
This paves the way for Bug 2023527
Differential Revision: https://phabricator.services.mozilla.com/D287941
LoadedScript nodes in the CC graph now include their URI, e.g.
"LoadedScript resource://testing-common/FooTestUtils.sys.mjs" instead
of just "LoadedScript". Module and ModuleEnvironmentObject JS objects
now include their filename, e.g. "JS Object (Module - .../foo.sys.mjs)".
This makes leak retention paths from ShutdownLeakPathFinder much more
actionable since the root and intermediate module nodes now show which
script is responsible.
Differential Revision: https://phabricator.services.mozilla.com/D285130
This reverts commit 0509c40c96.
Revert "Bug 2014919 - Remove JS support for Shadowrealms r=dminor"
This reverts commit 95ca58b094.
Revert "Bug 2014919 - Remove DOM ShadowRealms support r=edgar,smaug,webidl,dom-worker-reviewers"
This reverts commit 9ba95b42a1.
It is replaced by a standard-conforming cast to (void) which is
understood the same by the compiler.
In some cases this could be replaced by `[[maybe_unused]]` but for
expression whose value is ignored, this requires storing to a temporary
variable first, so not going that way.
One notable change is that marking an object of type already_AddRefed as
unused used to implicitly leak memory. This is now made explicit.
Most of the heavy lifting was done through:
$ git grep -l '\<Unused\> <<' | xargs sed -i -e 's/Unused << /(void)/g'
$ git grep -l mozilla/Unused.h | xargs sed -i -e '/mozilla\/Unused.h/ d'
Differential Revision: https://phabricator.services.mozilla.com/D268706
It is replaced by a standard-conforming cast to (void) which is
understood the same by the compiler.
In some cases this could be replaced by `[[maybe_unused]]` but for
expression whose value is ignored, this requires storing to a temporary
variable first, so not going that way.
One notable change is that marking an object of type already_AddRefed as
unused used to implicitly leak memory. This is now made explicit.
Most of the heavy lifting was done through:
$ git grep -l '\<Unused\> <<' | xargs sed -i -e 's/Unused << /(void)/g'
$ git grep -l mozilla/Unused.h | xargs sed -i -e '/mozilla\/Unused.h/ d'
Differential Revision: https://phabricator.services.mozilla.com/D268706
It is replaced by a standard-conforming cast to (void) which is
understood the same by the compiler.
In some cases this could be replaced by `[[maybe_unused]]` but for
expression whose value is ignored, this requires storing to a temporary
variable first, so not going that way.
One notable change is that marking an object of type already_AddRefed as
unused used to implicitly leak memory. This is now made explicit.
Most of the heavy lifting was done through:
$ git grep -l '\<Unused\> <<' | xargs sed -i -e 's/Unused << /(void)/g'
$ git grep -l mozilla/Unused.h | xargs sed -i -e '/mozilla\/Unused.h/ d'
Differential Revision: https://phabricator.services.mozilla.com/D268706
It is replaced by a standard-conforming cast to (void) which is
understood the same by the compiler.
In some cases this could be replaced by `[[maybe_unused]]` but for
expression whose value is ignored, this requires storing to a temporary
variable first, so not going that way.
One notable change is that marking an object of type already_AddRefed as
unused used to implicitly leak memory. This is now made explicit.
Most of the heavy lifting was done through:
$ git grep -l '\<Unused\> <<' | xargs sed -i -e 's/Unused << /(void)/g'
$ git grep -l mozilla/Unused.h | xargs sed -i -e '/mozilla\/Unused.h/ d'
Differential Revision: https://phabricator.services.mozilla.com/D268706
Currently this can fix up the gray bits before doing a GC (which will calculate
them from scratch), as well as fix them up after a GC (which will do nothing).
Differential Revision: https://phabricator.services.mozilla.com/D268433
We can simplify CycleCollectedJSRuntime::NoteGCThingXPCOMChildren and remove
the JS::MaybeGetScriptPrivate API if we store the script private in the first
slot of the script source object and use the JSClass flag to indicate this to
the cycle collector.
Differential Revision: https://phabricator.services.mozilla.com/D260671
If a GC has been triggered internally by the JS engine the cycle collector will
likely not have any zones waiting. The patch stops a full GC being triggered in
this case.
Differential Revision: https://phabricator.services.mozilla.com/D258359
So the goal here is that we get OOM data where processes survive long enough
send telemetry. To get the case where processes -crash- we'll also have to
get crash data. See Bug 1964092 for that half.
(Modified to include robustness changes reviewed in D250467)
Differential Revision: https://phabricator.services.mozilla.com/D248083