Commit Graph

6030 Commits

Author SHA1 Message Date
Dorel Luca
61e47c120c Merge mozilla-cental to autoland. CLOSED TREE 2020-06-01 19:35:58 +03:00
Dorel Luca
d6cb4941f9 Merge autoland to mozilla-central. a=merge 2020-06-01 19:20:20 +03:00
Mozilla Releng Treescript
a56e4bfdd7 Update configs. IGNORE BROKEN CHANGESETS CLOSED TREE NO BUG a=release ba=release 2020-06-01 10:15:55 +00:00
Mark Hammond
6abadd577b Bug 1639449 - Vendor new application-services to expose kinto migration and sync change notifications. r=lina
Differential Revision: https://phabricator.services.mozilla.com/D76092
2020-05-30 02:44:07 +00:00
Mark Banner
29c4237245 Bug 1635523 - Remove now unused twitter files and pull in latest config. r=daleharvey
Differential Revision: https://phabricator.services.mozilla.com/D76909
2020-05-29 20:17:57 +00:00
Lina Cambridge
6ac44b30e0 Bug 1641005 - Implement mozISyncedExtensionStorageArea.fetchPendingSyncChanges(). r=markh
This new method fetches pending synced changes from the extension
storage store, and passes them to `storage.onChanged` listeners.
This allows extensions that listen for these events to know when a
sync happened, which Kinto supported as well.

To guard against misuse, this method is implemented on a separate
`mozISyncedExtensionStorageArea` interface. To avoid multiple
inheritance (if `mozI{Synced, Configurable}ExtensionStorageArea` both
inherited from `mozIExtensionStorageArea`, which base method is called
when?), both of these internal-ish interfaces now inherit from
`nsISupports` instead.

Finally, because `fetchPendingSyncChanges` can return changes for
multiple extensions, `mozIExtensionStorageListener.onChanged` now takes
the affected extension ID as its first argument.

Differential Revision: https://phabricator.services.mozilla.com/D76976
2020-06-01 06:07:51 +00:00
Bogdan Tara
9d4bc1415b Backed out changeset d6c79e77d6b9 (bug 1641005) for test_StorageSyncService.js failures CLOSED TREE 2020-06-01 04:32:34 +03:00
Lina Cambridge
d52843b372 Bug 1641005 - Implement mozISyncedExtensionStorageArea.fetchPendingSyncChanges(). r=markh
This new method fetches pending synced changes from the extension
storage store, and passes them to `storage.onChanged` listeners.
This allows extensions that listen for these events to know when a
sync happened, which Kinto supported as well.

To guard against misuse, this method is implemented on a separate
`mozISyncedExtensionStorageArea` interface. To avoid multiple
inheritance (if `mozI{Synced, Configurable}ExtensionStorageArea` both
inherited from `mozIExtensionStorageArea`, which base method is called
when?), both of these internal-ish interfaces now inherit from
`nsISupports` instead.

Finally, because `fetchPendingSyncChanges` can return changes for
multiple extensions, `mozIExtensionStorageListener.onChanged` now takes
the affected extension ID as its first argument.

Differential Revision: https://phabricator.services.mozilla.com/D76976
2020-06-01 00:54:27 +00:00
ffxbld
12faf95015 No Bug, mozilla-central repo-update HSTS HPKP remote-settings tld-suffixes - a=repo-update r=RyanVM
Differential Revision: https://phabricator.services.mozilla.com/D77670
2020-06-01 14:16:14 +00:00
Mathieu Leplatre
1cfe96cf26 Bug 1640023 - Sync on .get() when no metadata r=Standard8
Differential Revision: https://phabricator.services.mozilla.com/D77233
2020-05-28 16:02:03 +00:00
Mark Hammond
35a92088a5 Bug 1640791 - Expose allowSkippedRecord to a bridged engine and enable it for extension-storage. r=lina
Differential Revision: https://phabricator.services.mozilla.com/D76785
2020-05-27 02:12:53 +00:00
Rob Wu
e7258ec672 Bug 1640291 - Account for last_modified in attachment downloader r=leplatrem
Differential Revision: https://phabricator.services.mozilla.com/D76963
2020-05-27 11:28:27 +00:00
Rob Wu
0ceb5a55a2 Bug 1640291 - Read RemoteSettings dump before cache, and minimize unnecessary reads r=leplatrem
This commit does the following:

