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

31215 Коммитов

Автор SHA1 Сообщение Дата
Iulian Moraru 3f782c2587 Merge autoland to mozilla-central. a=merge 2022-03-24 23:53:10 +02:00
Ryan VanderMeulen 106476ec17 Backed out changeset f4f7fa5023f3 (bug 1758540) for causing Fenix topcrashes and breaking UI tests. 2022-03-24 14:45:43 -04:00
Eemeli Aro 1d40396fe4 Bug 1732151 - Remove unused vendorShortName from brand.properties and brand.dtd. r=flod
At this point, no code in mozilla-central references these.
In comms-central, the string is still used, but provided there
by local brand.properties and brand.dtd files.

Depends on D141860

Differential Revision: https://phabricator.services.mozilla.com/D141861
2022-03-24 15:57:54 +00:00
mleclair cb0a86aae4 Bug 1666226 - Add GeckoView APIs for starting and stopping the Gecko profiler r=geckoview-reviewers,mstange,agi
***

Differential Revision: https://phabricator.services.mozilla.com/D133404
2022-03-23 20:05:07 +00:00
Butkovits Atila 2c7e868cb3 Backed out changeset bec32662266a (bug 1666226) for causing Android bustages. CLOSED TREE 2022-03-23 21:14:51 +02:00
mleclair 90e32d0fb4 Bug 1666226 - Add GeckoView APIs for starting and stopping the Gecko profiler r=geckoview-reviewers,mstange,agi
***

Differential Revision: https://phabricator.services.mozilla.com/D133404
2022-03-23 18:53:32 +00:00
Michael Comella de2a926d42 Bug 1618560 - add debug logging to GeckoJavaSampler. r=canaltinova,agi
This is helpful when looking at logs from fenix in automation to answer
questions like, did the profiler start? Did it finish or did it crash before
then? Did it record any samples?

We had to add this logging temporarily to debug a test failure and it seemed
non-intrusive enough that we could keep it around long term.

Differential Revision: https://phabricator.services.mozilla.com/D141704
2022-03-22 18:50:49 +00:00
Michael Comella d4867d4ecf Bug 1618560 - support markers from multiple JVM threads in profiler. r=canaltinova,geckoview-reviewers,agi
Here is a sample profile taken with the combined patches:
  https://share.firefox.dev/3pEcSi0

I added a "sample marker" in the `dispatchToThreads` method called from the
Gecko thread to demonstrate markers taken off the main thread.

Differential Revision: https://phabricator.services.mozilla.com/D140435
2022-03-22 18:50:49 +00:00
Michael Comella e07a09ab87 Bug 1618560 - support samples from multiple JVM threads in profiler. r=canaltinova
Differential Revision: https://phabricator.services.mozilla.com/D140434
2022-03-22 18:50:48 +00:00
Makoto Kato 1179edbaf9 Bug 1759805 - Add exitFullscreen with orientation test. r=geckoview-reviewers,agi,calu
Actually, we have no orientation lock test with `exitFullscreen`. So I would
like to add it.

Differential Revision: https://phabricator.services.mozilla.com/D141184
2022-03-22 04:29:36 +00:00
Cristian Tuns 2434b6afea Backed out 2 changesets (bug 1712414, bug 1708105) for causing wpt failures CLOSED TREE
Backed out changeset ffedefe9258c (bug 1708105)
Backed out changeset 460b9abdbec3 (bug 1712414)
2022-03-21 21:21:42 -04:00
Olivia Hall f6b2347495 Bug 1712414 - GeckoView Prompts Adjustment for Marionette r=geckoview-reviewers,agi
Added "prompts" to geckoview.js window to collect active prompts using the added
GeckoViewPrompterChild and GeckoViewPrompterParent.
Added a way to get and set the prompt message text, callback, and
accept prompt(), confirm(), and alert().

