Commit Graph

676 Commits

Author SHA1 Message Date
Kris Maglione
9d78661f88 Bug 1649221: Update ChromeUtils.generateQI callers to pass strings. r=mccr8,remote-protocol-reviewers,marionette-reviewers,perftest-reviewers,webcompat-reviewers,geckoview-reviewers,preferences-reviewers,agi,whimboo,Bebe,twisniewski
Differential Revision: https://phabricator.services.mozilla.com/D81594
2020-07-10 23:58:28 +00:00
lougeniac64
499048fe86 (Bug 1635487) Wired up sync logging for extension pref storage r=lina,markh
Differential Revision: https://phabricator.services.mozilla.com/D80975
2020-06-27 19:15:17 +00:00
Csoregi Natalia
5bb8a015e6 Backed out changeset 8cd7fabbe270 (bug 1635487) for multiple leaks. CLOSED TREE 2020-06-27 10:43:15 +03:00
lougeniac64
bce2c33963 (Bug 1635487) Wired up sync logging for extension pref storage r=lina,markh
Differential Revision: https://phabricator.services.mozilla.com/D80975
2020-06-27 06:26:22 +00:00
Razvan Maries
eb909a6e55 Backed out changeset fec02fef5e73 (bug 1635487) for Android bustages. CLOSED TREE 2020-06-27 03:05:27 +03:00
lougeniac64
893cb93c43 (Bug 1635487) Wired up sync logging for extension pref storage r=lina,markh
Differential Revision: https://phabricator.services.mozilla.com/D80975
2020-06-26 21:19:17 +00:00
Mathieu Leplatre
a4fabab49a Bug 1639284 - Store records, timestamp and metadata in one IndexedDB transaction r=Gijs,mixedpuppy
Differential Revision: https://phabricator.services.mozilla.com/D78246
2020-06-24 10:00:53 +00:00
Csoregi Natalia
aec20399f5 Backed out changeset a0af6d53c082 (bug 1639284) for multiple failures e.g. browser_asrouter_whatsnewpanel.js CLOSED TREE 2020-06-22 12:20:39 +03:00
Mathieu Leplatre
07af99c7f1 Bug 1639284 - Store records, timestamp and metadata in one IndexedDB transaction r=Gijs,mixedpuppy
Differential Revision: https://phabricator.services.mozilla.com/D78246
2020-06-22 08:21:40 +00:00
Cosmin Sabou
17e54eff48 Backed out changeset 7e39d1eed06b (bug 1639284) for xpcshell failures on test_blocklist_severities.js. CLOSED TREE 2020-06-18 17:29:29 +03:00
Mathieu Leplatre
986bc3704b Bug 1639284 - Store records, timestamp and metadata in one IndexedDB transaction r=Gijs,mixedpuppy
Differential Revision: https://phabricator.services.mozilla.com/D78246
2020-06-18 09:47:43 +00:00
Mihai Alexandru Michis
cce0439cc1 Backed out changeset da7cbff78183 (bug 1639284) for causing failures in test_engine_selector_remote_settings.js
CLOSED TREE
2020-06-17 20:51:02 +03:00
Mathieu Leplatre
a4d248daf8 Bug 1639284 - Store records, timestamp and metadata in one IndexedDB transaction r=Gijs,extension-reviewers,mixedpuppy
Differential Revision: https://phabricator.services.mozilla.com/D78246
2020-06-17 15:58:25 +00:00
Mark Hammond
0278934973 Bug 1645729 - avoid printing a warning to the console about a log level's preference. r=rfkelly
Specifically:
> Log warning: The log 'Services.Common.RESTRequest' is configured to use the preference 'services.common.log.logger.rest.request' - you must adjust the level by setting this preference, not by using the level setter

This is because the hawkrequest module attempts to explicitly set the level
from the preference value, but these days Log.jsm manages that itself.

Also skips obtaining the log itself until it's needed, as it almost never
actually is.

