Граф коммитов

27003 Коммитов

Автор SHA1 Сообщение Дата
Rob Wu 09b9c33d59 Bug 1734987 - Part 3.2 - Pass explicit isPrivileged flag to ExtensionData calls r=rpl,geckoview-reviewers,calu
Although the default value for isPrivileged is false in the
ExtensionData constructor, let's add the explicit value (false) so that
it's obvious that the default value is intended.

Differential Revision: https://phabricator.services.mozilla.com/D139725
2022-02-27 13:23:58 +00:00
Mark Banner ba057855f5 Bug 1691706 - Ensure Add-on Manager has finished initialising before the Search Service starts using it. r=daleharvey,robwu,agi
Differential Revision: https://phabricator.services.mozilla.com/D139146
2022-02-25 19:55:28 +00:00
Michael Comella 99b496e846 Bug 1756251 - fix concurrency bug in GeckoJavaSampler.isProfilerActive. r=geckoview-reviewers,julienw,agi
Concurrency bug: this method accesses mutable state but is not synchronized so
the caller isn't guaranteed to see the latest values.

We fix it by using an AtomicReference. This slightly complicates the thread
policy (which is to otherwise synchronize access to mutable state) but avoids
the increased contention that could come from using synchronized for
consistency.

This is the only concurrency bug I found throughout my thread safety
documentation.

Differential Revision: https://phabricator.services.mozilla.com/D139199
2022-02-24 19:11:59 +00:00
Michael Comella bd95db3608 Bug 1756251 - document thread safety of GeckoJavaSampler. r=julienw
I documented the existing way we maintain thread safety in this class.

Differential Revision: https://phabricator.services.mozilla.com/D139198
2022-02-24 19:11:58 +00:00
Michael Comella 349e2b3016 Bug 1756251 - improve GeckoJavaSampler.SamplingRunnable thread safety. r=julienw
getSample's callers are synchronized in the current implementation so there are
no concurrency bugs there but it can later be called by an unsynchronized caller
so I added synchronization to it and documented the thread safety guarantees.

Differential Revision: https://phabricator.services.mozilla.com/D139197
2022-02-24 19:11:57 +00:00
Michael Comella 0046f80d33 Bug 1756251 - make GeckoJavaSampler.Sample effectively immutable. r=julienw
As used, the class is effectively immutable which provides some thread safety
guarantees so I updated the declarations so the class could take advantage of
that.

Effectively immutable classes need to be safely published in order to be thread
safe. I believe we could avoid the need for safe publishing (i.e. strengthen
thread safety guarantees) if we replaced the Frame[] type with a
thread safe data type (AtomicReferenceArray, a concurrent list, etc.).

Differential Revision: https://phabricator.services.mozilla.com/D139196
2022-02-24 19:11:56 +00:00
Michael Comella ed5d0fae31 Bug 1756251 - make GeckoJavaSampler.Marker thread safe. r=julienw
Like Frame, this class was not thread safe because it exposed mutable state.
However, it was being used in an immutable manner so it was trivial to make it
thread safe.

Differential Revision: https://phabricator.services.mozilla.com/D139195
2022-02-24 19:11:56 +00:00
Michael Comella 1782f0939b Bug 1756251 - make GeckoJavaSampler.Frame thread safe. r=geckoview-reviewers,julienw,agi
This class was not thread safe because the fields in this class were mutable
and access to mutable state must be synchronized across threads. This class was
only used in an immutable fashion, however, so it was trivial to make it
immutable and thus thread safe.

Differential Revision: https://phabricator.services.mozilla.com/D139194
2022-02-24 19:11:56 +00:00
Michael Comella 886b5a4f49 Bug 1756251 - document thread safety of GeckoJavaSampler.MarkerStorage. r=julienw
This class already appears to be thread safe so I documented the policy I saw.

