Commit Graph

577 Commits

Author SHA1 Message Date
Dana Keeler
f8e974fdd8 bug 1534600 - make nsIContentSignatureVerifier asynchronous r=KevinJacobs,mythmon,glasserc
Differential Revision: https://phabricator.services.mozilla.com/D29763

--HG--
extra : moz-landing-system : lando
2019-05-03 21:21:58 +00:00
Myk Melez
bfe7c7e0b4 Bug 1547877 - enable configuration of new cert storage implementation r=keeler
Differential Revision: https://phabricator.services.mozilla.com/D29306

--HG--
extra : moz-landing-system : lando
2019-05-02 23:02:13 +00:00
Myk Melez
e78c3248d7 Bug 1539549 - update cert blocklist using single transaction r=keeler
Differential Revision: https://phabricator.services.mozilla.com/D28540

--HG--
extra : moz-landing-system : lando
2019-04-26 20:10:59 +00:00
Mathieu Leplatre
6083edb468 Bug 1546525 - Fix intermittent failure between blocklist clients tests and security settings r=glasserc,mgoodwin
Fix intermittent failure between blocklist clients tests and security settings

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

--HG--
extra : moz-landing-system : lando
2019-04-26 14:36:22 +00:00
Mathieu Leplatre
582063c263 Bug 1512451 - Read OneCRL blocklist from security-states/onecrl r=jcj,mgoodwin,glasserc
Read OneCRL blocklist from security-states/onecrl

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

--HG--
rename : services/common/tests/unit/test_blocklist_certificates.js => services/common/tests/unit/test_blocklist_onecrl.js
extra : moz-landing-system : lando
2019-04-24 14:52:13 +00:00
Andreea Pavel
75578f7684 Backed out changeset a19d696f96fb (bug 1512451) for failing bc at browser_all_files_referenced.js on a CLOSED TREE
--HG--
rename : services/common/tests/unit/test_blocklist_onecrl.js => services/common/tests/unit/test_blocklist_certificates.js
2019-04-24 00:59:27 +03:00
Mathieu Leplatre
6e4798bb72 Bug 1512451 - Read OneCRL blocklist from security-states/onecrl r=jcj,mgoodwin,glasserc
Read OneCRL blocklist from security-states/onecrl

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

--HG--
rename : services/common/tests/unit/test_blocklist_certificates.js => services/common/tests/unit/test_blocklist_onecrl.js
extra : moz-landing-system : lando
2019-04-23 18:40:40 +00:00
Rob Wu
4a6f84f91d Bug 1544834 - Replace deprecated generics in test code r=evilpie
- `Array.map` becomes `Array.from`
- Array copying via `Array.slice` becomes `Array.from`.
- `Array.forEach` that did not rely on closures becomes `for`-`of` loops.
- Anything else: `Array.X` becomes `Array.prototype.X`.

Complex cases:

dom/bindings/test/TestInterfaceJS.js and
dom/bindings/test/test_exception_options_from_jsimplemented.html
use `Array.indexOf` to generate an error with a specific error message.
Switched to `Array.prototype.forEach` to generate the same error.

js/src/jit-test/tests/basic/exception-column-number.js
In this test `Array.indexOf()` is used to generate an error. Since the
exact message doesn't matter, I switched to `Array.from()`.

Intentionally not changed:

editor/libeditor/tests/browserscope/lib/richtext/richtext/js/range.js
Did not modify because this is 3rd-party code and the code uses
feature detection as a fall back when Array generics are not used.

testing/talos/talos/tests/dromaeo/lib/mootools.js
Did not modify because mootools adds the `Array.slice` method to the
`Array` object.

Not changed because they check the implementation of Array generics:
js/src/jit-test/tests/basic/arrayNatives.js
js/src/jit-test/tests/basic/bug563243.js
js/src/jit-test/tests/basic/bug618853.js
js/src/jit-test/tests/basic/bug830967.js
js/src/jit-test/tests/jaeger/recompile/bug656753.js
js/src/jit-test/tests/self-hosting/alternate-static-and-instance-array-extras.js
js/src/tests/non262/Array/generics.js
js/src/tests/non262/Array/regress-415540.js
js/src/tests/non262/extensions/regress-355497.js
js/src/tests/non262/extensions/typedarray-set-neutering.js

Depends on D27802

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