- Feature / Optimization: Check the dump before the cache, instead of
  the reverse. The dump is expected to match the requested attachment in
  the common case, and checking it first helps with ensuring that the
  expected (packaged dump) is used when available.

- Optimization: Defer reading the cached attachment until it's needed.

- Refactor / Feature: Treat a missing `.meta.json` file as a sign that
  the attachment dump does not exist, rather than an error.
  Previously, if an attachment cannot be downloaded from the network,
  that error would be replaced with a generic `DownloadError` (from the
  missing `.meta.json` file). This is mostly relevant for telemetry.

- Refactor / Maintainability: Create helper to manage lazy access to the
  record and attachment, to ensure that the record and attachment is
  only read on demand, and at most once.

- Refactor / Readability: Move the common return value generation logic
  to the helper as `getResult`, to avoid the verbose duplication of the
  logic. Now the return value fits in one line instead of 5-6 lines.

- Fix test: Rename filename-of-dump.meta.json and fix test expectation
  to ensure that the test checks the absence of the file content,
  rather than the absence of the meta data file.

Differential Revision: https://phabricator.services.mozilla.com/D76962
2020-05-27 08:00:43 +00:00
Rob Wu
e609ad7d6f Bug 1640291 - Add test coverage for corrupted cache r=leplatrem
In practice, the cache of the attachment downloader can become corrupt
and unusable when IndexedDB breaks. The implementation correctly handled
this case, but there were no tests that verified that it did.

This patch adds test coverage for the scenario of a broken cache,
to ensure that the implementation continues to behave in a sane way.

Differential Revision: https://phabricator.services.mozilla.com/D76961
2020-05-27 07:50:12 +00:00
Rob Wu
680ed7bd7e Bug 1640292 - Move RemoteSettingsWorker.checkContentHash to main thread r=leplatrem
The crypto API does most of its work on the background thread. There is
no benefit in posting the buffer to a worker thread.

Differential Revision: https://phabricator.services.mozilla.com/D76960
2020-05-27 13:54:37 +00:00
Ryan Kelly
bc3600def8 Bug 1640765 - only build the rust fxa-client crate on Nightly. r=lina
Differential Revision: https://phabricator.services.mozilla.com/D76771
2020-05-27 05:51:39 +00:00
Bogdan Tara
15858ad28e Backed out changeset 0d3f76ede294 (bug 1640765) for rust related bustage CLOSED TREE 2020-05-27 07:06:35 +03:00
Ryan Kelly
58ccfb0fe7 Bug 1640765 - only build the rust fxa-client crate on Nightly. r=lina
Differential Revision: https://phabricator.services.mozilla.com/D76771
2020-05-27 03:22:15 +00:00
Mark Banner
ceba0e848d Bug 1635235 - Implement reading the allow override default search engine allowlist from remote settings. r=daleharvey
This implements reading the list from remote settings. We only read it at startup if necessary, or on add-on installation.

We do not check for updates - if something is removed, we'll wait until next startup before processing it.

Also adds lots of tests for canOverride as this seems a critical part to get right.

Differential Revision: https://phabricator.services.mozilla.com/D76473
2020-05-26 19:40:42 +00:00
ffxbld
b3c5906f23 No Bug, mozilla-central repo-update HSTS HPKP remote-settings tld-suffixes - a=repo-update r=RyanVM
Differential Revision: https://phabricator.services.mozilla.com/D76710
2020-05-26 14:53:18 +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
Mihai Alexandru Michis
33899422e7 Backed out 2 changesets (bug 1635235, bug 1635239) for causing Bug 1640583.
CLOSED TREE

Backed out changeset 97ecda13df18 (bug 1635239)
Backed out changeset c9f80397bbec (bug 1635235)
2020-05-25 16:43:03 +03:00
Lina Cambridge
53047a8297 Bug 1640528 - Allow extension storage to be enabled and disabled independently of add-ons. r=markh
By default, toggling the add-ons engine also toggles extension storage.
However, it's also possible to enable extension storage without add-ons
by setting an override pref. If the override pref is set, we'll treat
extension storage as an engine that can be toggled independently. If
it's not set, we'll ignore attempts to toggle the engine separately.