Differential Revision: https://phabricator.services.mozilla.com/D139193
2022-02-24 19:11:55 +00:00
Michael Comella c46226129e Bug 1632682 - init scripts after ScriptCacheChild::Init in content process. r=geckoview-reviewers,agi,mccr8
Root cause: some scripts in the content process were loaded before the script
cache was available there so these scripts were never written to the cache and
thus were never loaded from cache on subsequent runs, affecting performance.
These scripts listened for the app-startup topic.

This patch introduces a new topic to indicate when the script cache is init so
scripts previously listening to app-startup can listen to the new topic instead.

Differential Revision: https://phabricator.services.mozilla.com/D138501
2022-02-24 01:52:34 +00:00
Makoto Kato fae18cd010 Bug 1755052 - Don't use `getPrimaryClip` when we check whether clipboard item exists. r=geckoview-reviewers,agi
From Android 12 [*1], Accessing primary clip shows the toast message. So
`hasData` should avoid `getPrimaryClip` call.

From Android P, `ClipboardManager` can remove primary clip by API, so we should
use it. But according to Blink's code [*2], this API is unstable on Android P,
so we should use it from Android Q, not P.

Actually, we used `coerceToText` for `hasData` and `coerceToText` can convert
some types to text, so should allow these MIME types from Android Q.

*1 https://developer.android.com/about/versions/12/behavior-changes-all#clipboard-access-notifications
*2 https://crbug.com/1203377 (hidden)

Differential Revision: https://phabricator.services.mozilla.com/D139298
2022-02-24 01:47:56 +00:00
Narcis Beleuzu be477df7f9 Backed out 3 changesets (bug 1752968) for GTest crashes on wrappers.cpp . CLOSED TREE
Backed out changeset 1ab482292c62 (bug 1752968)
Backed out changeset a57257eab3fc (bug 1752968)
Backed out changeset 7c29431ee202 (bug 1752968)
2022-02-24 02:48:07 +02:00
Agi Sferro 6bac1199d2 Bug 1741899 - Detach session from GeckoView when setting it to other instance. r=calu
Historically, we wanted apps to be deliberate about setting/unsetting sessions
on a GeckoView instace because we were worried that they might leak a
GeckoSession (which would leak a tab running in Gecko), so we expected apps to
call `view.releaseSession` and collect the returned session.

We also expected apps's code to be more straightforward and clearly have a
`release`/`set` session pair that could be verifiably happening in order.

All of the above assumptions are broken in AC, where the code for
`releaseSession` and `setSession` is driven by a reactive data store.

The state management piece is also so hard for AC that they call
`releaseSession` conservatively in a lot of places and never actually look at
the return value.

To more align GeckoView with AC's architecture this patch moves into the
direction where apps only `setSession` and never `release`.

GeckoView will release the session from the old GeckoView when
appropriate.

The only problem with the above is that we might get into a state
where the app thinks a  GeckoView is displaying a session while really it isn't
because the session was set to a different GeckoView.

To detect the above case we introduce a new flag called `mIsSessionPoisoned`
which is set whenever the GeckoView instance used to hold a reference to a
session which has since gotten attached to a different window. If the app tries
to display such a GeckoView, we will throw an exception in `onAttachedToWindow`.

After this patch, apps won't need to manage `release`/`set` manually and if
they somehow end up in a broken state (e.g. because the app has a bug) we still
correctly crash.

This avoids crashing if the `release`/`set` pairs are out of order (e.g.
because `onAttachedToWindow`, `onDetachFromWindow` arrive out of order) which
is our leading theory for the crash in the bug attached to this patch.

Differential Revision: https://phabricator.services.mozilla.com/D139518
2022-02-23 23:14:59 +00:00
Nick Alexander fb38db6876 Bug 1752968 - Pre: Convert `MOZ_PACKAGER_MINIFY{_JS}` to `moz.configure`. r=firefox-build-system-reviewers,mhentges
There's no current use for setting `JS_BINARY` in `packager.mk`, so
remove it while we're here.  I elected to make it easy to add new file
types to minify rather than to make it easy to specify `JS_BINARY`,
since the latter mechanism is strictly more general and could be used
in future for things other than minification.

