Also adds missing includes in some files, these were previously only transivitely
included through mozilla/TypeTraits.h.
Differential Revision: https://phabricator.services.mozilla.com/D68561
--HG--
extra : moz-landing-system : lando
Also move MOZ_MUST_USE before function declarations' specifiers and return type. While clang and gcc's __attribute__((warn_unused_result)) can appear before, between, or after function specifiers and return types, the [[nodiscard]] attribute must precede the function specifiers.
Also remove MOZ_MUST_USE from nsIMemoryReporter's function pointer typedefs. [[nodiscard]] is an attribute of a function's declaration, not the function's type, and thus can't be applied to function pointers or lambdas.
Differential Revision: https://phabricator.services.mozilla.com/D68138
--HG--
extra : moz-landing-system : lando
Set the flag on the affected classes, which are:
- CallbackTimeoutHandler
- nsJSArgArray
- CallbackObject
- Console
- MessageEvent
- IDBIndexCursor
- ExtendableMessageEvent
- JSPurpleBuffer
Differential Revision: https://phabricator.services.mozilla.com/D68196
--HG--
extra : moz-landing-system : lando
This adds the flag itself and a means of setting it for a cycle collected class.
The proper way to do this would be to add versions of all the NS_DECL_CYCLE_COLLECTION_CLASS macros that also set this flag but we end up needing to create separate versions for five of these and it's a lot of macro code to add. Here I added a version of NS_IMPL_CYCLE_COLLECTION_CLASS that sets the flag. This has the disadvantage that it wouldn't work well if we needed to set the flag on a base class as we'd have to use this macro for every derived class. However that situation doesn't actually arise (and ideally this flag will bet set on the fewest number of classes possible).
Differential Revision: https://phabricator.services.mozilla.com/D68195
--HG--
extra : moz-landing-system : lando
Currently classes derived from nsCycleCollectionParicipant have one flag to pass and adding more makes the class delcaration macros get messy really quickly. This patch replaces boolean flags with a bitfield which makes adding new flags easier.
Differential Revision: https://phabricator.services.mozilla.com/D68194
--HG--
extra : moz-landing-system : lando
To correctly implement this, it must be known on instantiation whether E is
copy-constructible, which is not the case if only a forward declaration is
available. This can be resolved either by making sure a full definition of E is
available, which is preferable. But in cases where this is not (easily) possible,
the information can be explicitly provided by the MOZ_DECLARE_COPY_CONSTRUCTIBLE
and MOZ_DECLARE_NON_COPY_CONSTRUCTIBLE macros. In particular, declarations for
IPDL-declared types are added to nsTArray.h itself, like it was already done
for MOZ_DECLARE_RELOCATE_USING_MOVE_CONSTRUCTOR.
Differential Revision: https://phabricator.services.mozilla.com/D66244
--HG--
extra : moz-landing-system : lando
- Do not remove elements one-by-one but use remove-erase pattern.
- Move mPendingIDBTransactions array instead of copying.
Differential Revision: https://phabricator.services.mozilla.com/D67159
--HG--
extra : moz-landing-system : lando
There's no existing macro to allow use declare a final
DeleteCycleCollectable, this patch adds one
Differential Revision: https://phabricator.services.mozilla.com/D63262
--HG--
extra : moz-landing-system : lando
BrowserTestUtils.crashFrame now accepts additional `options`, with an argument `crashType` that may
take "CRASH_OOM" or "CRASH_INVALID_POINTER_DEREF"|null to specify the nature of the crash. The names
are taken from CrashTestUtils.jsm but this module cannot be imported as such as it has non-trivial
binary dependencies.
Depends on D54130
Differential Revision: https://phabricator.services.mozilla.com/D54700
--HG--
extra : moz-landing-system : lando
Right now, we sync finalize for a sync GC, even if it is triggered by the JS
engine itself. This can cause issues because the finalizer can run JS, which
can break assumptions made by the JIT.
This patch avoids that by running the finalizers incrementally for most internal
GC triggers. We still run sync for DESTROY_RUNTIME because we're going to shut
down right away.
Differential Revision: https://phabricator.services.mozilla.com/D65649
--HG--
extra : moz-landing-system : lando
We are intending to advance the toolkit.shutdown.lateWriteChecksStage
pref, to collect information (and crash on DEBUG) about writes which
happen during and after the xpcom-shutdown-threads notification. This
is producing failures in the PrintTargetPDF.cpp destructor because
we end up calling write_func and writing to (I presume) the target
PDF. This _feels_ like something we can just skip, so that's the
review request I am sending, but please let me know if it's critical
that we write to this file during shutdown.
Differential Revision: https://phabricator.services.mozilla.com/D63218
--HG--
extra : moz-landing-system : lando
This moves the late write checking forward to before xpcom-shutdown-threads
in Nightly, and it turns it on for after the last cycle collection on
beta/release.
Differential Revision: https://phabricator.services.mozilla.com/D63215
--HG--
extra : moz-landing-system : lando