Differential Revision: https://phabricator.services.mozilla.com/D133927
2022-03-22 00:13:44 +00:00
Eitan Isaacson 40f4e1faa4 Bug 1758540 - Pref on accessibility cache in Android. r=morgan
Differential Revision: https://phabricator.services.mozilla.com/D141638
2022-03-21 18:59:34 +00:00
Agi Sferro 7cac739ce8 Bug 1759889 - Add logging for Missing sender information. r=calu
Differential Revision: https://phabricator.services.mozilla.com/D141258
2022-03-17 19:32:32 +00:00
Cristian Tuns e8224e0ed6 Backed out changeset 416c97246140 (bug 1618560) for causing xpcshell failures in test_feature_java.js CLOSED TREE 2022-03-16 14:52:13 -04:00
Michael Comella 9507d3ff3c Bug 1618560 - support samples from multiple JVM threads in profiler. r=canaltinova
Differential Revision: https://phabricator.services.mozilla.com/D140434
2022-03-16 18:14:17 +00:00
edguloien 7b9d1e2937 Bug 1752621 - Improve http/2 prefs: changing spdy prefs to http2, making them static prefs and updating the tests. r=dragana,necko-reviewers,geckoview-reviewers,agi
Differential Revision: https://phabricator.services.mozilla.com/D139941
2022-03-15 08:54:01 +00:00
Eitan Isaacson cc41ebcd33 Bug 1758811 - P2: Deal with lack of cached bundle in SessionAccessibility.sendEvent. r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D140750
2022-03-11 18:55:43 +00:00
Eitan Isaacson 18d4e8633e Bug 1758811 - P1: Use gecko cache when it is enabled for retrieving node info. r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D140749
2022-03-11 18:55:42 +00:00
Mark Banner 8bb4667fae Bug 1758474 - Implement an ESLint rule to disallow passing {} as the target parameter for ChromeUtils.import. r=Gijs,mossop,perftest-reviewers,preferences-reviewers,sparky
Differential Revision: https://phabricator.services.mozilla.com/D140517
2022-03-11 16:41:29 +00:00
Jamie Nicol 020b3254c4 Bug 1759045 - Add null check to SurfaceAllocator.acquireSurface. r=agi
This prevents a java NullPointerException when the
RemoteSurfaceAllocator returns a null Surface to the local
SurfaceAllocator instance.

Differential Revision: https://phabricator.services.mozilla.com/D140801
2022-03-11 16:05:36 +00:00
smolnar e89faa903f Backed out changeset 5018856d8fee (bug 1758474) for causing node eslint failure. CLOSED TREE 2022-03-10 11:58:45 +02:00
Mark Banner fe937b78bd Bug 1758474 - Implement an ESLint rule to disallow passing {} as the target parameter for ChromeUtils.import. r=Gijs,mossop,perftest-reviewers,preferences-reviewers,sparky
Differential Revision: https://phabricator.services.mozilla.com/D140517
2022-03-10 09:25:28 +00:00
Nick Alexander 41f65544f9 Bug 1707719 - Avoid `groovy.lang.MissingMethodException ... getFileNames()`. r=geckoview-reviewers,agi
The exact error is
```
groovy.lang.MissingMethodException: No signature of method: groovy.util.FileNameFinder.getFileNames() is applicable for argument types: (File, String)
```

Differential Revision: https://phabricator.services.mozilla.com/D140689
2022-03-10 03:27:05 +00:00
Eitan Isaacson 0a81a46878 Bug 1758592 - P2: Return a value when pivoting and use it in parent-side traversal. r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D140684
2022-03-10 00:11:40 +00:00
Eitan Isaacson 22a62daa19 Bug 1758592 - P1: Add IsCacheEnabled JNI method. r=Jamie
This is a simple method for checking a pref.

Differential Revision: https://phabricator.services.mozilla.com/D140683
2022-03-10 00:11:40 +00:00
Makoto Kato 34f9ab363f Bug 1758212 - Add null check before calling ContentDelegate.onPointerIconChange. r=geckoview-reviewers,agi
Differential Revision: https://phabricator.services.mozilla.com/D140513
2022-03-09 23:34:48 +00:00
Eitan Isaacson 0190856052 Bug 1758559 - Introduce fission iframe tests to junit a11y tests. r=geckoview-reviewers,agi,Jamie
Differential Revision: https://phabricator.services.mozilla.com/D140560
2022-03-09 22:18:38 +00:00
Agi Sferro ebfa16b6b2 Bug 1748945 - Change isOpen to @UiThread. r=calu
The fact that isOpen is @AnyThread seems to be a mistake, I don't think we can
reliably tell a consumer if a session is open on a background thread.

Even with synchronized access to mWindow code like this would always be broken
on a background thread:

```
if (!session.isOpen()) {
  session.open(sGeckoRuntime);
}
```

because another thread could open the session between the isOpen() and the
session.open statements.