Differential Revision: https://phabricator.services.mozilla.com/D79633
2020-06-15 04:51:02 +00:00
Mathieu Leplatre
97875bccdd Bug 1637178 - Distinguish local DB hijacks from sign errors in Uptake Telemetry r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D75529
2020-05-26 11:20:03 +00:00
Rob Wu
8c4c5239e9 Bug 1636158 - Document how to use attachment dumps in RemoteSettings r=leplatrem
Differential Revision: https://phabricator.services.mozilla.com/D76159
2020-05-22 13:09:50 +00:00
Andrea Marchesini
3321630999 Bug 1632187 - Introduce nsICookieService::setCookieStringFromDocument - part 3 - remove nsICookieService::setCookieString from tests, r=mayhemer
Differential Revision: https://phabricator.services.mozilla.com/D71976
2020-05-09 22:28:53 +00:00
Coroiu Cristina
b2935aef35 Backed out 5 changesets (bug 1632187) for xpcshell failures at netwerk/test/unit/test_proxyconnect.js
Backed out changeset c0e6dad41b74 (bug 1632187)
Backed out changeset 328ee0899987 (bug 1632187)
Backed out changeset cb775f75ff1f (bug 1632187)
Backed out changeset de6907618ac9 (bug 1632187)
Backed out changeset 1070e843071c (bug 1632187)
2020-05-09 23:22:06 +03:00
Andrea Marchesini
275ef67da0 Bug 1632187 - Introduce nsICookieService::setCookieStringFromDocument - part 3 - remove nsICookieService::setCookieString from tests, r=mayhemer
Differential Revision: https://phabricator.services.mozilla.com/D71976
2020-05-09 19:03:12 +00:00
Ian Moody
011b59d595 Bug 1536556 - Replace raw thrown Cr.ERRORs with Components.Exception. r=mossop,remote-protocol-reviewers,marionette-reviewers,whimboo,necko-reviewers,geckoview-reviewers,valentin,agi
Raw Cr.ERROR don't get stack information, same as throwing JS literals instead
of `new Error()`s.

This was done automatically with a new eslint rule that will be introduced in
the next commit.  One instance of a raw Cr.ERROR was not replaced since it is
used in a test that specifically checks the preservation of raw Cr values in
XPCJS.  The rule will be disabled for that instance.

Differential Revision: https://phabricator.services.mozilla.com/D28073
2020-05-05 17:41:36 +00:00
Rob Wu
981457a895 Bug 1620621 - Add support for fallback to dumps for attachments r=Gijs,leplatrem
With this piece, it is now possible for RemoteSettings clients to always
have a valid attachment.

This adds the client APIs that could support bug 1542177.

Differential Revision: https://phabricator.services.mozilla.com/D72417
2020-04-30 10:02:30 +00:00
Rob Wu
f08ef10b92 Bug 1620621 - Add caching and recovery mechanisms to RemoteSettings's download() method r=Gijs,leplatrem
The current RemoteSettings API has two methods for downloading:

- `download(record)` to download an attachment to disk, with a filename
  given by the record. The file is read and returned before downloading.
  A new download attempt overwrites the file, with no recovery mechanism
  if the download fails.
- `downloadAsBytes(record)` to download an attachment in memory.

The `download` method does have a cache, but it is only useful for
reducing bandwidth usage, not for availability of data. Moreover, if its
associated record is removed from the collection, then callers do not
have a way to delete the file since its identifier (filename) originates
from the record.

The `downloadAsBytes` method does not have this file tracking issue
since it does not persist the data, but it forces callers to implement
their own attachment storing mechanism.

This commit adds the `useCache` option to the `download()` method to
enable callers to use an IndexedDB-based cache instead of the
filesystem. The following options unlock significant features:

- `fallbackToCache` - If the requested attachment is not available, the
  last known attachment is returned.
- `fallbackToDump` - If the requested attachment is not available, nor
  cached, then the attachment (dump) that is packaged with the client is
  returned instead. This is implemented in the next commit (D72417).

The original record is cached along with the attachment, to allow
callers to use the file (identified by the given `attachmentId`) and
its metadata, even when the original record has been removed from the
collection.

This is particularly useful for scenarios where one wants to keep a file
(and metadata) up to date via RemoteSettings, without having to develop
a separate storage and synchronization mechanism.

The deprecation of the old behavior will be handled in bug 1634127.

Differential Revision: https://phabricator.services.mozilla.com/D72416
2020-04-30 10:02:27 +00:00
Razvan Maries
c92da124b3 Backed out 8 changesets (bug 1620621) for build bustages. CLOSED TREE
Backed out changeset 14a57e32c414 (bug 1620621)
Backed out changeset 56b2b19a9bc1 (bug 1620621)
Backed out changeset 6df42b7528ec (bug 1620621)
Backed out changeset c23703684254 (bug 1620621)
Backed out changeset 206ad824e1bc (bug 1620621)
Backed out changeset e0f3e057b311 (bug 1620621)
Backed out changeset 12817823a3c9 (bug 1620621)
Backed out changeset 80dcb089ce8e (bug 1620621)
2020-04-30 12:29:30 +03:00
Rob Wu
4c8480260e Bug 1620621 - Add support for fallback to dumps for attachments r=Gijs,leplatrem
With this piece, it is now possible for RemoteSettings clients to always
have a valid attachment.