Differential Revision: https://phabricator.services.mozilla.com/D138364
2022-02-23 23:11:49 +00:00
Makoto Kato 784adeb6d9 Bug 1756219 - Set test activity to foreground for clipboard test if Android 10+. r=geckoview-reviewers,calu,agi
SelectionActionDelegateTest doesn't wok on Android 10 because Android 10
requires that application must be foreground to write clipboard item.

Also, setting foreground becomes test is slow, so this change is on Android 10+
only.

Differential Revision: https://phabricator.services.mozilla.com/D139237
2022-02-22 23:56:28 +00:00
Jamie Nicol 72a1b5cd91 Bug 1755381 - Avoid relaunching GPU process immediately on Android if app is in background. r=agi,aosmond
If the android system kills the GPU process to free memory while the
app is in the background, then we want to avoid immediately restarting
the GPU process.

To achieve this, we make GPUProcessManager keep track of whether it is
in the foreground or background. If HandleProcessLost() gets called
while in the background then we destroy the existing compositor
sessions as before, but return early instead of immediately
relaunching the process. If the process has not been launched when the
app later gets foregrounded then we do so then.

The final part of HandleProcessLost(), which reinitializes the content
bridges and emits the "compositor-reinitialized" signal, has been
moved to a new function ReinitializeRendering(). If the GPU process
has been disabled, this gets called as-before at the end of
HandleProcessLost(). When the GPU process is enabled, however, we now
call it from OnProcessLaunchComplete(), so that it gets called
regardless of whether the process is launched immediately or after a
delay.

While we're here, rename the functions RebuildRemoteSessions() and
RebuildInProcessSessions() to DestroyRemoteCompositorSessions() and
DestroyInProcessCompositorSessions(), to better reflect what they
actually do: the "rebuilding" part occurs later on. Also update the
mega-comment documenting the restart sequence, as it was somewhat
outdated.

In case a caller of EnsureGPUReady() gets called before the foreground
signal arrives (eg in nsBaseWidget::CreateCompositorSession() due to a
refresh tick paint), make EnsureGPUReady() launch the GPU process
itself if the GPU process is enabled but not yet launched. As a
consequence, to avoid launching the GPU process unnecessarily, change
a couple callers of EnsureGPUReady() to simply check whether the
process is enabled instead.

Additionally, guard against a null pointer deref if the compositor has
been destroyed when the widget receives a memory pressure event. This
is now more likely to occur as there may be a gap between the
compositor being destroyed and recreated.

Differential Revision: https://phabricator.services.mozilla.com/D139042
2022-02-22 15:59:13 +00:00
Shane Caraveo 028c447051 Bug 1753308 fix extension startup in tests, remove delayed startup pref r=rpl,robwu
Differential Revision: https://phabricator.services.mozilla.com/D137699
2022-02-19 15:52:26 +00:00
Marian-Vasile Laza 1a03e480e1 Backed out 7 changesets (bug 1751948) for causing gtest failures. CLOSED TREE
Backed out changeset 52f5eaeb4340 (bug 1751948)
Backed out changeset e68c91f0ee8c (bug 1751948)
Backed out changeset 6198b0a5e72a (bug 1751948)
Backed out changeset d9bd956b3935 (bug 1751948)
Backed out changeset 4ac102698b52 (bug 1751948)
Backed out changeset ab9f87d2451e (bug 1751948)
Backed out changeset 63545319b2dd (bug 1751948)
2022-02-19 05:37:20 +02:00
Nika Layzell eb34a2c6dd Bug 1751948 - Part 6: Add basic support for running IPDL unit tests during gtest, r=ipc-reviewers,andi,handyman
This patch introduces a new system for building IPDL unit tests, which is
roughly inspired by the old cxx unit test design, however designed to work with
gtest. It re-uses the existing IPDLUnitTest process type, using static
constructors only present in xul-gtest to register child actor constructors and
ProcessChild implementations to avoid bloating xul.