This patch changes isOpen to @UiThread. I verified that all calls actually
happen on the UI thread, except for the calls in GeckoSessionSettings where we
are trying to handle the case where a session was closed and _then_ we would
allow modifying read-only settings. I think in that case we should ask the
embedder to use a new SessionSettings instance instead of forcing all calls to
be @UiThread.

Differential Revision: https://phabricator.services.mozilla.com/D137784
2022-03-09 16:01:33 +00:00
Butkovits Atila e42a7e86e0 Backed out changeset f24e597defe1 (bug 1748945) for causing Lint failure. CLOSED TREE 2022-03-09 00:39:05 +02:00
Agi Sferro cefe196784 Bug 1748945 - Change isOpen to @UiThread. r=calu
The fact that isOpen is @AnyThread seems to be a mistake, I don't think we can
reliably tell a consumer if a session is open on a background thread.

Even with synchronized access to mWindow code like this would always be broken
on a background thread:

```
if (!session.isOpen()) {
  session.open(sGeckoRuntime);
}
```

because another thread could open the session between the isOpen() and the
session.open statements.

This patch changes isOpen to @UiThread. I verified that all calls actually
happen on the UI thread, except for the calls in GeckoSessionSettings where we
are trying to handle the case where a session was closed and _then_ we would
allow modifying read-only settings. I think in that case we should ask the
embedder to use a new SessionSettings instance instead of forcing all calls to
be @UiThread.

Differential Revision: https://phabricator.services.mozilla.com/D137784
2022-03-08 20:21:41 +00:00
Agi Sferro de258ae575 Bug 1758207 - Document that GeckoRuntime needs to be stored in a static variable. r=ohall DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D140424
2022-03-08 18:43:45 +00:00
Makoto Kato 2bea6e6f78 Bug 1754802 - Use WindowMetrics to get display size information on Android 12. r=geckoview-reviewers,agi
When using Android 12, Display.getRealSize() may not return orientation-aware
width/height. Actually although we use application context to get display
manager and window manager for screen size information, we should create window
context if Android 12+, then use new WindowMetrics API [*].

* https://developer.android.com/about/versions/12/deprecations#display-api-deprecations

Differential Revision: https://phabricator.services.mozilla.com/D139346
2022-03-08 03:42:30 +00:00
Nick Alexander f0a577a014 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-03-02 17:43:47 +00:00
Makoto Kato 7e130a3c59 Bug 1753574 - Don't resolve lock promise until LockDeviceOrientation is finished. r=smaug,geckoview-reviewers,agi
Even if platform implementation always returns error, `orientation.lock('any')`
is always successful. Because we don't wait for `LockDeviceOrientation`'s result
when current screen orientation is same as lock type. If
`LockDeviceOrientation` is failed, we should reject the promise.

Differential Revision: https://phabricator.services.mozilla.com/D137971
2022-03-02 03:48:14 +00:00
Makoto Kato 3493d2727e Bug 1753574 - hal::LockOrientation can return error status. r=smaug,geckoview-reviewers,agi,calu
From https://w3c.github.io/screen-orientation/#apply-an-orientation-lock

> 7.2. Apply an orientation lock
>
> The steps to apply an orientation lock to a Document using orientation are as
> follows:
>
>  1. If the user agent does not support locking the screen orientation, return
>     a promise rejected with a "NotSupportedError" DOMException and abort
>     these steps.

So if orientation controller delegate isn't set, we should throw
`NotSupportedError`.  But, actually, we throws `AbortError`, so this isn't
correct.

To return any DOM error from platform implementation of
`screen.orientation.lock`, I would like to change return value to
`GenericPromise`'s.

Differential Revision: https://phabricator.services.mozilla.com/D137970
2022-03-02 03:48:14 +00:00
Jamie Nicol f1a1d66351 Bug 1756569 - Handle null connection in GeckoProcessManager.getCompositorSurfaceManager. r=geckoview-reviewers,calu
If the GPU process crashes immediately after startup, before
GPUProcessHost calls getCompositorSurfaceManager, then the
getExistingConnection call will return null. This wasn't being
handled, resulting in a parent process crash due to a null pointer
exception.

This patch simply returns null from getCompositorSurfaceManager if it
cannot find the GpuProcessConnection. This will avoid the parent
process crash, allowing the GPU process crash to be handled
correctly (sending a crash report and restarting/disabling the GPU
process).

Differential Revision: https://phabricator.services.mozilla.com/D139943
2022-03-01 17:54:35 +00:00
Nika Layzell 2f62d8c857 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-28 21:01:49 +00:00
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