--HG--
extra : moz-landing-system : lando
2019-04-17 19:03:19 +00:00
Rob Wu
1af4c55c01 Bug 1544834 - Replace non-test uses of deprecated Array generics r=evilpie,dao
- `Array.forEach` becomes for-of loop or `array.forEach`.
- `Array.slice(a)` or `Array.slice(a, 0)` becomes `Array.from(a)`.
- `Array.map` becomes `Array.from`
- `Array` copy + concatenation becomes Array literal + spread syntax.
- All other `Array.X(a, ...)` become `Array.prototype.X.call` or `Array.from(a).X(...)`

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

--HG--
extra : moz-landing-system : lando
2019-04-17 19:03:17 +00:00
Barret Rennie
48cd738b02 Bug 1536170 - Replace all usage of Async.yieldingIterator with Async.yieldingForEach r=tcsc
Differential Revision: https://phabricator.services.mozilla.com/D26593

--HG--
extra : moz-landing-system : lando
2019-04-15 19:26:18 +00:00
Barret Rennie
7df18942bd Bug 1536170 - Add unit tests for Async.yieldingForEach() r=tcsc
Differential Revision: https://phabricator.services.mozilla.com/D26592

--HG--
extra : moz-landing-system : lando
2019-04-15 19:26:16 +00:00
Barret Rennie
46fd11fd0d Bug 1536170 - Replace Async.jankYielder r=tcsc,markh,eoger
`Async.jankYielder` is known to, unfortunately, cause jank by creating a lot of
immediately resolved promises that must be then GCed. For a collection of 50
items, it will create 50 promises and 49 of them will immediately resolve.

Instead of `Async.jankYielder`, we now have `Async.yieldState`, which simply
keeps track of whether or not the caller should yield to the event loop. Two
higher level looping constructs are built on top of it:

* `Async.yieldingIterator`, which has been rewritten to not create extraneous
  promises; and
* `Async.yieldingForEach`, which is a replacement for awaiting
  `Async.jankYielder` in a loop. Instead, it accepts the loop body as a
  function.

Each of these can share an instance of an `Async.yieldState`, which allows an
object with multiple loops to yield every N iterations overall, instead of
every N iterations of each loop, which keeps the behaviour of using one
`Async.jankYielders` in multiple places.

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

--HG--
extra : moz-landing-system : lando
2019-04-17 03:00:35 +00:00
Csoregi Natalia
7af4153e81 Backed out 3 changesets (bug 1536170) for xpcshell failures on test_bookmark_repair.js. CLOSED TREE
Backed out changeset e41b319d7243 (bug 1536170)
Backed out changeset 0d8c58e90773 (bug 1536170)
Backed out changeset 19c23f03b471 (bug 1536170)
2019-04-13 00:39:14 +03:00
Barret Rennie
f584c090db Bug 1536170 - Replace all usage of Async.yieldingIterator with Async.yieldingForEach r=tcsc
Differential Revision: https://phabricator.services.mozilla.com/D26593

--HG--
extra : moz-landing-system : lando
2019-04-12 19:07:26 +00:00
Barret Rennie
72551e1659 Bug 1536170 - Add unit tests for Async.yieldingForEach() r=tcsc
Differential Revision: https://phabricator.services.mozilla.com/D26592

--HG--
extra : moz-landing-system : lando
2019-04-12 19:07:08 +00:00
Barret Rennie
27e15849d2 Bug 1536170 - Replace Async.jankYielder r=tcsc,markh,eoger
`Async.jankYielder` is known to, unfortunately, cause jank by creating a lot of
immediately resolved promises that must be then GCed. For a collection of 50
items, it will create 50 promises and 49 of them will immediately resolve.

Instead of `Async.jankYielder`, we now have `Async.yieldState`, which simply
keeps track of whether or not the caller should yield to the event loop. Two
higher level looping constructs are built on top of it:

* `Async.yieldingIterator`, which has been rewritten to not create extraneous
  promises; and
* `Async.yieldingForEach`, which is a replacement for awaiting
  `Async.jankYielder` in a loop. Instead, it accepts the loop body as a
  function.

Each of these can share an instance of an `Async.yieldState`, which allows an
object with multiple loops to yield every N iterations overall, instead of
every N iterations of each loop, which keeps the behaviour of using one
`Async.jankYielders` in multiple places.

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

--HG--
extra : moz-landing-system : lando
2019-04-12 19:07:00 +00:00
Noemi Erli
aa44fadac3 Backed out 3 changesets (bug 1536170) for xpcshell failures in test_bookmark_duping.js CLOSED TREE
Backed out changeset 57c26f8e0bf7 (bug 1536170)
Backed out changeset ccea2e827d9d (bug 1536170)
Backed out changeset 51a67bffd7d2 (bug 1536170)
2019-04-11 23:05:24 +03:00
Barret Rennie
1a53df3674 Bug 1536170 - Replace all usage of Async.yieldingIterator with Async.yieldingForEach r=tcsc
Differential Revision: https://phabricator.services.mozilla.com/D26593

