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

775939 Коммитов

Автор SHA1 Сообщение Дата
Luca Greco 3c700405f0 Bug 1728326 - Introduce BackgroundWorkerContextParent and verify worker descriptor id is part of the extension worker registration. r=zombie
Differential Revision: https://phabricator.services.mozilla.com/D124782
2021-11-05 20:27:02 +00:00
Luca Greco 16afb2598f Bug 1728326 - Notify main process when the extension background service worker has been fully loaded. r=zombie
Additional changes needed to observe the "extension-worker-loaded" topics and notify the main process when the background
service worker script has been fully loaded (similarly to how we notify the main process when
the background page has been fully loaded).

Differential Revision: https://phabricator.services.mozilla.com/D124704
2021-11-05 20:27:02 +00:00
Luca Greco ce74be05e3 Bug 1728326 - Create ExtensionWorkerChild once on ExtensionAPIRequestHandler.initExtensionWorker and destroy it on ExtensionAPIRequestHandler.onExtensionWorkerDestroyed. r=zombie
This patch includes:
- changed ExtensionAPIRequestHandler to handle the new INIT_WORKER_CONTEXT requestType and create
  the ExtensionWorkerContextChild instance and store it in a map keyed by service worker descriptor id.
- simplified handling of all other ExtensionAPIRequest types (by expecting that the
  ExtensionWorkerContextChild has been created once when the initExtensionWorker has been called).
- destroy an existing ExtensionWorkerContextChild instance (identified by its service worker descriptor id)
  when ExtensionAPIRequestHandler.onExtensionWorkerDestroyed has been called.

Differential Revision: https://phabricator.services.mozilla.com/D124703
2021-11-05 20:27:01 +00:00
Luca Greco 3455869b8b Bug 1728326 - Add GetRegistrationForAddonPrincipal to nsIServiceWorkerManager. r=asuth
This patch introduces a new getRegistrationForAddonPrincipal to nsIServiceWorkerManager.
This method is similar to the existing getRegistrationForPrincipal but:
- similarly to registerForAddonPrincipal it only gets the extension principal as its only
  input parameter.
- unlike getRegistrationForPrincipal, it doesn't throw if the registration has not been found
  (e.g. because it was already unregistered when the method was called).

Differential Revision: https://phabricator.services.mozilla.com/D124702
2021-11-05 20:27:01 +00:00
Luca Greco 60bb3c8c86 Bug 1728326 - Notify WebExtensions internals when a background service worker scripts has been executed. r=asuth
This patch includes changes needed to notify the WebExtensions internals
when a background service worker script has been fully loaded, through a
NotifyWorkerLoadedRunnable (dispatched as low priority) that calls a new
mozIExtensionAPIRequestHandler.onExtensionWorkerLoaded method.

Differential Revision: https://phabricator.services.mozilla.com/D124701
2021-11-05 20:27:01 +00:00
Luca Greco a053a7d451 Bug 1728326 - Notify WebExtensions internals when the background service worker is ready to be executed. r=asuth
This patch adds additional changes needed to notify, from WorkerPrivate ExecutionReady,
the WebExtensions internals that a new background service worker is ready to be executed,
and its related ExtensionWorkerContextChild should be created and initialized.

Differential Revision: https://phabricator.services.mozilla.com/D124700
2021-11-05 20:27:00 +00:00
Luca Greco 204a07cff7 Bug 1728326 - Add a new RequestInitWorkerRunnable to call mozIExtensionAPIRequestHandler initExtensionWorker. r=baku
This patch introduce a new RequestInitWorkerRunnable that calls a new mozIExtensionAPIRequestHandler.initExtensionWorker
method, and a CreateAndDispatchInitWorkerRunnable helper function which will be used to send
this mozIExtensionAPIRequest from the worker thread to the main thread when the background
service worker is ready for being executed (but before its main scripts has been evaluated
in the newly created service worker global scope).

Differential Revision: https://phabricator.services.mozilla.com/D124699
2021-11-05 20:27:00 +00:00
Luca Greco b3af29a162 Bug 1728326 - Add ServiceWorkerInfo descriptor id to mozIExtensionServiceWorkerInfo. r=baku
This patch adds the ServiceWorkerInfo descriptor id to the property available in the
mozIExtensionServiceWorkerInfo.

The descriptor ID is an integer assigned on the main process to each ServiceWorkerPrivate instance,
which will allow us to verify in the main process that the worker running in the child process is
part of the expected service worker registration, and it is also still available when the worker
is already being destroyed, which makes it useful as the key used in the map of the extension
service worker context that we keep in the child extension process.