The IPDLUnitTest actor is used as a backchannel to communicate test failures
from the child process back to the parent process, and manage the test's async
lifecycle more reliably.

The IPDLUnitTest process also needed to have various properties about how it was
initialized adjusted:

* The IPDLUnitTest process should now always load xul-gtest when running
  gtests, by using the "Self" process type and adding a DYLD_LIBRARY_PATH override
  on macOS where the "Self" process type cannot be used.
* The IPDLUnitTest process now initializes minimal XPCOM, and runs a
  frankeneventloop to allow it to use XPCOM event loop structures such as
  SpinEventLoopUntil in tests.
* Support for creating IPDLUnitTest processes on Android was added, as these
  tests had never run on android before.

Differential Revision: https://phabricator.services.mozilla.com/D137170
2022-02-19 00:57:38 +00:00
Cosmin Sabou e0e7542556 Backed out 2 changesets (bug 1755381) for causing gtest failures on TestMediaDataDecoder.cpp. CLOSED TREE
Backed out changeset 255cda33f56e (bug 1755381)
Backed out changeset 2c55863fbccc (bug 1755381)
2022-02-18 16:40:08 +02:00
Jamie Nicol b78abc197a Bug 1755381 - Manually connect surface allocators when rendering is (re)initialized. r=agi,aosmond
Rather than lazily attempting to connect the SurfaceAllocator if
required whenever the content process tries to allocate a surface,
instead give control over the connection to the parent process. Make
it connect after the content process has been created, and
additionally after rendering has being reinitialized following a GPU
process loss. This aligns with how we reconnect various IPDL protocols
between content processes and the compositor.

This avoids content processes attempting to connect to the GPU
process' surface allocator before it has been started, which is
important for the next patch in this series where we want to delay
restarting the GPU process if the app is in the background.

If the content process attempts to allocate a surface inbetween the
old connection dying and the new connection being made then it will
gracefully fail. If the GPU process dies again whilst the connection
is being made then that is okay, a new connection will be made shortly
afterwards.

Differential Revision: https://phabricator.services.mozilla.com/D139041
2022-02-18 13:38:27 +00:00
Agi Sferro acc091bf8f Bug 1755581 - Run GeckoView actors only on browsers messageManagerGroup. r=calu
We should only run our Actors on actual GeckoSession-backed windows. At the
time where most of our actors were written there was no way to do that, so we
added `isContentWindow` to make sure we don't accidentally handle
non-GeckoSession windows like the Extension background tab or DevTools browsers.

We now have the `messageManagerGroups` filter for actors which allows us to
only run our actors on GeckoSession-backed windows.

The messageManagerGroup property is set here:
https://searchfox.org/mozilla-central/rev/3de1b6791ea569cdf7773f7cd512cf2e6cc1d3f0/mobile/android/chrome/geckoview/geckoview.js#505

Differential Revision: https://phabricator.services.mozilla.com/D138919
2022-02-17 19:38:29 +00:00
Emilio Cobos Álvarez 8e4384862d Bug 1755783 - Simplify a bit android screen code. r=agi
We don't use the screen id but it's publicly exposed in the settings, so
leaving it there for now...

Differential Revision: https://phabricator.services.mozilla.com/D138953
2022-02-17 11:38:39 +00:00
Agi Sferro f65a148d41 Bug 1754721 - Use JSM global for GeckoView's permanentKey. r=jonalmeida
:whimboo found this, apparently if something else holds a reference to
permanentKey we will leak the window. To avoid this happening we use the JSM
global instead.

For more context see Bug 1501789.

