Bug 1650705's geckoview-junit test counts the number of input event times.
It is unnecessary to wait for selection event and Gecko may not sometimes
fire selection event on input or textarea element. So use
InputConnection.setSelection directly instead of waiting for DOM event.
Differential Revision: https://phabricator.services.mozilla.com/D109354
Note that this removes `window.ondeviceproximity` and `window.onuserproximity` which unexpectedly have been exposed unconditionally.
Differential Revision: https://phabricator.services.mozilla.com/D109160
We used to support having a null delegateController because WebExtension could
be constructed from the app. Now that we can only go through the Controller we
don't need to do that anymore.
Differential Revision: https://phabricator.services.mozilla.com/D108695
Android R+ has new API to set initial surrounding text.
According to Android commit log [*], it can improve IME start up performance
when setting initial surrounding text that is new API from Android API 30.
* c486acc4d2
Differential Revision: https://phabricator.services.mozilla.com/D108736
As discussed in the bug, when the app calls `loadUri` without
`LOAD_FLAGS_EXTERNAL` and there is no referrer session, we may always use the
system principal as the requesting principal.
I removed all the special-casing of the other various schemes under the
expectation that, under the conditions described above, they are also subject
to the same policy.
Differential Revision: https://phabricator.services.mozilla.com/D107517
* We remove the reference to `MOZ_ANDROID_DATA_DIR`, since it appears to have no
more references in mozilla-central. There is one reference in the xpcshell
harness for which I have filed a follow-up bug.
* Given that the following variables are not useful by content, we restrict
their retrieval to the parent process:
* `DOWNLOADS_DIRECTORY`
* `UPDATES_DIRECTORY`
* `EXTERNAL_STORAGE`
* `CACHE_DIRECTORY`
* `PUBLIC_STORAGE`
* Initial prefs
* `TMPDIR` is still used by the XPCOM directory service. Given that we can still
retrieve this value safely under `isolatedProcess`, we leave this in for now.
We can revisit this one in the future.
* We restrict retrieval of the user serial number to the parent process. AFAICT
we do send this value along with crash reports, so I modified `IChildProcess.start`
to accept this value and propagate it into the child process's environment
so that an isolated process crash may still include it.
* The remaining envrionment variables remain safe to retrieve when isolated.
Differential Revision: https://phabricator.services.mozilla.com/D108507
This dates back to a time before the browser console where the normal content
console could optionally show chrome code messages. Today it serves no use.
Differential Revision: https://phabricator.services.mozilla.com/D108130
Before this patch, when the profile is locked on Android, we would call "ps",
parse the human-readable output and kill any other Gecko process that we could
find.
But this is completely unnecessary, as we know exactly that the PID of the
process holding the lock is.
In this patch we just kill the process holding the lock since this is
equivalent to the previous behavior.
Differential Revision: https://phabricator.services.mozilla.com/D106186
Updates `./mach bootstrap` to use `--no-interactive` from global args.
Ensures all bootstrap prompts have a default option.
Differential Revision: https://phabricator.services.mozilla.com/D106814
This error is sent to the native layer so we never log it (at least locally).
This also adds a "cause" exception to have the full stacktrace.
Differential Revision: https://phabricator.services.mozilla.com/D108038
For tests, we want to be able to run multiple runtimes at the same time (each
runtime gets its own process).
This mostly work, except our process allocator does not currently check that it
owns a certain process and it will happily try to take control of a different
runtime's process (and fail).
To make this work we tag each content process with the parent process' UUID so
that we can check whether the process that we try to create is free or not.
This strategy is pretty rudimental and we can iteratively improve on it if we
decide to use multiple runtimes on actual apps (and not just tests).
Differential Revision: https://phabricator.services.mozilla.com/D108037
There is a little Woodoo in this patch but here it is:
- According to the Android docs, services that implement onStartService are
_not_ considered bound services and need to stop themselves. Since we do want
our child processes to die after every client unbounds, we shouldn't implement
it.
- Sometimes processes don't die after |onDestroy| is called, this causes
processes being reused on some esoteric edge case (multiple runtimes, mostly).
To avoid these corner cases, we call System.exit in onDestroy. Note: chromium
does this too.
- We now don't need to kill the process on onBind anymore (this is mostly to
align with chromium).
- We make sure we don't get created multiple times, as that could cause really
weird behavior which is hard to debug (especially on users' devices).
Differential Revision: https://phabricator.services.mozilla.com/D108036
See bug for more details, but effectively the decision is to show the same
notification which we would normally show for hung pages if an iframe hangs,
but only do so if the user is trying to interact with content hung by that
iframe. This should accomplish that.
Differential Revision: https://phabricator.services.mozilla.com/D107933
GeckoResult uses the thread is instantiated on to run callbacks, so it's
important that the calling code builds GeckoResult on the same thread where
it's used to avoid suprising cross-thread effects.
The above assumption is broken when using ALLOW and DENY as these objects are
built on whatever thread happens to load the GeckoResult class in the JVM.
This change deprecates ALLOW and DENY and introdocues allow() and deny() which
build the GeckoResult instance on the same thread where they are called
avoiding any cross-thread problems.
Differential Revision: https://phabricator.services.mozilla.com/D107729
Note that this patch only transforms the use of the nsDataHashtable type alias
to a directly equivalent use of nsTHashMap. It does not change the specification
of the hash key type to make use of the key class deduction that nsTHashMap
allows for in some cases. That can be done in a separate step, but requires more
attention.
Differential Revision: https://phabricator.services.mozilla.com/D106008
This is simple typo when payload is nothing.
Also, we should add unit tests for this since we don't run mochitest in
dom/push/test. The mochitest requires mock's implementation, but we doesn't
have it.
Differential Revision: https://phabricator.services.mozilla.com/D107067