Root cause: in the current tree, mach commands in mozilla-central output a
warning to stderr. The substitute-local-geckoview script was calling a mach
command and combining the stdout and stderr streams of the process, parsing
it as JSON. This warning is not JSON so the script crashed.
The crashing code was copied from settings.gradle:
https://searchfox.org/mozilla-central/rev/b70bc09685763c44a8e56e4e04cb741fa020701a/settings.gradle#26
The code in settings.gradle does an intuitive thing - capture stderr separately
but only print it on subprocess non-zero exit value - so we also copy that
solution. I'm not sure what an appropriate place to store code shared between
these two files would be so I didn't try to deduplicate it.
Differential Revision: https://phabricator.services.mozilla.com/D137591
Make the SurfaceAllocator save a reference to all Surfaces it has
allocated. When the connection to the remote allocator dies, mark all
of those surfaces as released. Ensure subsequent attempts to allocate
new Surfaces will connect to the new compositor process (either GPU or
parent).
For webgl, when we detect we are using a Surface that has been
released, clear the pool of Surfaces used for the swapchain so that
we automatically reallocate new ones.
For video, if we encounter an error in RemoteVideoDecoder and can see
that Surface has been released, then report a
NS_ERROR_DOM_MEDIA_NEED_NEW_DECODER in place of the potentially fatal
error code we get from the java decoder. This will ensure a new
decoder is created, which will in turn allocate a new Surface to
decode in to.
On the Android emulator (so potentially real devices too) the java
decoder doesn't actually report any errors in response to the Surface
being released. Therefore we also check for the Surface being released
in ProcessOutput(), and manually raise the NEED_NEW_ENCODER error from
there if so.
Differential Revision: https://phabricator.services.mozilla.com/D133108
This patch adds a partial OffscreenCanvasRenderingContext2D
implementation. It is missing anything text and UI related, including
CanvasFilters, CanvasUserInterface, CanvasText, CanvasTextDrawingStyles,
and CanvasHitRegions.
Differential Revision: https://phabricator.services.mozilla.com/D135354
This patch is a non-functional change. It overloads some WebIDL methods
of CanvasRenderingContext2D to account for the difference between the
main thread and worker prototypes.
Differential Revision: https://phabricator.services.mozilla.com/D135353
This patch is a non-functional change which allows the shutdown observer
to be overridden (since workers have a different mechanism). It also
fixes a static counter to be atomic, and adds mOffscreenCanvas to the
cycle collection tracking.
Differential Revision: https://phabricator.services.mozilla.com/D135352
This test is based on the general structure of
js/src/tests/non262/ReadableStream/readable-stream-globals.js, however the
expectations have been commented and updated to match what we believe is
the correct WebIDL behaviour.
Not all the features of that test case have been ported over, as there's
some stuff around the handling of Symbol.species that we can test elsewhere,
and it attempts to test BYOB streams, which we have yet to implement.
Note: I tried to initially write this as an xpcshell test case using
Cu.sandbox; but I found that I wasn't geting global behaviour that matched
my expectations from testing on the web.
Differential Revision: https://phabricator.services.mozilla.com/D137492
When searching a lazy stub segment for the code range that holds a
particular PC value, we can quickly exclude segments that are
guaranteed not to match by comparing the PC to the values at the
segment's endpoints - the code ranges in a segment are sorted, and
this filtering will cause the search to skip most segments. This very
significantly reduces the time spent in the search.
Differential Revision: https://phabricator.services.mozilla.com/D137518
The indirect stubs code needs to take a lock on the lazy stub tier
when mapping back from code pointer to function index during a
Table::get on a table of funcref. This code is amazingly hot in one
large wasm application and is almost unusable because of lock
contention caused by this lookup.
However, the tier tables are mostly stable at this point and parallel
lookups are fine, so we need to allow for multiple readers. The
easiest way to do this is by using a multi-reader/single-writer
ExclusiveData variant, introduced here.
Differential Revision: https://phabricator.services.mozilla.com/D137516
Fix to landed patch D136606. The original patch did not fix the test in the dFPI case as `SimpleTest.xOrigin` was always false-y.
This also meant it broke nothing, but the patch was a no-op. Changing this conditional causes the expected functionality of D136606 to work.
Differential Revision: https://phabricator.services.mozilla.com/D137466
Changes:
* Extends masm's operations with SimdConstants as an args, to be non-destructive
* Refactor BaseAssembler rrip encoding helpers
* Remove unused ripr helpers -- not going to store anything if the code
* Add moveSimd128XXXIfNotAVX helpers
Differential Revision: https://phabricator.services.mozilla.com/D137080