This adds the client APIs that could support bug 1542177.

Differential Revision: https://phabricator.services.mozilla.com/D72417
2020-04-30 02:48:37 +00:00
Rob Wu
e515fb95e2 Bug 1620621 - Add caching and recovery mechanisms to RemoteSettings's download() method r=Gijs,leplatrem
The current RemoteSettings API has two methods for downloading:

- `download(record)` to download an attachment to disk, with a filename
  given by the record. The file is read and returned before downloading.
  A new download attempt overwrites the file, with no recovery mechanism
  if the download fails.
- `downloadAsBytes(record)` to download an attachment in memory.

The `download` method does have a cache, but it is only useful for
reducing bandwidth usage, not for availability of data. Moreover, if its
associated record is removed from the collection, then callers do not
have a way to delete the file since its identifier (filename) originates
from the record.

The `downloadAsBytes` method does not have this file tracking issue
since it does not persist the data, but it forces callers to implement
their own attachment storing mechanism.

This commit adds the `useCache` option to the `download()` method to
enable callers to use an IndexedDB-based cache instead of the
filesystem. The following options unlock significant features:

- `fallbackToCache` - If the requested attachment is not available, the
  last known attachment is returned.
- `fallbackToDump` - If the requested attachment is not available, nor
  cached, then the attachment (dump) that is packaged with the client is
  returned instead. This is implemented in the next commit (D72417).

The original record is cached along with the attachment, to allow
callers to use the file (identified by the given `attachmentId`) and
its metadata, even when the original record has been removed from the
collection.

This is particularly useful for scenarios where one wants to keep a file
(and metadata) up to date via RemoteSettings, without having to develop
a separate storage and synchronization mechanism.

The deprecation of the old behavior will be handled in bug 1634127.

Differential Revision: https://phabricator.services.mozilla.com/D72416
2020-04-30 09:02:14 +00:00
Dorel Luca
58186c88dc Backed out 8 changesets (bug 1620621) for XPCshell failures in xpcshell/rs-blocklist/test_blocklist_mlbf_fetch.js
Backed out changeset 06fccc75c09e (bug 1620621)
Backed out changeset 8b4e286967c0 (bug 1620621)
Backed out changeset cfde27a748fd (bug 1620621)
Backed out changeset 7abf836343be (bug 1620621)
Backed out changeset 1a28d1de8f76 (bug 1620621)
Backed out changeset 90c08438be0a (bug 1620621)
Backed out changeset 723a3b4e7bbf (bug 1620621)
Backed out changeset bbc991f09d5d (bug 1620621)
2020-04-30 05:44:28 +03:00
Rob Wu
2f5a6bf9d0 Bug 1620621 - Add support for fallback to dumps for attachments r=Gijs,leplatrem
With this piece, it is now possible for RemoteSettings clients to always
have a valid attachment.

This adds the client APIs that could support bug 1542177.

Differential Revision: https://phabricator.services.mozilla.com/D72417
2020-04-29 23:08:08 +00:00
Rob Wu
3c1bafb9ac Bug 1620621 - Add caching and recovery mechanisms to RemoteSettings's download() method r=Gijs,leplatrem
The current RemoteSettings API has two methods for downloading:

- `download(record)` to download an attachment to disk, with a filename
  given by the record. The file is read and returned before downloading.
  A new download attempt overwrites the file, with no recovery mechanism
  if the download fails.
- `downloadAsBytes(record)` to download an attachment in memory.

The `download` method does have a cache, but it is only useful for
reducing bandwidth usage, not for availability of data. Moreover, if its
associated record is removed from the collection, then callers do not
have a way to delete the file since its identifier (filename) originates
from the record.

The `downloadAsBytes` method does not have this file tracking issue
since it does not persist the data, but it forces callers to implement
their own attachment storing mechanism.

This commit adds the `useCache` option to the `download()` method to
enable callers to use an IndexedDB-based cache instead of the
filesystem. The following options unlock significant features:

- `fallbackToCache` - If the requested attachment is not available, the
  last known attachment is returned.
- `fallbackToDump` - If the requested attachment is not available, nor
  cached, then the attachment (dump) that is packaged with the client is
  returned instead. This is implemented in the next commit (D72417).

The original record is cached along with the attachment, to allow
callers to use the file (identified by the given `attachmentId`) and
its metadata, even when the original record has been removed from the
collection.