Differential Revision: https://phabricator.services.mozilla.com/D124698
2021-11-05 20:26:59 +00:00
Luca Greco fe6d66f09d Bug 1728326 - Notify WebExtensions internals when a WebExtensions background service worker is destroyed. r=asuth
This patch introduces the following changes:
- In WorkerPrivate::ExtensionAPIAllowed: removed assertion on StaticPrefs::extensions_backgroundServiceWorker_enabled_AtStartup,
  replaced with just ignoring mExtensionAPIAllowed if the feature is turned out by prefs
- Added a new CreateAndDispatchWorkerDestroyedRunnable helper function to create and dispatch
  a runnable (as a low priority one) to call a new mozIExtensionAPIRequestHandler.onExtensionWorkerDestroyed
  method.

The service worker that has been destroyed is identified by its descriptor ID (the descriptor ID is an integer,
assigned on the main process to each ServiceWorkerPrivate instance, and still available when the worker is
already being destroyed).

Differential Revision: https://phabricator.services.mozilla.com/D124697
2021-11-05 20:26:59 +00:00
Jeff Muizelaar b3adb549de Bug 1739542 - Switch a bunch of IntRects to LayerRects. r=mstange
This makes the coordinate space more obvious. They were IntRects to make it
easier during development to be sloppy.

Differential Revision: https://phabricator.services.mozilla.com/D130423
2021-11-05 20:25:23 +00:00
Emilio Cobos Álvarez cf4ae6219e Bug 1737211 - Fix translate-interpolation.html. r=layout-reviewers,boris
Stripping the percentageness from calc() interpolation is not correct,
see https://github.com/w3c/csswg-drafts/issues/3482.

Differential Revision: https://phabricator.services.mozilla.com/D130459
2021-11-05 20:24:34 +00:00
Andrew Osmond 9cccd6a004 Bug 1739677 - Fix includes for PQuotaRequest.ipdl. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D130505
2021-11-05 20:23:37 +00:00
Emilio Cobos Álvarez 69813bd80e Bug 1586014 - Minor follow-up: don't do unnecessary attribute lookups. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D130394
2021-11-05 20:18:47 +00:00
Ava Katushka ava8katushka 89f2c5883c Bug 1725354 - Download panel shows blocked download item. r=mtigley,fluent-reviewers,flod
Differential Revision: https://phabricator.services.mozilla.com/D123943
2021-11-05 20:12:43 +00:00
Mike Kaply b57265e4f8 Bug 1737605 - Parse JSON directly from GPO so it's properly validated. r=mtigley
Differential Revision: https://phabricator.services.mozilla.com/D129845
2021-11-05 20:10:53 +00:00
Lars T Hansen 3bd2682fac Bug 1739576 - Make 8GB available. r=rhunt
Tidy up MaxMemoryPages(IndexType::I64) so that it returns a value
corresponding to the max buffer byte length.  Fix two asserts that
were incorrect and that triggered when making this change.

Add a test that the max memory pages for i64 is indeed at least 8GB.

Drive-by fix to allow a test to OOM without reporting that as a
failure.

Differential Revision: https://phabricator.services.mozilla.com/D130452
2021-11-05 20:03:22 +00:00
Nan Jiang 8058476b73 Bug 1736117 - Include Merino request_id in Firefox Suggest telemetry if available r=adw
Differential Revision: https://phabricator.services.mozilla.com/D128970
2021-11-05 20:01:13 +00:00
Marian-Vasile Laza bfa92e7578 Backed out changeset 397f23e1d806 (bug 1736117) for causing xpcshell failures on test_quicksuggest.js. CLOSED TREE 2021-11-05 21:23:11 +02:00
Tim Giles 5bd9b54707 Bug 1738310 - Refactor parts of aboutlogins to be more understandable. r=sgalich
Differential Revision: https://phabricator.services.mozilla.com/D130499
2021-11-05 19:10:18 +00:00
Sebastian Hengst cfe77b2206 Bug 1739603 - only define variable in BytecodeCompiler.cpp for configurations which use it. r=nbp DONTBUILD
Bug 1721849 added 'data' variable which only got called by assertions which are
ignore in opt builds outside Nightly and causes the build to report 'data' as
unused variable.