--HG--
extra : moz-landing-system : lando
2019-04-11 18:40:02 +00:00
Barret Rennie
82b99337ac Bug 1536170 - Add unit tests for Async.yieldingForEach() r=tcsc
Differential Revision: https://phabricator.services.mozilla.com/D26592

--HG--
extra : moz-landing-system : lando
2019-04-11 18:39:54 +00:00
Barret Rennie
e46873db47 Bug 1536170 - Replace Async.jankYielder r=tcsc,markh,eoger
`Async.jankYielder` is known to, unfortunately, cause jank by creating a lot of
immediately resolved promises that must be then GCed. For a collection of 50
items, it will create 50 promises and 49 of them will immediately resolve.

Instead of `Async.jankYielder`, we now have `Async.yieldState`, which simply
keeps track of whether or not the caller should yield to the event loop. Two
higher level looping constructs are built on top of it:

* `Async.yieldingIterator`, which has been rewritten to not create extraneous
  promises; and
* `Async.yieldingForEach`, which is a replacement for awaiting
  `Async.jankYielder` in a loop. Instead, it accepts the loop body as a
  function.

Each of these can share an instance of an `Async.yieldState`, which allows an
object with multiple loops to yield every N iterations overall, instead of
every N iterations of each loop, which keeps the behaviour of using one
`Async.jankYielders` in multiple places.

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

--HG--
extra : moz-landing-system : lando
2019-04-11 18:39:43 +00:00
Dana Keeler
a483dcca02 Bug 1539415 - make nsICertStorage (cert_storage) asynchronous for functions called from the main thread r=jcj,mgoodwin
The Set* functions of nsICertStorage (SetRevocationByIssuerAndSerial,
SetRevocationBySubjectAndPubKey, SetEnrollment, and SetWhitelist) are called on
the main thread by the implementations that manage consuming remote security
information. We don't want to block the main thread, so this patch modifies
these functions to take a callback that will be called (on the original thread)
when the operation in question has been completed on a background thread.

The Get* functions of nsICertStorage (GetRevocationState, GetEnrollmentState,
and GetWhitelistState) should only be called off the main thread. For the most
part they are, but there are at least two main-thread certificate verifications
that can cause these functions to be called on the main thread. These instances
are in nsSiteSecurityService::ProcessPKPHeader and
ContentSignatureVerifier::CreateContextInternal and will be dealt with in
bug 1406854 bug 1534600, respectively.

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

--HG--
extra : moz-landing-system : lando
2019-04-03 23:24:19 +00:00
Jan-Erik Rediger
6bc73bc6a2 Bug 1529696 - Rename DATASET_RELEASE_CHANNEL_OPTOUT/OPTIN to DATASET_ALL/PRERELEASE_CHANNELS everywhere r=chutten
Depends on D25934

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

--HG--
extra : moz-landing-system : lando
2019-04-03 17:12:11 +00:00
Mark Banner
dba6983e75 Bug 1415265 - Remove now unnecessary .eslintrc.js files or entries. r=mossop
Differential Revision: https://phabricator.services.mozilla.com/D23850

--HG--
extra : moz-landing-system : lando
2019-03-28 09:38:14 +00:00
Mathieu Leplatre
f12d23ae3d Bug 1539101 - Force extra values to be strings in Uptake Telemetry r=glasserc
Force extra values to be strings in Uptake Telemetry

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

--HG--
extra : moz-landing-system : lando
2019-03-27 14:17:49 +00:00
Ethan Glasser-Camp
cf4788faef Bug 1535962: Introduce a sample rate for reporting uptake telemetry events r=leplatrem
Differential Revision: https://phabricator.services.mozilla.com/D23814

--HG--
extra : moz-landing-system : lando
2019-03-20 14:30:39 +00:00
Mark Goodwin
50887394d6 Bug 1429796 Cleanup storage in CertBlocklist to allow easy addition of new types of pair (e.g. whitelist entries) r=keeler
Differential Revision: https://phabricator.services.mozilla.com/D17668

--HG--
extra : moz-landing-system : lando
2019-03-20 17:00:47 +00:00
Andreea Pavel
c3cd918c5c Backed out 2 changesets (bug 1429796) for failing xperf on a CLOSED TREE
Backed out changeset b0d08863f7a5 (bug 1429796)
Backed out changeset 1bd54f8dfd9e (bug 1429796)
2019-03-20 00:03:49 +02:00
Mark Goodwin
59e0c373c3 Bug 1429796 Cleanup storage in CertBlocklist to allow easy addition of new types of pair (e.g. whitelist entries) r=keeler
Differential Revision: https://phabricator.services.mozilla.com/D17668