This is particularly useful for scenarios where one wants to keep a file
(and metadata) up to date via RemoteSettings, without having to develop
a separate storage and synchronization mechanism.

The deprecation of the old behavior will be handled in bug 1634127.

Differential Revision: https://phabricator.services.mozilla.com/D72416
2020-04-29 23:39:07 +00:00
Vlad Filippov
cf50ebbe18 Bug 1631830 - Fetch Sync tokens with OAuth behind a pref r=rfkelly
Differential Revision: https://phabricator.services.mozilla.com/D72092
2020-04-28 04:20:55 +00:00
Mathieu Leplatre
e95ee4d2f4 Bug 1620186 - Fetch from changeset endpoint r=glasserc
Differential Revision: https://phabricator.services.mozilla.com/D71570
2020-04-24 09:15:43 +00:00
Mathieu Leplatre
3c64c7a3b2 Bug 1620186 - Upgrade kinto-client to 5.1.1 r=glasserc
Differential Revision: https://phabricator.services.mozilla.com/D71569
2020-04-24 09:15:25 +00:00
Lina Cambridge
f9abd62b34 Bug 1596322 - Add XPCOM bindings for Rust Sync engines. r=markh,tcsc,LougeniaBailey
This commit adds a new crate for bridging Rust Sync engines to Desktop,
and a `mozIBridgedSyncEngine` for accessing the bridge via JS.
Naturally, the bridge is called Golden Gate. 😊 For more information
on how to use it, please see `golden_gate/src/lib.rs`.

Other changes include:

* Ensuring the test Sync server uses UTF-8 for requests and responses.
* Renaming `mozISyncedBookmarksMirrorLogger` to `mozIServicesLogger`,
  and moving it into the shared Sync interfaces.

The `BridgedEngine` trait lives in its own crate, called
`golden_gate_traits`, to make it easier to eventually move into a-s.
`Interruptee` and `Interrupted` already exist in a-s, and are
duplicated in this crate for now.

Differential Revision: https://phabricator.services.mozilla.com/D65268

--HG--
extra : moz-landing-system : lando
2020-04-09 15:45:37 +00:00
Bogdan Tara
5dcf5dcc85 Backed out changeset d8ef791a2165 (bug 1596322) for browser_all_files_referenced.js failures CLOSED TREE 2020-04-09 13:17:04 +03:00
Lina Cambridge
fcb1f70a45 Bug 1596322 - Add XPCOM bindings for Rust Sync engines. r=markh,tcsc,LougeniaBailey
This commit adds a new crate for bridging Rust Sync engines to Desktop,
and a `mozIBridgedSyncEngine` for accessing the bridge via JS.
Naturally, the bridge is called Golden Gate. 😊 For more information
on how to use it, please see `golden_gate/src/lib.rs`.

Other changes include:

* Ensuring the test Sync server uses UTF-8 for requests and responses.
* Renaming `mozISyncedBookmarksMirrorLogger` to `mozIServicesLogger`,
  and moving it into the shared Sync interfaces.

The `BridgedEngine` trait lives in its own crate, called
`golden_gate_traits`, to make it easier to eventually move into a-s.
`Interruptee` and `Interrupted` already exist in a-s, and are
duplicated in this crate for now.

Differential Revision: https://phabricator.services.mozilla.com/D65268

--HG--
extra : moz-landing-system : lando
2020-04-09 07:32:52 +00:00
Brindusan Cristian
bb29753b0d Backed out changeset 2b02e71f1780 (bug 1596322) for multiple xpcshell failures. CLOSED TREE 2020-04-09 03:39:56 +03:00
Lina Cambridge
186b7665c4 Bug 1596322 - Add XPCOM bindings for Rust Sync engines. r=markh,tcsc,LougeniaBailey
This commit adds a new crate for bridging Rust Sync engines to Desktop,
and a `mozIBridgedSyncEngine` for accessing the bridge via JS.
Naturally, the bridge is called Golden Gate. 😊 For more information
on how to use it, please see `golden_gate/src/lib.rs`.

Other changes include:

* Ensuring the test Sync server uses UTF-8 for requests and responses.
* Renaming `mozISyncedBookmarksMirrorLogger` to `mozIServicesLogger`,
  and moving it into the shared Sync interfaces.

The `BridgedEngine` trait lives in its own crate, called
`golden_gate_traits`, to make it easier to eventually move into a-s.
`Interruptee` and `Interrupted` already exist in a-s, and are
duplicated in this crate for now.

Differential Revision: https://phabricator.services.mozilla.com/D65268