Differential Revision: https://phabricator.services.mozilla.com/D130456
2021-11-05 18:55:02 +00:00
Marian-Vasile Laza fca6bc6241 Backed out 3 changesets (bug 1733963) for causing build bustages on SyncedContext.h. CLOSED TREE
Backed out changeset de5c7a16378c (bug 1733963)
Backed out changeset f5f3a27abf60 (bug 1733963)
Backed out changeset cc3a0603f88a (bug 1733963)
2021-11-05 20:54:33 +02:00
Nan Jiang cc3d9c2dec Bug 1736117 - Include Merino request_id in Firefox Suggest telemetry if available r=adw
Differential Revision: https://phabricator.services.mozilla.com/D128970
2021-11-05 18:36:04 +00:00
Mike Kaply 1a6fa589b2 Bug 1655839 - Show an error for invalid origin in policy. r=mtigley
Differential Revision: https://phabricator.services.mozilla.com/D129444
2021-11-05 18:31:01 +00:00
Jon Coppeard 67e5f32aae Bug 1738721 - Part 3: Rename MetaTwoByte to MetaScriptedThisShape and remove unused argument r=jandem
Differential Revision: https://phabricator.services.mozilla.com/D130106
2021-11-05 18:14:42 +00:00
Jon Coppeard 9f89d2dd54 Bug 1738721 - Part 2: Remove unused MCreateThisWithTemplate node and associated machinery r=jandem
Differential Revision: https://phabricator.services.mozilla.com/D130105
2021-11-05 18:14:41 +00:00
Jon Coppeard 68ee4eb8e2 Bug 1738721 - Part 1: Use a shape rather than a template object to create |this| when calling a scripted constructor r=jandem
This replaces use of MCreateThisWithTemplate with MNewPlainObject. This adds a
MIR flag to replace checks for MCreatThisWithTemplate.

Differential Revision: https://phabricator.services.mozilla.com/D130104
2021-11-05 18:14:41 +00:00
Andreas Farre 1572bd11bb Bug 1733963 - Part 3: Make SyncedContext use BitSet for Transaction. r=nika
This removes the limit on the number of possible field counts for a
synced field class.

Depends on D127448

Differential Revision: https://phabricator.services.mozilla.com/D127449
2021-11-05 17:23:02 +00:00
Andreas Farre 694649bec3 Bug 1733963 - Part 2: Add BitSet tests. r=glandium
Depends on D127447

Differential Revision: https://phabricator.services.mozilla.com/D127448
2021-11-05 17:23:02 +00:00
Andreas Farre 2dbbc3ad0e Bug 1733963 - Part 1: Make BitSet work as storage for EnumSet. r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D127447
2021-11-05 17:23:01 +00:00
Olivia Hall 71323994b5 Bug 1682599 - Check if media URL is valid before returning it to onContextMenu. r=geckoview-reviewers,agi
Added a check to see if the media blob URL was valid and could be downloaded.
Added a few general unit tests for ContentDelegateChild.