Differential Revision: https://phabricator.services.mozilla.com/D76635
2020-05-25 01:12:16 +00:00
Mark Banner
019b662f87 Bug 1635235 - Implement reading the allow override default search engine allowlist from remote settings. r=daleharvey
This implements reading the list from remote settings. We only read it at startup if necessary, or on add-on installation.

We do not check for updates - if something is removed, we'll wait until next startup before processing it.

Also adds lots of tests for canOverride as this seems a critical part to get right.

Differential Revision: https://phabricator.services.mozilla.com/D76473
2020-05-24 21:45:41 +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
Mathieu Leplatre
b25d0ae2e5 Bug 1639224 - Verify signature if local timestamp is in the future r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D76249
2020-05-22 00:27:06 +00:00
Mathieu Leplatre
8965849d47 Bug 1639684 - Report server_error on HTTP 5XX when polling for changes r=rdalal
Differential Revision: https://phabricator.services.mozilla.com/D76242
2020-05-21 23:59:58 +00:00
Lina Cambridge
400ff2f682 Bug 1639942 - Correctly register Extension-Storage engine alternatives. r=tcsc
Alternative engines are registered using the lowercased version of
the keys in the modules object. But `extension-storage` is hyphenated,
so we need to use `Extension-Storage` (not `ExtensionStorage`) as the
key name, to match the name of the engine and its collection.

Without the hyphen, we'll register the alternative as
`extensionstorage`, so it'll never be used because everything else
expects the engine to be called `extension-storage`.

Differential Revision: https://phabricator.services.mozilla.com/D76355
2020-05-21 18:55:37 +00:00
Sid Stamm
56c4be9954 Bug 1002724 - use resolvable URL in fxaccounts browser chrome tests. r=rfkelly
Differential Revision: https://phabricator.services.mozilla.com/D75086
2020-05-21 17:33:32 +00:00
ffxbld
663946fddd No Bug, mozilla-central repo-update HSTS HPKP remote-settings - a=repo-update r=RyanVM
Differential Revision: https://phabricator.services.mozilla.com/D76324
2020-05-21 14:05:50 +00:00
Lina Cambridge
efbc79edbd Bug 1639727 - Fix trackRemainingChanges in the tabs and prefs Sync engines. r=markh
This commit fixes two issues: moves `trackRemainingChanges` to the
engine, since that's where it defined (not on the store), and skips
setting `modified` if all records have been successfully uploaded.

Differential Revision: https://phabricator.services.mozilla.com/D76270
2020-05-21 07:13:12 +00:00
Vlad Filippov
de6e0f725b Bug 1632557 - Add pref and logic for direct use of session tokens to provision OAuth tokens r=rfkelly
Differential Revision: https://phabricator.services.mozilla.com/D75204
2020-05-20 22:06:35 +00:00
Lina Cambridge
faf2fd15e4 Bug 1639018 - Change TaskRunnable::dispatch to take owned runnables. r=froydnj
This matches how the `Dispatch(already_AddRefed<nsIRunnable>)`
overloads work in C++: `Dispatch` takes ownership of the runnable, and
leaks it if dispatch fails—because the thread manager is shutting down,
for instance. This avoids a race where a runnable can be released on
either the owning or target thread.

Rust doesn't allow arbitrary `Self` types yet (see
rust-lang/rust#44874), so we need to change `dispatch` and
`dispatch_with_options` to be associated methods.

Differential Revision: https://phabricator.services.mozilla.com/D75858
2020-05-20 20:54:49 +00:00
Florian Quèze
3449d19a7e Bug 1637637 - disable fast shutdown for the test_prefs_store.js and test_prefs_tracker.js tests where it crashes, r=gbrown.
Depends on D72407

