Sorry for the massive patch but I found it hard to split without
introducing a bunch of copies around...
This mostly makes necko and DOM agree on which strings to use, which
should result on less copies and conversions.
Differential Revision: https://phabricator.services.mozilla.com/D205601
This uses BrowserEngineKit's ExtensionKit-based processes to start content
processes on iOS. These processes are started with an initial xpc connection,
which is then used to communicate a command line, initial file descriptors
and environment variables before invoking content_process_main.
The XPC connection is not used further after the bootstrap message, which seems
to roughly match how WebKit uses these APIs.
Differential Revision: https://phabricator.services.mozilla.com/D202525
This removes intr support and updates some stale docs as well.
It's not immediately clear what code in MessageChannel can be removed,
though I expect some things could be simplified (there's just not much
alluding to intr/rpc/urgent).
Differential Revision: https://phabricator.services.mozilla.com/D204813
This removes intr support and updates some stale docs as well.
It's not immediately clear what code in MessageChannel can be removed,
though I expect some things could be simplified (there's just not much
alluding to intr/rpc/urgent).
Differential Revision: https://phabricator.services.mozilla.com/D204813
Move initializing gfxVar from creating a video bridge to the moment we
create UtilityAudioDecoderParent in order to ensure that we can always
get correct value from gfxVar.
Differential Revision: https://phabricator.services.mozilla.com/D204292
This method (intended to be used only in tests) returns whether the current transaction stack is
complete, and is used by TestHangs to determine when to continue in the HangButReceive subtest.
Differential Revision: https://phabricator.services.mozilla.com/D203964
The macro and function are meant to only be used in test circumstances, where we want the failure to
be returned. Normally in `DEBUG` builds the failure causes an immediate crash.
Differential Revision: https://phabricator.services.mozilla.com/D201158
This method (intended to be used only in tests) blocks until the current transaction stack is
complete, and is used by TestHangs to determine when to continue in the HangButReceive subtest.
Differential Revision: https://phabricator.services.mozilla.com/D203964
The macro and function are meant to only be used in test circumstances, where we want the failure to
be returned. Normally in `DEBUG` builds the failure causes an immediate crash.
Differential Revision: https://phabricator.services.mozilla.com/D201158
When disabling the audio utility pref, there are some tests testing the
fallback mechanism, which means the audio decoding would happen either
on the RDD process or the content process.
However, on wmfme, the pref `media.wmf.media-engine.channel-decoder.enabled`
is enabled [1] in order to run non-mse playback on the MFCDM process,
that causes failure for those tests.
As that pref is a test-only pref and won't be used on the production, we
should simply disable that pref for those tests in order to get the
expected behavior.
[1] https://searchfox.org/mozilla-central/rev/b55a24116575b1b6c17f1aa56a0b142d86dfa41c/taskcluster/ci/test/variants.yml#343
Depends on D203953
Differential Revision: https://phabricator.services.mozilla.com/D203954
Add these tests into wmfme task in order to verify whether they can run
well when the media engine related prefs are enabled.
Depends on D203952
Differential Revision: https://phabricator.services.mozilla.com/D203953
There is a timing issue where we would re-initialize the video bridge
causing an assertion, which is discovered by
`browser_utility_multipleAudio.js`.
Differential Revision: https://phabricator.services.mozilla.com/D203518
Windows has an ill-documented subsystem known as the Application Launch
Prefetcher, which apparently preloads DLLs for a binary based on what
DLLs that binary loaded last time.
For Firefox, that's not a great heuristic; we relaunch ourselves as a
subprocess with potentially completely different DLL settings. We're not
the only such application, though, and Windows _does_ have a way to
signal the ALPF to load different DLL sets depending on launch context.
Differential Revision: https://phabricator.services.mozilla.com/D202275
There is a timing issue where we would re-initialize the video bridge
causing an assertion, which is discovered by
`browser_utility_multipleAudio.js`.
Depends on D203307
Differential Revision: https://phabricator.services.mozilla.com/D203518
This changes comes with several different refactorings all rolled into one,
unfotunately I couldn't find a way to pull them apart:
- First of all annotations now can either recorded (that is, we copy the value
and have the crash reporting code own the copy) or registered. Several
annotations are changed to use this functionality so that we don't need to
update them as their value change.
- The code in the exception handler is modified to read the annotations from
the mozannotation_client crate. This has the unfortunate side-effect that
we need three different bits of code to serialize them: one for annotations
read from a child process, one for reading annotations from the main process
outside of the exception handler and one for reading annotations from the
main process within the exception handler. As we move to fully
out-of-process crash reporting the last two methods will go away.
- The mozannotation_client crate now doesn't record annotation types anymore.
I realized as I was working on this that storing types at runtime has two
issues: the first one is that buggy code might change the type of an
annotation (that is record it under two different types at two different
moments), the second issue is that types might become corrupt during a
crash, so better enforce them at annotation-writing time. The end result is
that the mozannotation_* crates now only store byte buffers, track the
format the data is stored in (null-terminated string, fixed size buffer,
etc...) but not the type of data each annotation is supposed to contain.
- Which brings us to the next change: concrete types for annotations are now
enforced when they're written out. If an annotation doesn't match the
expected type it's skipped. Storing an annotation with the wrong type will
also trigger an assertion in debug builds.
Differential Revision: https://phabricator.services.mozilla.com/D195248
There's a race between `ProcessWatcher` checking if the fork server is
in use (via `ForkServiceChild::Get`) and the fork server shutdown path
(`ForkServerLauncher::Observe` calling `StopForkServer`). The race
seems to be benign, but it causes test failures under TSan.
As a relatively simple fix, this patch changes `ProcessWatcher` to check
an atomic flag which is true if the fork server has ever been run.
(This also means that, in the case where the fork server has been shut
down but some of its child processes are still running, we will continue
to use the `kill(pid, 0)` fallback.)
Differential Revision: https://phabricator.services.mozilla.com/D203077
mLocale is currently initialized in IndexedDatabaseManager::Init which is
called from IndexedDatabaseManager::GetOrCreate if the manager doesn't exist.
This can be a problem when IndexedDatabaseManager::GetOrCreate is called very
early,for example in nsLayoutStatics::Initialize in the parent process.
This is a preparation for moving IndexedDatabaseManager::GetOrCreate from
FactoryOp::Open to InitializeQuotaManager.
Differential Revision: https://phabricator.services.mozilla.com/D189891