Differential Revision: https://phabricator.services.mozilla.com/D129859
2021-11-05 17:20:36 +00:00
Dimi c28628a90f Bug 1729640 - P8. Request longer timeout for browser_web_process_isolation test. r=farre
Open the test tab takes some time in this testcase
(https://searchfox.org/mozilla-central/rev/d2f8488b6a704443a5c5bfc6d2878171b5f0d393/dom/ipc/tests/browser_web_process_isolation.js#31-43)
, and we open the tab multiple times in this testcase.

Since we add 2 more test scenarios for the testcase, this testcase need more time to finish.

Differential Revision: https://phabricator.services.mozilla.com/D130478
2021-11-05 17:11:33 +00:00
Dimi 853f95311b Bug 1729640 - P7. Add test cases for isolating sites by login related heuristics r=farre
Differential Revision: https://phabricator.services.mozilla.com/D127108
2021-11-05 17:11:33 +00:00
Dimi c0b1d1a95c Bug 1729640 - P6. Add a preference to enable setting `HighValueIsLoggedIn` permission when fission is off. r=farre
The preference should be enabled before rolling out "fission for authenticated sites"
to makes sure we have the permissions there when the feature is on.

Differential Revision: https://phabricator.services.mozilla.com/D127107
2021-11-05 17:11:33 +00:00
Dimi be3898df89 Bug 1729640 - P5. Add a preference to control the expiration time of login related high-value permission. r=farre
Right now, all high-value permissions have the same expiration time, but
we might want to set difference expiration time for different
high-value permission type in the future.

Differential Revision: https://phabricator.services.mozilla.com/D127106
2021-11-05 17:11:32 +00:00
Dimi 4744525d0d Bug 1729640 - P4. Setting high-value permission for sites that are considered is logged in. r=farre,sfoster,tgiles
Sites that match the following heuristic are considered high-value:
1. Sites that have a password stored in the password manager
2. Sites that we detect that users submit a form with a password

This patch adds LoginDetectionService to detect login attempts.
When LoginDetectionService finds a site that matches any of the above
heuristics, it adds the corresponding high-value permission to the
permission manager.

Differential Revision: https://phabricator.services.mozilla.com/D127105
2021-11-05 17:11:32 +00:00
Dimi 1170d5bd99 Bug 1729640 - P3. Notify event when a form with password is submitted r=sfoster,tgiles,geckoview-reviewers,agi
Notify "passwordmgr-form-submission-detected" when a form with password
is submitted.
The event should be notified regardless of whether the password manager
decides to show the doorhanger or not. To support this, this patch
also refactors _maybeSendFormInteractionMessage function to distinguish
"onFormSubmit" event and "showDoorhanger" event.

Differential Revision: https://phabricator.services.mozilla.com/D127104
2021-11-05 17:11:31 +00:00
Dimi 90828509e3 Bug 1729640 - P2. Add a nsILoginManager API to fetch all saved logins asynchronously. r=sfoster,tgiles
The new 'searchAllLoginsAsync' API works the same as the `getAllLoginsAsync` API.
The purpose of adding the API is to make C++ caller easier to use.

Differential Revision: https://phabricator.services.mozilla.com/D127103
2021-11-05 17:11:31 +00:00
Dimi 56505f3e46 Bug 1729640 - P1. Extend AddHighValuePermission to support 'highValueHasSavedLogin' and 'highValueIsLoggedIn' permission. r=necko-reviewers,farre,kershaw
This patch:
1. adds two 'highValueHasSavedLogin' and 'highValueIsLoggedIn' permission
2. moves 'AddHighValuePermission' from HttpBaseChannel to ProcessIsolation
   to support more high-value permission type.

Differential Revision: https://phabricator.services.mozilla.com/D127101
2021-11-05 17:11:31 +00:00
raquelvargas 82fcbdc4b5 Bug 1738245 - Remove OS.File usage from various browser/ tests. r=Standard8,robwu
Differential Revision: https://phabricator.services.mozilla.com/D129972
2021-11-05 16:49:48 +00:00
shravanrn@gmail.com e073c96dc5 Bug 1739654 - Update RLBox so that locks aren't used for app_pointer in single threaded contexts r=bholley
Differential Revision: https://phabricator.services.mozilla.com/D130482
2021-11-05 16:46:34 +00:00
Jonathan Kew 97209d1f8a Bug 1737147 - Treat characters with LB=BreakAfter as Breakable in LineBreaker.cpp. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D130477
2021-11-05 16:22:29 +00:00
Agi Sferro 426b9a2fd8 Bug 1717506 - Re-enable autofillNavigation. r=owlish
There is a potential intermittent where we try to execute javascript in the
page before the page navigates away, causing a hang. To ensure that that is not
possible we also wait for a PageStop event.

Differential Revision: https://phabricator.services.mozilla.com/D130377
2021-11-05 15:58:54 +00:00
Agi Sferro 175a5c05ff Bug 1717506 - Handle out-of-order page{hide,show}. r=owlish
With Fission BFCache, when navigating back the two pages might run in different
processes, even though they belong to the same domain.

This means that `pagehide` and `pageshow` might come out of order. For example,
navigating from `a.html` to `b.html` and back, we might get

```
pageshow b.html
pageshow a.html
pagehide b.html
```

notice we get the `pageshow` event for `a.html` _before_ the `pagehide` event
for `b.html`.

Internally in our test framework, we use `pagehide` and `pageshow` to establish
a connection between a page and the Java layer through a WebExtension port.

Before this patch, we assumed tha all `pageshow` events will match a `pagehide`
event in order, and thus disconnect the port early for `a.html` when getting
the event for `b.html` in the above example.

There is also a separate problem where if a port was established for a given
web page and then a navigation was issued, we would hang waiting for a response
from the page that navigated away (and thus, we would not be able to send
messages anymore).

To fix both of these issues, we keep track of all pending messages and discard
them properly when a Port is disconnected, and make sure that the port that's
disconnecting matches the one that's currently associated with the session (to
ensure that we are not disconnecting because of a out-of-order port event).