Differential Revision: https://phabricator.services.mozilla.com/D76167
2020-05-20 16:35:51 +00:00
Vlad Filippov
cf78a3d737 Bug 1635937 - Enable 'identity.sync.useOAuthForSyncToken' pref for Nightly users r=rfkelly
Differential Revision: https://phabricator.services.mozilla.com/D75130
2020-05-19 21:32:50 +00:00
Vlad Filippov
a3a78de9e9 Bug 1637827 - Handle expired OAuth tokens while provisioning Sync tokens r=rfkelly
Differential Revision: https://phabricator.services.mozilla.com/D75630
2020-05-18 22:46:51 +00:00
Vlad Filippov
5bc4cabe33 Bug 1633641 - Provide a method to fetch an OAuth token and its key in a single operation. r=rfkelly
Differential Revision: https://phabricator.services.mozilla.com/D74534
2020-05-18 01:13:46 +00:00
Noemi Erli
c1cca03e21 Backed out 6 changesets (bug 1002724) for failing in browser_fall_back_to_https.js CLOSED TREE
Backed out changeset e487b4cd9223 (bug 1002724)
Backed out changeset 37473a8ba1fd (bug 1002724)
Backed out changeset e868f1e0af0e (bug 1002724)
Backed out changeset 1c57f8717b15 (bug 1002724)
Backed out changeset 782808a05ff8 (bug 1002724)
Backed out changeset c60c48d170e1 (bug 1002724)
2020-05-18 19:22:19 +03:00
Sid Stamm
b45bfd711c Bug 1002724 - use resolvable URL in fxaccounts browser chrome tests. r=rfkelly
Differential Revision: https://phabricator.services.mozilla.com/D75086
2020-05-18 15:08:45 +00:00
Csoregi Natalia
179b0c82b2 Backed out 6 changesets (bug 1002724) for bustage on nsDocShell.cpp. CLOSED TREE
Backed out changeset 56ba616e2644 (bug 1002724)
Backed out changeset d481cf074d3b (bug 1002724)
Backed out changeset da26540ecee5 (bug 1002724)
Backed out changeset 01cbf611158a (bug 1002724)
Backed out changeset b60ba645f1f4 (bug 1002724)
Backed out changeset 4ebad0d2ca0a (bug 1002724)
2020-05-18 16:06:55 +03:00
Sid Stamm
7697eda5ae Bug 1002724 - use resolvable URL in fxaccounts browser chrome tests. r=rfkelly
Differential Revision: https://phabricator.services.mozilla.com/D75086
2020-05-15 18:42:15 +00:00
Edouard Oger
30060195fb Bug 1631630 p2 - Implement FxAccounts rust-bridge. r=lina,rfkelly
Differential Revision: https://phabricator.services.mozilla.com/D71852
2020-05-16 01:07:31 +00:00
Noemi Erli
cac2780d42 Backed out 2 changesets (bug 1631630) for causing mass braoser chrome failures CLOSED TREE
Backed out changeset 9b8606a93c75 (bug 1631630)
Backed out changeset d57ea5d1921f (bug 1631630)
2020-05-16 02:16:33 +03:00
Edouard Oger
9b739cf68d Bug 1631630 p2 - Implement FxAccounts rust-bridge. r=lina,rfkelly
Differential Revision: https://phabricator.services.mozilla.com/D71852
2020-05-15 20:13:36 +00:00
Mark Hammond
1b47bf54f2 Bug 1635352 (part 2) - Add TPS test for new extension-storage engine. r=lina
Differential Revision: https://phabricator.services.mozilla.com/D74610
2020-05-15 01:30:21 +00:00
Mark Hammond
5de4cd6458 Bug 1635352 (part 1) - Add a new bridged extension-storage engine. r=lina
Differential Revision: https://phabricator.services.mozilla.com/D74609
2020-05-15 01:30:14 +00:00
Mark Hammond
6e4d1af4af Bug 1623245 - A new browser.storage.sync local storage implementation, pref'd off. r=rpl
Differential Revision: https://phabricator.services.mozilla.com/D67273
2020-05-15 01:29:56 +00:00
ffxbld
9f539b6b93 No Bug, mozilla-central repo-update HSTS HPKP remote-settings - a=repo-update r=RyanVM
Differential Revision: https://phabricator.services.mozilla.com/D75307
2020-05-14 14:04:23 +00:00
Lina Cambridge
390e79aba0 Bug 1637809 - Replace try_fold with map in Golden Gate. r=eoger
Differential Revision: https://phabricator.services.mozilla.com/D75226
2020-05-14 00:00:18 +00:00
Edouard Oger
6e8ef040d3 Bug 1637537 - Bump application-services and anyhow versions. r=vladikoff
Differential Revision: https://phabricator.services.mozilla.com/D75150
2020-05-13 18:36:56 +00:00