Commit Graph
475 Commits
Author SHA1 Message Date
serge-sans-paille 9d4be9bfad Bug 2033983 - Remove unused include of <wchar.h> r=geckoview-reviewers,m_kato
Differential Revision: https://phabricator.services.mozilla.com/D295776
2026-04-24 06:07:48 +00:00
Sylvestre Ledru 4f6b8b516d Bug 2023419 - Remove Emacs/Vim modelines from widget/ r=emilio
replaced by .editorconfig
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D287877
2026-03-16 17:22:02 +00:00
Chris Peterson 1bacc90000 Bug 2002864 - Replace MOZ_CONSTINIT with C++20 constinit in Android code. r=geckoview-reviewers,nalexander
Differential Revision: https://phabricator.services.mozilla.com/D274496
2025-12-09 06:59:25 +00:00
serge-sans-paille a1480dd174 Bug 1997862 - Make nsCOMPtr default constructor constinit-compatible r=emilio,geckoview-reviewers,places-reviewers,layout-reviewers,valentin,m_kato
Differential Revision: https://phabricator.services.mozilla.com/D271018
2025-11-07 06:27:33 +00:00
Makoto Kato 9663df298d Bug 1994474 - Part 1. Add MOZ_LOG JNI interface to use MOZ_LOG on Java. r=geckoview-reviewers,tcampbell
Actually, we have about:logging to get logs via MOZ_LOG.
This fix adds JNI interface to use MOZ_LOG on Java side.

Differential Revision: https://phabricator.services.mozilla.com/D269353
2025-10-24 06:16:13 +00:00
serge-sans-paille 1667ec582b Bug 1995723 - Remove unused inclusion of mozilla/ArrayUtils.h r=necko-reviewers,application-update-reviewers,media-playback-reviewers,profiler-reviewers,win-reviewers,firefox-svg-reviewers,layout-reviewers,gstoll,canaltinova,bytesized,alwu,dholbert
Differential Revision: https://phabricator.services.mozilla.com/D269573
2025-10-23 07:30:37 +00:00
Narcis Beleuzu 6650ab8589 Revert "Bug 1994474 - Part 2. Use MOZ_LOG for GeckoEditable on Nightly. r=geckoview-reviewers,tcampbell" for Lint failure on MozLog.java
This reverts commit 97f5d96228.

This reverts commit 5bb2705578.
2025-10-22 13:16:10 +00:00
Makoto Kato 5bb2705578 Bug 1994474 - Part 1. Add MOZ_LOG JNI interface to use MOZ_LOG on Java. r=geckoview-reviewers,tcampbell
Actually, we have about:logging to get logs via MOZ_LOG.
This fix adds JNI interface to use MOZ_LOG on Java side.

Differential Revision: https://phabricator.services.mozilla.com/D269353
2025-10-22 11:41:49 +00:00
Jamie Nicol 997f74380e Bug 1992951 - Annotate crash reports with reason for GPU process launch failure on Android. r=gfx-reviewers,geckoview-reviewers,ohall,aosmond
In bug 1992573 we are seeing a lot of failures when attempting to launch
the GPU process on Android. If we had previously had a stable GPU
process we now crash the parent process rather than disabling the GPU
process.

This patch ensures that we log any java exception messages to
gfxCriticalNote when we fail to launch the GPU process. This will
hopefully mean that the crash reports will contain useful information
regarding why the process failed to launch.