--HG--
extra : moz-landing-system : lando
2019-03-19 17:48:04 +00:00
Edouard Oger
d391c790bc Bug 1532514 - Update sinon to v7.2.7. r=markh
Differential Revision: https://phabricator.services.mozilla.com/D22046

--HG--
extra : moz-landing-system : lando
2019-03-12 19:32:40 +00:00
Mathieu Leplatre
a041a9d9d6 Bug 1523311 - Report age of Remote Settings data in Uptake telemetry r=glasserc
Report age of Remote Settings data in Uptake telemetry

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

--HG--
extra : moz-landing-system : lando
2019-03-12 15:13:31 +00:00
Dorel Luca
eb794cd9b8 Backed out changeset 4b280518c7b1 (bug 1532514) for Browser-chrome failures in browser/components/syncedtabs/test/browser/browser_sidebar_syncedtabslist.js. CLOSED TREE 2019-03-12 03:59:56 +02:00
Edouard Oger
565385661c Bug 1532514 - Update sinon to v7.2.7. r=markh
Differential Revision: https://phabricator.services.mozilla.com/D22046

--HG--
extra : moz-landing-system : lando
2019-03-12 00:18:16 +00:00
Mathieu Leplatre
f3d65462af Bug 1523310 - Distinguish broadcast from scheduled sync in Remote Settings r=glasserc
Distinguish broadcast from scheduled sync in Remote Settings

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

--HG--
extra : moz-landing-system : lando
2019-03-07 14:44:52 +00:00
Dana Keeler
42d436a5eb bug 1531928 - remove unnecessary use of nsIBadCertListener2 in RESTRequest r=lina
RESTRequest's use of nsIBadCertListener2 does nothing at this point.

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

--HG--
extra : moz-landing-system : lando
2019-03-01 22:18:04 +00:00
Marco Bonardo
5c4e44ce0a Bug 1528751 - Add a custom eslint rule to check "consistent" if bracing. r=Standard8
Differential Revision: https://phabricator.services.mozilla.com/D20753

--HG--
extra : moz-landing-system : lando
2019-02-28 08:39:33 +00:00
Jonathan Kingston
f6680698bd Bug 1525319 - Removing context from OnDataAvailable r=valentin
Differential Revision: https://phabricator.services.mozilla.com/D20881

--HG--
extra : moz-landing-system : lando
2019-02-27 23:42:27 +00:00
Jonathan Kingston
dd4c731d8c Bug 1525319 - Changing js to remove context from onStartRequest and onStopRequest r=valentin
Differential Revision: https://phabricator.services.mozilla.com/D20771

--HG--
extra : moz-landing-system : lando
2019-02-27 23:41:54 +00:00
Mathieu Leplatre
742e5c134a Bug 1530346 - Upgrade kinto-offline-client and report IndexedDB errors properly r=glasserc
- Upgrade kinto-offline-client to v12.3.0
- Make sure IndexedDB errors are not reported as unknown errors

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

--HG--
extra : moz-landing-system : lando
2019-02-26 16:15:05 +00:00
Dorel Luca
4a4dcd57fa Backed out 4 changesets (bug 1525319) for Android failures in dom/base/test/test_progress_events_for_gzip_data.html
Backed out changeset b73f033efb41 (bug 1525319)
Backed out changeset 1d318d5c6b98 (bug 1525319)
Backed out changeset 6d73418988d4 (bug 1525319)
Backed out changeset 84ca79bd2dc3 (bug 1525319)
2019-02-25 04:06:11 +02:00
Jonathan Kingston
63ab2bd8aa Bug 1525319 - Removing context from OnDataAvailable r=valentin
Differential Revision: https://phabricator.services.mozilla.com/D20881

--HG--
extra : moz-landing-system : lando
2019-02-24 20:27:55 +00:00
Jonathan Kingston
147e351e0b Bug 1525319 - Changing js to remove context from onStartRequest and onStopRequest r=valentin
Differential Revision: https://phabricator.services.mozilla.com/D20771

--HG--
extra : moz-landing-system : lando
2019-02-25 00:07:42 +00:00
Mathieu Leplatre
7007063816 Bug 1528704 - Add option to disable sync on RemoteSettings().get() r=glasserc
Add option to disable sync on RemoteSettings().get()

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

--HG--
extra : moz-landing-system : lando
2019-02-20 15:15:00 +00:00
Mathieu Leplatre
c8bbaf4887 Bug 1517469 - Enable Events Telemetry for Uptake monitory r=janerik
Enable Events Telemetry for Uptake monitoring

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