Differential Revision: https://phabricator.services.mozilla.com/D138451
2022-02-16 16:22:01 +00:00
Agi Sferro a13373b5a1 Bug 1755520 - Fix Javadoc links in GeckoView's docs. r=jonalmeida DONTBUILD
The Java 11 Javadoc update changed the links style so we need to update our
references.

Differential Revision: https://phabricator.services.mozilla.com/D138822
2022-02-16 16:20:49 +00:00
Emilio Cobos Álvarez c31d70c2b8 Bug 1753836 - Document why ContentDelegateChild doesn't need changes due to the change above. r=agi
Android has no full-page zoom, so we are not meaningfully changing behavior.

However, these values are exposed to the GeckoView JS api, surprisingly, yet
viewport scaling and so on can change the CSS to device pixel ratio...

Shouldn't we expose device pixels there instead? Or do the api consumers assume
that those CSS pixels are scaled to the device scale factor somehow (and that's
not working)?

Depends on D138037

Differential Revision: https://phabricator.services.mozilla.com/D138038
2022-02-16 12:18:11 +00:00
smolnar 33c038ec0d Backed out 6 changesets (bug 1753836) for causing mochitest failures in test_event_screenXY_with_zoom. CLOSED TREE
Backed out changeset a572cbc0fac2 (bug 1753836)
Backed out changeset 371a495ff728 (bug 1753836)
Backed out changeset 774af76be463 (bug 1753836)
Backed out changeset faa8a8f2d40f (bug 1753836)
Backed out changeset 9209832ecffe (bug 1753836)
Backed out changeset db443ce0406d (bug 1753836)
2022-02-16 01:47:51 +02:00
Emilio Cobos Álvarez 9562b5b209 Bug 1753836 - Document why ContentDelegateChild doesn't need changes due to the change above. r=agi
Android has no full-page zoom, so we are not meaningfully changing behavior.

However, these values are exposed to the GeckoView JS api, surprisingly, yet
viewport scaling and so on can change the CSS to device pixel ratio...

Shouldn't we expose device pixels there instead? Or do the api consumers assume
that those CSS pixels are scaled to the device scale factor somehow (and that's
not working)?

Depends on D138037

Differential Revision: https://phabricator.services.mozilla.com/D138038
2022-02-15 22:25:04 +00:00
Jamie Nicol cce5174d73 Bug 1755375 - Don't generate crash reports when android kills the GPU process. r=agi
If the android system kills the GPU process then ChildCrashHandler.jsm
gets invoked but an empty dump ID. Currently we generate a crash
report anyway, which is resulting in lots of "EMPTY: no crashing
thread identified; ERROR_NO_MINIDUMP_HEADER" crashes.

Instead, we should return early before starting the crash reporter if
the dump ID is empty. We already do this for content processes, so
this patch makes us do so for every type of process.

Differential Revision: https://phabricator.services.mozilla.com/D138766
2022-02-15 20:26:12 +00:00
Emilio Cobos Álvarez 28290f66db Bug 1754858 - Simplify screen orientation API implementation. r=smaug,m_kato,geckoview-reviewers
Make the ScreenOrientation part of the screen struct, as it should. Stop
using HAL to propagate just screen orientation updates, use the more
general screen manager.

Instead of HAL observers, add a simple observer service notification,
and clean a bunch of the code.

This will simplify bug 1754802 a bit, and is generally simpler.
Shouldn't change behavior. I've tested the events and some common
orientation locking use cases like Youtube, and they behave the same.

Differential Revision: https://phabricator.services.mozilla.com/D138477
2022-02-15 20:22:54 +00:00
Agi Sferro ea7cc5fb05 Bug 1755513 - Change GeckoView docs title to just 'GeckoView' r=calu DONTBUILD
Right now the title is "Welcome to GeckoView’s documentation!" which looks out
of place given that all the other titles are just the name of the product like
"libpref" or "WebIDL"