Differential Revision: https://phabricator.services.mozilla.com/D267763
2025-10-07 17:42:33 +00:00
Kagami Sascha Rosylight 7d3ecfff80 Bug 1976269 - Part 1: Store notification origin to Parcelable r=geckoview-reviewers,geckoview-api-reviewers,owlish,ohall
Differential Revision: https://phabricator.services.mozilla.com/D257028
2025-07-28 12:44:18 +00:00
Cathy Lu 05d6f5429d Bug 1958863 - Remove legacy telemetry API from geckoview r=geckoview-reviewers,chutten,owlish,nalexander
Differential Revision: https://phabricator.services.mozilla.com/D253537
2025-06-13 19:52:51 +00:00
Kagami Sascha Rosylight ba88eff869 Bug 1955343 - Part 2: Pass actions to GeckoView r=nrishel,geckoview-reviewers,android-reviewers,nika,geckoview-api-reviewers,ohall
Differential Revision: https://phabricator.services.mozilla.com/D242583
2025-06-12 12:20:45 +00:00
Alexandru Marc 482800da14 Revert "Bug 1955343 - Part 2: Pass actions to GeckoView r=nrishel,geckoview-reviewers,android-reviewers,nika,geckoview-api-reviewers,ohall" for causing android build bustages @ GeckoWebNotificationDelegateTest
This reverts commit 42724e284b.
2025-06-11 15:59:21 +00:00
Kagami Sascha Rosylight 42724e284b Bug 1955343 - Part 2: Pass actions to GeckoView r=nrishel,geckoview-reviewers,android-reviewers,nika,geckoview-api-reviewers,ohall
Differential Revision: https://phabricator.services.mozilla.com/D242583
2025-06-11 15:26:38 +00:00
pstanciu e7720106f6 Revert "Bug 1955343 - Part 2: Pass actions to GeckoView r=nrishel,geckoview-reviewers,android-reviewers,nika,geckoview-api-reviewers,ohall" for causing lint failures @CHANGELOG.md
This reverts commit ccfc04c4e4.
2025-06-11 15:15:12 +00:00
Kagami Sascha Rosylight ccfc04c4e4 Bug 1955343 - Part 2: Pass actions to GeckoView r=nrishel,geckoview-reviewers,android-reviewers,nika,geckoview-api-reviewers,ohall
Differential Revision: https://phabricator.services.mozilla.com/D242583
2025-06-11 13:37:50 +00:00
agoloman ff2649baa8 Revert "Bug 1955343 - Part 2: Pass actions to GeckoView r=nrishel,geckoview-reviewers,android-reviewers,nika,geckoview-api-reviewers,ohall" for causing gv-junit failures @WebNotificationTest#openWithActionsAndClickAction.
This reverts commit 171ee36954.
2025-06-09 20:01:12 +00:00
Kagami Sascha Rosylight 171ee36954 Bug 1955343 - Part 2: Pass actions to GeckoView r=nrishel,geckoview-reviewers,android-reviewers,nika,geckoview-api-reviewers,ohall
Differential Revision: https://phabricator.services.mozilla.com/D242583
2025-06-09 18:41:11 +00:00
Oskar Mansfeld 97113e0aa9 Bug 1965076 - Add markers for Applink Startup milestones. r=mstange,geckoview-reviewers,nalexander,owlish
Added the following "Applink Startup" markers: `GeckoViewSupport::Open` and
`GeckoViewReady` milestones.

Differential Revision: https://phabricator.services.mozilla.com/D248340
2025-06-05 17:35:02 +00:00
Florian Quèze d60db56ac7 Bug 1943138 - Generate separate {Event,Histogram,Scalar}GIFFTMap.cpp files so the {Event,Histogram,Scalar}GIFFTMap.h headers don't change when adding a new Glean metric, r=chutten.
Differential Revision: https://phabricator.services.mozilla.com/D235211
2025-01-22 22:17:03 +00:00
serge-sans-paille 5946338a6a Bug 1920718 - Annotate all global variable with runtime initialization attributes r=glandium,application-update-reviewers,media-playback-reviewers,anti-tracking-reviewers,places-reviewers,profiler-reviewers,gfx-reviewers,aosmond,lina,nalexander,aabh,geckoview-reviewers,win-reviewers,gstoll,m_kato
MOZ_RUNINIT => initialized at runtime
MOZ_CONSTINIT => initialized at compile time
MOZ_GLOBINIT => initialized either at runtime or compile time, depending on template parameter, macro parameter etc
This annotation is only understood by our clang-tidy plugin. It has no
effect on regular compilation.

Differential Revision: https://phabricator.services.mozilla.com/D223341
2024-10-30 11:05:24 +00:00
Hiroyuki Ikezoe 3a63dc0ef3 Bug 1916154 - Expose "dom.interactive_widget_default_resizes_visual" via GeckoRuntime. r=geckoview-reviewers,ohall,owlish
Differential Revision: https://phabricator.services.mozilla.com/D222892
2024-10-02 03:58:10 +00:00
Makoto Kato 709c8ad35a Bug 1546267 - Detect system locale/timezone change. r=geckoview-reviewers,owlish
We should notify system locale and timezone of changes to Gecko.

Differential Revision: https://phabricator.services.mozilla.com/D218514
2024-08-27 08:40:58 +00:00
Mike Hommey 32831b48cc Bug 1897317 - Rename MOZ_ANDROID_HISTORY to MOZ_GECKOVIEW_HISTORY. r=firefox-build-system-reviewers,geckoview-reviewers,nalexander,owlish
Differential Revision: https://phabricator.services.mozilla.com/D210743
2024-05-17 00:29:35 +00:00
sotaro da674bd3c0 Bug 1896780 - Change IsGpuProcessEnabled() as to complete soon r=gfx-reviewers,bradwerth,jnicol
config state of gfx::Feature::GPU_PROCESS is mirrored to gfx::gfxVars::GPUProcessEnabled(). It is threadsafe.