--HG--
extra : moz-landing-system : lando
2019-02-15 09:38:18 +00:00
Jonathan Kingston
3421b8fcff Bug 1520868 - Replacing AsyncOpen2 with AsyncOpen always r=valentin
Replacing js and text occurences of asyncOpen2
Replacing open2 with open

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

--HG--
rename : layout/style/test/test_asyncopen2.html => layout/style/test/test_asyncopen.html
extra : moz-landing-system : lando
2019-02-12 16:08:25 +00:00
J.C. Jones
21080eeacd Bug 1404934 - Wire-up Intermediate Preloading r=keeler
This patch:

* Classifies RemoteSecuritySettings as production.
* Add detailed logging controlled by the browser.policies.loglevel pref.
* Generally make RemoteSecuritySettings match other services better.
* Move to hex-encoded hashes to match Kinto.
* Adds RemoteSecuritySettings to blocklist-clients. This may not be the
  permanent home.
* Adds a preference for how many certs to download at once.
* Adds an Observer interface.

    (This makes the tests more predictable, but it also avoids having a
    duplicate call when the full "sync" is called.)

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

--HG--
extra : moz-landing-system : lando
2019-02-08 00:08:54 +00:00
Mathieu Leplatre
0f39fbecd3 Bug 1525253 - Document how to unit test Remote Settings r=glasserc
Document how to unit test Remote Settings

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

--HG--
extra : moz-landing-system : lando
2019-02-07 20:25:47 +00:00
Myk Melez
25349d2601 Bug 1518283 - prohibit blank lines at the beginning and end of blocks (eslint padded-blocks) r=mossop,Standard8
Differential Revision: https://phabricator.services.mozilla.com/D17526

--HG--
extra : moz-landing-system : lando
2019-01-30 17:26:25 +00:00
Kris Maglione
e930b89c34 Bug 1514594: Part 3 - Change ChromeUtils.import API.
***
Bug 1514594: Part 3a - Change ChromeUtils.import to return an exports object; not pollute global. r=mccr8

This changes the behavior of ChromeUtils.import() to return an exports object,
rather than a module global, in all cases except when `null` is passed as a
second argument, and changes the default behavior not to pollute the global
scope with the module's exports. Thus, the following code written for the old
model:

  ChromeUtils.import("resource://gre/modules/Services.jsm");

is approximately the same as the following, in the new model:

  var {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm");

Since the two behaviors are mutually incompatible, this patch will land with a
scripted rewrite to update all existing callers to use the new model rather
than the old.
***
Bug 1514594: Part 3b - Mass rewrite all JS code to use the new ChromeUtils.import API. rs=Gijs

This was done using the followng script:

https://bitbucket.org/kmaglione/m-c-rewrites/src/tip/processors/cu-import-exports.jsm
***
Bug 1514594: Part 3c - Update ESLint plugin for ChromeUtils.import API changes. r=Standard8

Differential Revision: https://phabricator.services.mozilla.com/D16747
***
Bug 1514594: Part 3d - Remove/fix hundreds of duplicate imports from sync tests. r=Gijs

Differential Revision: https://phabricator.services.mozilla.com/D16748
***
Bug 1514594: Part 3e - Remove no-op ChromeUtils.import() calls. r=Gijs

Differential Revision: https://phabricator.services.mozilla.com/D16749
***
Bug 1514594: Part 3f.1 - Cleanup various test corner cases after mass rewrite. r=Gijs
***
Bug 1514594: Part 3f.2 - Cleanup various non-test corner cases after mass rewrite. r=Gijs

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

--HG--
extra : rebase_source : 359574ee3064c90f33bf36c2ebe3159a24cc8895
extra : histedit_source : b93c8f42808b1599f9122d7842d2c0b3e656a594%2C64a3a4e3359dc889e2ab2b49461bab9e27fc10a7
2019-01-17 10:18:31 -08:00
Edouard Oger
f35506cf5d Bug 1518300 - Refactor CryptoUtils and add JWK/JWE methods to jwcrypto. r=rfkelly,tjr
Differential Revision: https://phabricator.services.mozilla.com/D15868

--HG--
extra : moz-landing-system : lando
2019-01-18 20:58:42 +00:00
Mathieu Leplatre
51cdff0ef9 Bug 1471524 - Add start/end notifications on RemoteSettings.pollChanges() r=glasserc
Add start/end notifications on RemoteSettings.pollChanges()

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

--HG--
extra : moz-landing-system : lando
2019-01-16 14:19:27 +00:00