Differential Revision: https://phabricator.services.mozilla.com/D130376
2021-11-05 15:58:54 +00:00
Dimi 4ffac0fbf3 Bug 1738980 - Do not notify autocomplete search result when the search operation is canceled. r=sfoster,tgiles
Before this patch, when the search operation is canceled, we return null
in _getRecords instead of returning `AutoCompleteResult`, See
https://searchfox.org/mozilla-central/rev/80fddabd6773cd028ec69dd4f5a2a34fcd6b4387/toolkit/components/formautofill/FormAutofillContent.jsm#255-271

However, a null result does stop us from calling onSearchResult callback, which triggers
an assertion in nsAutoCompleteController.
https://searchfox.org/mozilla-central/rev/80fddabd6773cd028ec69dd4f5a2a34fcd6b4387/toolkit/components/formautofill/FormAutofillContent.jsm#276-291
https://searchfox.org/mozilla-central/rev/1e7f7235cf822e79cd79ba9e200329ede3d37925/toolkit/components/autocomplete/nsAutoCompleteController.cpp#813

This patches check whether the search operation is canceled before calling `onSearchResult`.

Differential Revision: https://phabricator.services.mozilla.com/D130242
2021-11-05 15:44:40 +00:00
Emilio Cobos Álvarez 4963e6b250 Bug 1739486 - Hack around https://github.com/pypa/virtualenv/issues/2208. r=mhentges
The virutalenv hack is in the fedora-distributed version of
virtualenv... Presumably eventually will become unnecessary once they
provide a proper "venv" distutils?

This patch applies both before and after the bump in comment 5, so your
call.

Differential Revision: https://phabricator.services.mozilla.com/D130410
2021-11-05 15:41:55 +00:00
Nicolas B. Pierron fb350c6b26 Bug 1739627 - Disable test cases when forceFullParse is set by code coverage. r=arai
Differential Revision: https://phabricator.services.mozilla.com/D130475
2021-11-05 15:31:48 +00:00
Cristian Tuns 696ecf6ad1 Backed out changeset 83b257ad49e3 (bug 1738323) for causing mochitest failures on BuiltInThemeConfig.jsm CLOSED TREE 2021-11-05 10:43:30 -04:00
Masayuki Nakano 635539b0e5 Bug 1706266 - part 2: Disable some Gecko specific edit commands in release and beta channel, and all of them in nightly channel r=smaug
The telemetry result is written in bug 1706266 comment 1:
https://bugzilla.mozilla.org/show_bug.cgi?id=1706266#c1

`increasefontsize`, `decreasefontsize`, `gethtml`, `heading` and `readonly` are
obviously not used by web apps in the wild.  Therefore, they can be disabled
in all channels.

`contentReadOnly` and `insertBrOnReturn` are odd.  The usage is really low (less
than 1% of beta users).  However, the number of documents which used the command
is about 1k samples.  The result of the commands are not tiny (making the editor
not editable or changing the behavior at typing `Enter` key in `<div>`, `<p>`,
etc).  Therefore, it's hard to use them in web apps which supports not only
Gecko.  So I guess that they are collected the number of used by automated
tests of somebody because of the constant number in other beta versions.
Perhaps, we should disable it only in Nightly channel for now, and after a
couple of releases, we should try to disable those commands too later.

Depends on D130328

Differential Revision: https://phabricator.services.mozilla.com/D130329
2021-11-05 14:29:25 +00:00
Masayuki Nakano c83a39e650 Bug 1706266 - part 1: Make nobody use `Document::ExecCommand()` internally r=smaug
It's a DOM API and we are going to change supporting commands for making it
compatible with the other browsers.

Currently, it's used only in `Document::EditingStateChanged()` to initialize the
default paragraph separator from `<br>` to `<p>` or `<div>`.  However, the
command, `insertBrOnReturn` is Gecko specific one, and I'd like to stop
supporting it with the following patch.  Therefore, we need to do this change
first.

For mozregressions, this patch will be landed separately before landing the
following patch.

Differential Revision: https://phabricator.services.mozilla.com/D130328
2021-11-05 14:12:40 +00:00
Masayuki Nakano 524a98b4f2 Bug 1739526 - Move some trivial classes defined in `EditorUtils.h` but used only by `HTMEditor` or its helper classes to `HTMLEditHelpers.h" r=m_kato
I'd like to split utilities for all editors and only for `HTMLEditor`.

This moves some trivial classes into new `HTMLEditHelpers.h`.  Perhaps, it's
better if we can move them into `HTMLEditUtils.h`, but it has too many inline
method definitions so that adding new classes into it makes it much bigger.

Depends on D130349

Differential Revision: https://phabricator.services.mozilla.com/D130425
2021-11-05 14:10:49 +00:00