--HG--
extra : moz-landing-system : lando
2020-04-08 20:18:37 +00:00
Mathieu Leplatre
24fcb6ab53 Bug 1620185 - Improve behaviour when signature is bad after retry r=glasserc
When the signature verification fails after retry we don't want to apply the changes, and if possible we want to leave the local data as it was before sync.

Differential Revision: https://phabricator.services.mozilla.com/D67139

--HG--
extra : moz-landing-system : lando
2020-03-17 20:24:01 +00:00
Mathieu Leplatre
aaf32a2504 Bug 1620185 - Remove usage of .openCollection() r=glasserc
Differential Revision: https://phabricator.services.mozilla.com/D66632

--HG--
extra : moz-landing-system : lando
2020-03-17 20:20:46 +00:00
Mathieu Leplatre
fbc12fc39d Bug 1620185 - Reuse code from signature failure retry r=glasserc
Differential Revision: https://phabricator.services.mozilla.com/D66412

--HG--
extra : moz-landing-system : lando
2020-03-17 20:19:28 +00:00
Christoph Kerschbaumer
af63b804a6 Bug 1508292: Implement Sec-Fetch-*. r=baku
Differential Revision: https://phabricator.services.mozilla.com/D66283

--HG--
extra : source : a0508ae6c037928981ac2733860b6ec84d7069ec
2020-03-14 17:28:41 +00:00
Brindusan Cristian
11cc2fbf73 Backed out changeset a0508ae6c037 (bug 1508292) for sm bustage.
--HG--
extra : rebase_source : 0db77cae1e8115c19dbaa6d556b30890909ed996
2020-03-14 22:40:55 +02:00
Christoph Kerschbaumer
bc8997ee18 Bug 1508292: Implement Sec-Fetch-*. r=baku
Differential Revision: https://phabricator.services.mozilla.com/D66283

--HG--
extra : moz-landing-system : lando
2020-03-14 17:28:41 +00:00
Ed Lee
acb960676c Bug 1620556 - Automatic code fixes for Prettier 1.19.1 upgrade. r=Standard8,remote-protocol-reviewers,marionette-reviewers,webcompat-reviewers,perftest-reviewers,sparky,whimboo,denschub
Differential Revision: https://phabricator.services.mozilla.com/D66128

--HG--
extra : moz-landing-system : lando
2020-03-13 23:38:52 +00:00
Anurag Aggarwal
45b0a79f3d Bug 1536103 - Fixed mach doc warnings.r=firefox-source-docs-reviewers,championshuttler,sylvestre
Differential Revision: https://phabricator.services.mozilla.com/D66462

--HG--
extra : moz-landing-system : lando
2020-03-12 17:20:15 +00:00
Mark Banner
2c4e35b0a6 Bug 1620218 - Automatic code fixes for Prettier 1.18.2 upgrade. r=mossop,webcompat-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D65509

--HG--
extra : moz-landing-system : lando
2020-03-08 21:45:16 +00:00
Mathieu Leplatre
2d4875b904 Bug 1618491 - Detect shutdown during Remote Settings sync r=glasserc
Differential Revision: https://phabricator.services.mozilla.com/D65318

--HG--
extra : moz-landing-system : lando
2020-03-05 18:06:52 +00:00
Andrea Marchesini
9bc071f817 Bug 1619875 - Remove the remaining of the prompting code in the cookie-world, r=Ehsan
Differential Revision: https://phabricator.services.mozilla.com/D65289

--HG--
extra : moz-landing-system : lando
2020-03-04 21:25:33 +00:00
Mathieu Leplatre
da32d01a9d Bug 1619569 - Fix Uptake events test on beta merge r=glasserc
The test passes on nightly because the condition actually checks specifically for nightly. On non-nightly the test fails because although it mocks the channel with withFakeChannel, the code under test doesn't respect that.

Differential Revision: https://phabricator.services.mozilla.com/D65303

--HG--
extra : moz-landing-system : lando
2020-03-04 18:41:39 +00:00
Mathieu Leplatre
5a2acf4e4f Bug 1617133 - Upgrade kinto-offline-client to v13.0.0 r=glasserc
Differential Revision: https://phabricator.services.mozilla.com/D64561

--HG--
extra : moz-landing-system : lando
2020-03-02 14:13:57 +00:00
Mathieu Leplatre
38a37caab2 Bug 1616052 - Add low-level helpers to debug and test Remote Settings r=tarek,glasserc
Differential Revision: https://phabricator.services.mozilla.com/D63207

--HG--
extra : moz-landing-system : lando
2020-02-25 15:29:48 +00:00