Differential Revision: https://phabricator.services.mozilla.com/D210386
2024-05-16 00:06:33 +00:00
Chris H-C 9e8450d739 Bug 1884526 - Remove GV support from Telemetry r=TravisLong,Dexter,owlish,geckoview-reviewers
This is actually the removal of two different deprecated geckoview adapters:
GV Persistence, and GV Streaming Telemetry.

GVP has been out of use for four years. GVST has had all of its data migrated
to direct Glean use back in February and has been deprecated for two versions.

Differential Revision: https://phabricator.services.mozilla.com/D207475
2024-04-18 17:24:04 +00:00
Makoto Kato aa4499c788 Bug 1586471 - Part 2. Implement nsDragService on GeckoView. r=geckoview-reviewers,amejiamarmol
This implementation supports
- HTML drag & drop API.
- Drop and drop for text/plain or text/html from/to external application.

Differential Revision: https://phabricator.services.mozilla.com/D197330
2024-01-28 07:49:53 +00:00
Kershaw Chang 86ab7691ee Bug 1543990 - Simplify nsISpeculativeConnect API, r=necko-reviewers,geckoview-reviewers,search-reviewers,valentin,m_kato
Differential Revision: https://phabricator.services.mozilla.com/D179066
2023-06-01 09:46:12 +00:00
Jamie Nicol 329cb92b40 Bug 1824083 - Remove previous attempts to detect and work around invalid Surface bug. r=gfx-reviewers,geckoview-reviewers,nical,m_kato
The detection is inadequate and the workaround does not work on all
versions of Android. Later patches in this series will replace this
with something better.

Differential Revision: https://phabricator.services.mozilla.com/D176719
2023-05-10 15:50:21 +00:00
Sandor Molnar 62ec74fbb0 Backed out 4 changesets (bug 1824083) for causing build bustages in include/mozilla/webrender/RenderCompositorOGLSWGL.h CLOSED TREE
Backed out changeset 7c1be037e345 (bug 1824083)
Backed out changeset bf5c5929ef7b (bug 1824083)
Backed out changeset 6fad491b84be (bug 1824083)
Backed out changeset 57ae9c87c467 (bug 1824083)
2023-05-10 18:01:13 +03:00
Jamie Nicol 56d69e9b99 Bug 1824083 - Remove previous attempts to detect and work around invalid Surface bug. r=gfx-reviewers,geckoview-reviewers,nical,m_kato
The detection is inadequate and the workaround does not work on all
versions of Android. Later patches in this series will replace this
with something better.

Differential Revision: https://phabricator.services.mozilla.com/D176719
2023-05-10 14:44:50 +00:00
Jamie Nicol c4a22f3066 Bug 1772839 - Work around compositor being resumed with abandoned Surfaces. r=geckoview-reviewers,owlish
On some Android devices (predominantly Huawei devices running Android
9 or below) we are seeing large numbers of crashes due to the
compositor being unable to create an EGL surface to render in to. From
local testing, this appears to be due to the Surface we are being
provided from the SurfaceView being in an "abandoned"
state. Presumably this is due to an operating system bug - the Surface
is valid at the time of the surfaceChanged() callback, but becomes
abandoned moments later despite surfaceDestroyed() not being called.

We are able to detect when the Surface is in such a state from C++
code by calling ANativeWindow_getWidth(), as that will return a
negative value to indicate an error.

This patch uses this method to check whether the Surface is in such a
state prior to resuming the compositor. If so, rather than immediately
resuming the compositor it instead toggles the SurfaceView's
visibility. This tricks the SurfaceView in to providing a new (and
hopefully valid) Surface, which will in turn resume the compositor via
the surfaceChanged callback.

Differential Revision: https://phabricator.services.mozilla.com/D151479
2022-07-13 15:38:51 +00:00
Makoto Kato 7fa5d58a6b Bug 1596164 - Use PR_Now instead of location service's acquired time. r=geckoview-reviewers,agi
`android.location.Location.getTime()` will return the acquired location time
that depends on location service. But `maximumAge` will be calculated by
current time (`PR_Now()`). So if the acquired time is old time,
`nsGeolocationRequest::SendLocation` won't send the location due to too old
(`isTooOld=true` in `nsGeolocationRequest::SendLocation`).