Differential Revision: https://phabricator.services.mozilla.com/D138818
2022-02-15 16:59:32 +00:00
Agi Sferro a653c26a57 Bug 1755385 - Drop non-content process priority to IDLE when backgrounding. r=jonalmeida
BACKGROUND and FOREGROUND priority lead to the identical oom_adj value of 11
when the app is in the background. Because all non-content processes are
restartable without losing any state, we should prioritize them lower than the
current active tab, which will be prioritized to FOREGROUND when Bug 1753700 is
fixed.

Differential Revision: https://phabricator.services.mozilla.com/D138810
2022-02-15 16:07:47 +00:00
Agi Sferro 28158b5d80 Bug 1752573 - Add GeckoView architecture doc. r=calu,ohall DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D137297
2022-02-14 22:45:09 +00:00
Jamie Nicol 8fb7eecd6e Bug 1754334 - Return error when GPU process crash occurs during screen pixels request. r=agi
In bug 1750569 we attempted to ensure that following a GPU process
crash outstanding screen pixels requests would be fulfilled. While
this usually worked there was a race condition between sending the
request to the new compositor and the content process sending the
display list to the new compositor, which meant that sometimes we
would screenshot an empty screen instead of the page content.

As a GPU process crash is an extraordinary circumstance and
screenshots are non-critical, the best solution is to simply return an
error if a GPU process crash occurs while there is an outstanding
request (or if a new request is made whilst the GPU process is
restarting). This patch also updates the junit test to check for this
error rather than expecting a screenshot to be returned.

Differential Revision: https://phabricator.services.mozilla.com/D138323
2022-02-09 19:36:49 +00:00
Makoto Kato 926307a1d7 Bug 1753919 - AndroidWebAuthnTokenManager uses GeckoResult directly instead of callback. r=geckoview-reviewers,agi
Since WebAuthnTokenManager uses GeckoReuslt, we can remove callback of WebAuthnTokenManager.

Differential Revision: https://phabricator.services.mozilla.com/D137973
2022-02-09 06:59:52 +00:00
Agi Sferro 552a9e761b Bug 1754244 - Remove deprecated enterpiseRootsEnabled. r=calu
Differential Revision: https://phabricator.services.mozilla.com/D138165
2022-02-08 18:04:26 +00:00
Agi Sferro b01d2a756c Bug 1750623 - Always set isTopLevel=true for ENV_EXTENSION senders. r=robwu,jonalmeida
isTopLevel is used for ENV_TYPE_CONTENT_SCRIPT to let embedders know if an
iframe is sending messages to the app. For extension environments we don't need
this extra check so we can always set the value to true.

Differential Revision: https://phabricator.services.mozilla.com/D137776
2022-02-08 17:27:49 +00:00
Sylvestre Ledru caaedeee98 Bug 1753413 - fx doc: Remove whitespaces, trailing lines & windows CR r=andi,perftest-reviewers,sparky
Differential Revision: https://phabricator.services.mozilla.com/D137741
2022-02-03 18:34:58 +00:00
Jamie Nicol d3e80e9854 Bug 1750234 - Handle GPU process crash when rendering video and webgl on Android. r=jgilbert,jolin
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
2022-02-02 17:01:02 +00:00
William Durand b459566546 Bug 1751154 - More consistent error handling for frameIds parameter in scripting API. r=robwu
Differential Revision: https://phabricator.services.mozilla.com/D137005
2022-01-28 19:13:05 +00:00
Emilio Cobos Álvarez 1f99c522f0 Bug 1752523 - Fix handling of non-multiple <select> with size >1. r=agi
There are two things that make an element not be a combobox:

 * <select multiple>
 * <select size=N> where N > 1

I was only handling the former. Expose the gecko-internal method we have
for this via WebIDL to get this fully right forever.

The other issue reported in this bug is not a GeckoView issue, it's an
android-components issue, will file / maybe fix there if I figure out
how.

