Add browser support for FinalizationGroup by setting the HostCleanupFinalizationGroupCallback in CycleCollectedJSContext. The callback adds groups pending cleanup to a vector stored in a PersistentRooted. A runnable is dispatched to call back into the JS engine and perform cleanup at a later time as a separate task. Using AutoEntryScript reports errors to the console.
Differential Revision: https://phabricator.services.mozilla.com/D53248
--HG--
extra : moz-landing-system : lando
We are getting this exception because we return false here and do not perform
the microtask checkpoint when CycleCollectedJSContext::runJobs executes, but
the contract of runJobs() _requires_ that the microtask queue be empty after
is has completed execution.
CycleCollectedJSContext::RecursionDepth() returns the depth taking the debugger
recursion depth and the thread recursion depth into account, however when
used here, mTargetedMicroTaskRecursionDepth is expects to only be compared
against the thread recursion depth
Differential Revision: https://phabricator.services.mozilla.com/D58901
--HG--
extra : moz-landing-system : lando
Splits WebGLContext into ClientWebGLContext and HostWebGLContext. The Client enables the JS-control of a WebGL context in a content procecss while the Host executes the WebGL graphics operations (via a WebGLContext that maintains much of the existing code) in the compositor process. At this point, the cross-process behavior is disabled -- this series of patches is an incremental step toward that final goal.
Differential Revision: https://phabricator.services.mozilla.com/D54018
--HG--
extra : moz-landing-system : lando
nsIMutable is used only by DOM Blob/File. But Blobs are immutable by spec.
FileBlobImpl has a couple of lazy member values, but those are called when
the object is cloned in order to be sent to a different thread/process.
Differential Revision: https://phabricator.services.mozilla.com/D58946
--HG--
extra : moz-landing-system : lando
nsIMutable is used only by DOM Blob/File. But Blobs are immutable by spec.
FileBlobImpl has a couple of lazy member values, but those are called when
the object is cloned in order to be sent to a different thread/process.
Differential Revision: https://phabricator.services.mozilla.com/D58716
--HG--
extra : moz-landing-system : lando
This converts straightforward `nsAutoPtr` usage over to `UniquePtr`.
`nsClassHashtable` is left alone for now as that will have a larger impact.
`nsThread` is left alone for now as it has non-trivial ownership concepts.
Differential Revision: https://phabricator.services.mozilla.com/D58284
--HG--
extra : moz-landing-system : lando
This removes various unused `#include "nsAutoPtr.h"` in `xpcom/`. Additionally
adds a few includes to the media stack.
Differential Revision: https://phabricator.services.mozilla.com/D58282
--HG--
extra : moz-landing-system : lando
This changeset is a simple find and replace of `MOZ_FALLTHROUGH` and `[[fallthrough]]`.
Unfortunately, the MOZ_FALLTHROUGH_ASSERT macro (to assert on case fallthrough in debug builds) is still necessary after switching from [[clang::fallthrough]] to [[fallthrough]] because:
* MOZ_ASSERT(false) followed by [[fallthrough]] triggers a -Wunreachable-code warning in DEBUG builds
* but MOZ_ASSERT(false) without [[fallthrough]] triggers a -Wimplicit-fallthrough warning in NDEBUG builds.
Differential Revision: https://phabricator.services.mozilla.com/D56440
--HG--
extra : moz-landing-system : lando
GetCurrentPhysicalThread and GetCurrentVirtualThread are, in practice,
identical, as the TLS override that GetCurrentVirtualThread depends on
is never actually set. This simply removes that and renames some things/
deletes some comments.
Rebased across https://hg.mozilla.org/mozilla-central/rev/3f0b4e206853
by Karl Tomlinson <karlt+@karlt.net>.
Differential Revision: https://phabricator.services.mozilla.com/D41247
--HG--
extra : moz-landing-system : lando
The inclusions were removed with the following very crude script and the
resulting breakage was fixed up by hand. The manual fixups did either
revert the changes done by the script, replace a generic header with a more
specific one or replace a header with a forward declaration.
find . -name "*.idl" | grep -v web-platform | grep -v third_party | while read path; do
interfaces=$(grep "^\(class\|interface\).*:.*" "$path" | cut -d' ' -f2)
if [ -n "$interfaces" ]; then
if [[ "$interfaces" == *$'\n'* ]]; then
regexp="\("
for i in $interfaces; do regexp="$regexp$i\|"; done
regexp="${regexp%%\\\|}\)"
else
regexp="$interfaces"
fi
interface=$(basename "$path")
rg -l "#include.*${interface%%.idl}.h" . | while read path2; do
hits=$(grep -v "#include.*${interface%%.idl}.h" "$path2" | grep -c "$regexp" )
if [ $hits -eq 0 ]; then
echo "Removing ${interface} from ${path2}"
grep -v "#include.*${interface%%.idl}.h" "$path2" > "$path2".tmp
mv -f "$path2".tmp "$path2"
fi
done
fi
done
Differential Revision: https://phabricator.services.mozilla.com/D55444
--HG--
extra : moz-landing-system : lando
This patch make changes of Gecko infrastrutures to run a fork server
process.
- ForkServerLauncher is a component, which creates a fork server
process at XPCOM startup.
- nsBrowserApp.cpp and related files have been chagned to start a
fork server in a process.
- Logging and nsTraceRefcnt were changed to make it work with the
fork server.
Depends on D46883
Differential Revision: https://phabricator.services.mozilla.com/D46884
--HG--
extra : moz-landing-system : lando
This patch make changes of Gecko infrastrutures to run a fork server
process.
- ForkServerLauncher is a component, which creates a fork server
process at XPCOM startup.
- nsBrowserApp.cpp and related files have been chagned to start a
fork server in a process.
- Logging and nsTraceRefcnt were changed to make it work with the
fork server.
Depends on D46883
Differential Revision: https://phabricator.services.mozilla.com/D46884
--HG--
extra : moz-landing-system : lando
I also removed the unused forward declaration of GMPLoader. It used to
be needed for the declaration of XRE_InitChildProcess.
Differential Revision: https://phabricator.services.mozilla.com/D54819
--HG--
extra : moz-landing-system : lando
For processes besides the main process, the leak log is derived from
the value of XPCOM_MEM_BLOAT_LOG, but for the main process, it is
simply whatever XPCOM_MEM_BLOAT_LOG is. This patch adds code to handle
the latter case.
It would be nice to share this code with nsTraceRefcnt.cpp, but
NoteIntentionalCrash() is used in the test plugins so I don't think it
can actually call into libxul. The logic isn't all that complex.
Differential Revision: https://phabricator.services.mozilla.com/D54374
--HG--
extra : moz-landing-system : lando
This function works on all GeckoProcessTypes, not just those for child
processes.
Differential Revision: https://phabricator.services.mozilla.com/D54375
--HG--
extra : moz-landing-system : lando
This function works on all GeckoProcessTypes, not just those for child
processes.
Differential Revision: https://phabricator.services.mozilla.com/D54375
--HG--
extra : moz-landing-system : lando
This will prevent the leak checker from reporting a missing log for
that process, which results in incorrect starring on TreeHerder. Both
of these failures should be detected as a failure.
Differential Revision: https://phabricator.services.mozilla.com/D53095
--HG--
extra : moz-landing-system : lando
The formatting change presumably happens because clang-format treats
include guards differently.
Differential Revision: https://phabricator.services.mozilla.com/D52698
--HG--
extra : moz-landing-system : lando
The include guard needs to happen before any non-trivial tokens.
I guess this change made clang-format decide the other ifdefs aren't
actually nested, so it dropped the indents.
Differential Revision: https://phabricator.services.mozilla.com/D52691
--HG--
extra : moz-landing-system : lando
promise rejection event was enabled by default on 69 (bug 1525554).
We could get rid of this preference.
Differential Revision: https://phabricator.services.mozilla.com/D51491
--HG--
extra : moz-landing-system : lando
This patch uses the low memory resource notification facility to detect
scenarios where physical memory is running low without polling. This is a
significant change compared to the previous behavior which measured both
available virtual memory (only on 32-bit builds) and available commit space.
Since we're not trying to avoid OOMs anymore we don't save memory reports
anymore when hitting a low-memory condition.
Differential Revision: https://phabricator.services.mozilla.com/D50471
--HG--
extra : moz-landing-system : lando