Like other platforms, we should pass PR_Now as the location time instead.

Also, GVE sometimes hits debug assertion since heading and/or speed aren't
expected value, so this patch fixes this situation.

Differential Revision: https://phabricator.services.mozilla.com/D148452
2022-06-14 04:20:42 +00:00
Jamie Nicol 53e5256e21 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
Emilio Cobos Álvarez f7c36a8d26 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
Makoto Kato 6049553892 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
Jamie Nicol b0afb8051b Bug 1742569 - Create RemoteSurfaceAllocator in either parent or GPU process. r=agi,gfx-reviewers,aosmond
On Android we use SurfaceTextures and Surfaces to render video and
webgl. These are allocated by content processes using the
SurfaceAllocator, which connects to a SurfaceAllocatorService running
in the parent process. The content process renders in to the
Surface (by attaching it to a media codec, or creating a GL context
with it for webgl), and the compositor renders the output
SurfaceTexture in the parent process.

With the GPU process this poses a difficulty, as we need to allocate
SurfaceTextures in either the parent process or GPU process, depending
on whether the GPU process is enabled. Additionally, we don't want to
run extra android Services in child processes such as the GPU process,
as process management is tricky and we want to contain it to a single
place.

This patch makes it so that SurfaceAllocatorService is not really an
android Service any more, just an singleton object which implements
the ISurfaceAllocator interface. It is renamed to
RemoteSurfaceAllocator to reflect that. A new method
getProcessManager() is added to the IProcessManager interface, which
child processes can use to fetch the surface allocator. It returns
either the parent process instance, or fetches the instance from the
GPU process using IChildProcess.getSurfaceAllocator().