Differential Revision: https://phabricator.services.mozilla.com/D137295
2022-01-28 18:40:13 +00:00
Anastasios Bithas d756776295 Bug 1751923 - Add targetSdkVersion and minSdkVersion to gradle.build of exoplayer2 r=agi
Adding the targetSdkVersion and minSdkVersion so that the READ_PHONE_STATE android permission is no longer implied.

Differential Revision: https://phabricator.services.mozilla.com/D137072
2022-01-28 16:36:55 +00:00
Makoto Kato 77a88ff153 Bug 1750147 - Use DisplayManager to detect orientation change. r=geckoview-reviewers,agi,calu
When user/App rotates screen 180 degree, `onConfigurationChanged` isn't called.
But If API is 17+, we can use `DisplayManager.DisplayListener` to detect
rotation change instead.

Also, since orientation value in `android.content.res.Configuration` won't be
updated immediately, we shouldn't use it, excepting to `onConfigurationChanged`.

Differential Revision: https://phabricator.services.mozilla.com/D136869
2022-01-27 06:17:21 +00:00
Agi Sferro 722cb28924 Bug 1750231 - Add WebRequest::beConservative. r=calu,jonalmeida
Differential Revision: https://phabricator.services.mozilla.com/D136387
2022-01-26 20:11:45 +00:00
Agi Sferro b968f24595 Bug 1750231 - Add bug # to CHANGELOG. r=calu
Differential Revision: https://phabricator.services.mozilla.com/D136385
2022-01-26 20:11:44 +00:00
Emilio Cobos Álvarez 90a0deb6cb Bug 1752133 - Fix a couple more issues with the select dropdown on Android. r=agi
Two issues:

 * Set the openInParentProcess flag in GeckoViewPrompt.jsm for
   dropdowns. This avoids needing two taps to re-open the dropdown.

 * Make the "input" event composed, see bug 1734040.

Differential Revision: https://phabricator.services.mozilla.com/D137038
2022-01-26 16:48:55 +00:00
Agi Sferro b1f93026e6 Bug 1745996 - Send a memory pressure event when deactivating sessions. r=jnicol,calu
WebRender retains about 50MBs of memory for every window. When switching
between lots of tabs on Android (where 1 tab = 1 window), this can cause
problems as the app will consume a significant amount of memory.

To avoid this problem, we send a memory pressure event whenever a session is
deactivated, which signals to WebRender that it should deallocate the memory.

This message is sent on a delay of 10s to avoid interfering with tab switching,
and we cancel the message if the tab becomes active again before we fire the
memory pressure event.

Co-Authored-By: Cathy Lu <calu@mozilla.com>
Co-Authored-By: Jonathan Almeida [:jonalmeida] <jonalmeida942@gmail.com>

Differential Revision: https://phabricator.services.mozilla.com/D136965
2022-01-26 16:40:56 +00:00
Agi Sferro bea25df6ff Bug 1751941 - Add version{Code,Name} to geckoview_example, test_runner. r=calu
This allows consumers like Marionette to query the Gecko version for
GeckoViewExample and test_runner.

Differential Revision: https://phabricator.services.mozilla.com/D136937
2022-01-25 20:00:30 +00:00
Emilio Cobos Álvarez a5779bc197 Bug 1751674 - Appease eslint.
MANUAL PUSH: Trivial tweak CLOSED TREE
2022-01-24 22:18:06 +01:00
Emilio Cobos Álvarez 7aa9538490 Bug 1751674 - Fix a couple issues with my patch for bug 1750395. r=agi
We had zero coverage for this, apparently. Upon writing tests, the only
test we had for this was `@Ignore`d :(

Write better tests for this. Add tests for <select multiple> which I
broke because the mozshowdropdown events only fire for dropdown selects.

I'm sorry anyways, I should've tested manually, but I was traveling and
found issues when trying to do an artifact build so I relied on try, oh
well.

Differential Revision: https://phabricator.services.mozilla.com/D136772
2022-01-24 21:07:41 +00:00