This change introduces a new interface, nsIThreadShutdown, which is used
to handle the relevant state for communicating thread shutdown state
between the joining and terminating threads. This type is now returned
from `nsIThread::AsyncShutdown` and can be used to register callbacks
for when thread shutdown is complete, as well as cancel shutdown
entirely, leading to the underlying PRThread never being joined using
PR_JoinThread. This leaking limitation may be avoidable if support for
detaching PRThreads is added to NSPR, or nsThread switches to a more
feature-complete threading API.
This patch also uses the new interface to rework nsThreadPool's Shutdown
and ShutdownWithTimeout methods to avoid poking at nsThread internals
and instead use the publicly facing methods. This allows us to start
async shutdown for all threads and spin the event loop until they all
complete, or a timeout timer fires.
Differential Revision: https://phabricator.services.mozilla.com/D136045
This simplifies the logic around descriptors significantly, which is
especially useful considering how few places use the type. There is a
small change required on Windows to create the NamedPipe directly and
transfer around each end's handle, rather than connecting between
processes after the fact.
A named pipe has to be used, rather than an anonymous pipe, as
bidirectional communication is required.
Differential Revision: https://phabricator.services.mozilla.com/D130381
There's a bug with `ProcessHandler` on Windows that sometimes causes
tests to hang for an additional 3 minutes. This is a workaround that
just replaces `ProcessHandler` with a standard Python3 approach that
achieves the same thing.
Also added some logging output as the threads are created as some
additional feedback. Prior to this, the tests silently started
running without any indication.
Differential Revision: https://phabricator.services.mozilla.com/D137822
This can happen in cases where we have an old ICE ctx that is infeasible, but have
kicked off an ICE restart with a new configuration that _is_ feasible. The old streams
are not obsolete yet, because we have not committed the ICE restart.
Differential Revision: https://phabricator.services.mozilla.com/D135375
Because a given ICE ctx can have multiple configurations active at once (since
setConfiguration is tentative until the ICE restart it requires is finalized), we
give each stream its own config, since that is simple.
I also renamed the stun/turn server fields in nr_ice_ctx, to make it easier to
check that I did not miss any places that needed to be switched over to using the
fields in nr_ice_media_stream.
Differential Revision: https://phabricator.services.mozilla.com/D135372
Once we allow the ICE servers to be set, each stream can have a different array
of ICE servers, and those ICE servers can have different lifetimes. Let's avoid
the potential dangling pointer issue here.
Also, this fixes a minor spec violation where we were doing foundation comparison
incorrectly (we're supposed to only compare the address).
Differential Revision: https://phabricator.services.mozilla.com/D135369
Used to be built into CreateIceCtx, but needed to be stand-alone so it
could be called subsequently. Necessitated adding some members so pref-based
config state could be saved for later use.
Differential Revision: https://phabricator.services.mozilla.com/D135365
Re-enable several tests, and add some ICE testing using iceTransportPolicy.
Cannot test ICE servers, since wpt does not have any harness support for that.
Differential Revision: https://phabricator.services.mozilla.com/D135361
This patch fixes the following build error:
layout/tables/FixedTableLayoutStrategy.cpp:86:31: error: incomplete type 'nsLayoutUtils' named in nested name specifier
I'm also removing the "DEBUG_TABLE_STRATEGY_off" definition from the contextual
section of moz.build, because that symbol is never used. (It's never mentioned
anywhere else in our codebase; it must have controlled some long-since-removed
code).
Differential Revision: https://phabricator.services.mozilla.com/D138217
Build errors fixed here:
layout/mathml/nsMathMLmpaddedFrame.h:68:14: error: field has incomplete type 'nsCSSValue'
* Fixed by including this type's header.
[various files]: error: use of undeclared identifier 'nsLayoutUtils'
* Fixed by including the nsLayoutUtils header.
[various files]: error: member access into incomplete type 'mozilla::dom::Element'
* These are for calls to [something]->AsElement()->HasAttr() and SetAttr(). Fixed by including Element.h in all affected .cpp files.
[various files]: error: member access into incomplete type 'nsINode::Document' (aka 'mozilla::dom::Document')
* These are for calls to mContent->OwnerDoc()->WarnOnceAbout(). Fixed by including Document.h in all affected files.
Depends on D138202
Differential Revision: https://phabricator.services.mozilla.com/D138203
This fixes the following build errors:
layout/forms/nsRangeFrame.cpp:135:42: error: member access into incomplete type 'const nsIFrame::nsDisplayListSet' (aka 'const mozilla::nsDisplayListSet')
layout/forms/nsRangeFrame.cpp:363:19: error: incomplete type 'nsLayoutUtils' named in nested name specifier
Differential Revision: https://phabricator.services.mozilla.com/D138202
Currently, we pass all the five fields in FlexLayoutResult separately into
ReflowChildren(), but we really should just pass FlexLayoutResult instead.
Differential Revision: https://phabricator.services.mozilla.com/D138100
We've got the tentative cross size before calling DoFlexLayout() in Reflow(), so
we can just use that value in DoFlexLayout and a few other methods.
Also, add "ContentBox" to naming of the main size argument ComputeMainSize().
Differential Revision: https://phabricator.services.mozilla.com/D137365
I found in/out parameters confusing when reasoning the data flow. Aggregating
DoFlexLayout's output data in a struct also reduces DoFlexLayout's number of
arguments.
Differential Revision: https://phabricator.services.mozilla.com/D137364
The `struts` array is used only within DoFlexLayout, so we should move it into
`if (!GetPrevInFlow()) { ... }` branch.
Also, move `nsTArray<StrutInfo>&` argument on DoFlexLayout() to the second to
last place so that the output arguments are grouped together after applying Part
4.
Differential Revision: https://phabricator.services.mozilla.com/D137363
Move the assertion for unconstrained isize to the beginning of Reflow() because
we check it in all cases -- in GetMainSizeFromReflowInput when a flex container
is row-oriented, or in the old code computing gap size and ComputeCrossSize()
when a flex container is column-oriented.
Differential Revision: https://phabricator.services.mozilla.com/D137361
The new `mozlint` behaviour will always lean on the VCS
to only lint changed files.
However, in tests, the VCS is going to be slow and also provide
inconsistent data between tests. Additionally, in some contexts,
the VCS won't be available.
Resolve this by hardcoding a file to lint for each case.
Differential Revision: https://phabricator.services.mozilla.com/D138033