Differential Revision: https://phabricator.services.mozilla.com/D133107
2022-01-14 16:20:59 +00:00
Marian-Vasile Laza c1863147d9 Backed out changeset 65f8b0434e1e (bug 1708580) for causing Btime failures. CLOSED TREE 2021-08-14 00:44:48 +03:00
Aaron Klotz c59e370c28 Bug 1708580: When the "quit-application" event fires in GeckoView, annotate the GeckoThread.State and force crash on nightly and early beta; r=agi
AFAICT, all roads lead though [`nsAppStartup::Quit`](https://searchfox.org/mozilla-central/rev/0fec57c05d3996cc00c55a66f20dd5793a9bfb5d/toolkit/components/startup/nsAppStartup.cpp#448),
which is responsible for firing the `"quit-application"` observer notification
and then posting the `nsAppExitEvent` that causes the `nsAppShell` to break out
of its event loop and proceed with shutdown.

If we trigger a native crash in the observer, we should be able to capture a
symbolicated stack of whatever called `Quit`. We might as well force-crash
anyway, since AC is going to throw an exception regardless...

Before we crash, we annotate the current `GeckoThread` state to enable us to
find out whether we were fully initialized at the time of the shutdown.

Differential Revision: https://phabricator.services.mozilla.com/D122256
2021-08-13 15:45:37 +00:00
Dorel Luca 356e8b8c86 Backed out changeset 27e6d1f6f6c1 (bug 1708580) on Dev's request. CLOSED TREE 2021-08-12 22:30:34 +03:00
Aaron Klotz cf9893d8f2 Bug 1708580: When the "quit-application" event fires in GeckoView, annotate the GeckoThread.State and force crash on nightly and early beta; r=agi
AFAICT, all roads lead though [`nsAppStartup::Quit`](https://searchfox.org/mozilla-central/rev/0fec57c05d3996cc00c55a66f20dd5793a9bfb5d/toolkit/components/startup/nsAppStartup.cpp#448),
which is responsible for firing the `"quit-application"` observer notification
and then posting the `nsAppExitEvent` that causes the `nsAppShell` to break out
of its event loop and proceed with shutdown.

If we trigger a native crash in the observer, we should be able to capture a
symbolicated stack of whatever called `Quit`. We might as well force-crash
anyway, since AC is going to throw an exception regardless...

Before we crash, we annotate the current `GeckoThread` state to enable us to
find out whether we were fully initialized at the time of the shutdown.

Differential Revision: https://phabricator.services.mozilla.com/D122256
2021-08-12 19:12:49 +00:00
Agi Sferro 8c94daa001 Bug 1701269 - Remove PrefsHelper. r=owlish
Differential Revision: https://phabricator.services.mozilla.com/D109927
2021-05-20 22:03:07 +00:00
Valentin Gosu 317c45feef Bug 1694662 - Remove cacheservice from android appshell r=geckoview-reviewers,kershaw,agi
Differential Revision: https://phabricator.services.mozilla.com/D106460
2021-04-30 07:20:26 +00:00
Agi Sferro f6bb49db1c Bug 1558103 - Don't try to dispatch XPCOM events during shutdown. r=aklotz
XPCOM complains when events are dispatched during shutdown. Since we're
shutting down, there's no really any point in dispatching these messages
anyway, so we can safely ignore them.

Differential Revision: https://phabricator.services.mozilla.com/D113203
2021-04-26 20:49:27 +00:00
Agi Sferro 3f2dd3aace Bug 1567341 - Don't listen to xpcom-shutdown twice in nsAppShell. r=esawin
nsBaseAppShell already listens to xpcom-shutdown and calls |Exit| when it
receives it so we don't need to also listen for it in nsAppShell (which causes
two calls to xpcom-shutdown instead of one).

Differential Revision: https://phabricator.services.mozilla.com/D106209
2021-03-24 21:49:37 +00:00
Alexandru Michis 14e1db974b Backed out 24 changesets (bug 1567341) for causing xpcshell failures in test_telemetry.js
CLOSED TREE

Backed out changeset deb795c7d0ed (bug 1567341)
Backed out changeset 62d24a3e5e33 (bug 1567341)
Backed out changeset 1185cabd94e0 (bug 1567341)
Backed out changeset 73a4ae419261 (bug 1567341)
Backed out changeset b6eb111329f3 (bug 1567341)
Backed out changeset 0dc0bfedc042 (bug 1567341)
Backed out changeset 9dca635e41d7 (bug 1567341)
Backed out changeset c34928580933 (bug 1567341)
Backed out changeset f9ba384bb407 (bug 1567341)
Backed out changeset ec25c2df380e (bug 1567341)
Backed out changeset 9e8ea542b51e (bug 1567341)
Backed out changeset 3dc62863a028 (bug 1567341)
Backed out changeset 6c104f865540 (bug 1567341)
Backed out changeset c422ca4207ea (bug 1567341)
Backed out changeset e3df748ed62f (bug 1567341)
Backed out changeset 9d1f27796a97 (bug 1567341)
Backed out changeset 1d93ba23f809 (bug 1567341)
Backed out changeset 55652f6af6ed (bug 1567341)
Backed out changeset 9fb892955a88 (bug 1567341)
Backed out changeset 1cdd95c43416 (bug 1567341)
Backed out changeset 5a839d5e3e33 (bug 1567341)
Backed out changeset ea84b5749a27 (bug 1567341)
Backed out changeset dcb1ae146475 (bug 1567341)
Backed out changeset d72accc274ac (bug 1567341)
2021-03-24 23:37:43 +02:00
Agi Sferro cbbefd435e Bug 1567341 - Don't listen to xpcom-shutdown twice in nsAppShell. r=esawin
nsBaseAppShell already listens to xpcom-shutdown and calls |Exit| when it
receives it so we don't need to also listen for it in nsAppShell (which causes
two calls to xpcom-shutdown instead of one).

Differential Revision: https://phabricator.services.mozilla.com/D106209
2021-03-24 20:20:00 +00:00
Agi Sferro 9df5e4a34a Bug 1697844 - Remove unused Fennec telemetry code. r=esawin
Differential Revision: https://phabricator.services.mozilla.com/D108044
2021-03-24 20:06:24 +00:00
Alexandru Michis 3bba4a94fb Backed out 10 changesets (bug 1697844) for causing mpu failures in test_visualmetrics.py
CLOSED TREE

Backed out changeset 63b3268b0d2d (bug 1697844)
Backed out changeset 875b2aa342d9 (bug 1697844)
Backed out changeset 4fb528aaf7d5 (bug 1697844)
Backed out changeset 6ef5e1c9ca21 (bug 1697844)
Backed out changeset 430d6c940eb9 (bug 1697844)
Backed out changeset 7a306f28dc64 (bug 1697844)
Backed out changeset 871a40e2fc00 (bug 1697844)
Backed out changeset 083e9ce71d14 (bug 1697844)
Backed out changeset b53930a3f065 (bug 1697844)
Backed out changeset 24326d04dd37 (bug 1697844)
2021-03-24 21:59:28 +02:00
Agi Sferro 09ef42ac23 Bug 1697844 - Remove unused Fennec telemetry code. r=esawin
Differential Revision: https://phabricator.services.mozilla.com/D108044
2021-03-24 18:54:44 +00:00