`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
Nightly-only for now because the proposal only just reached stage 3.
Promise.allSettled is similar to Promise.all, except that each element also has
an own reject handler. Apart from that most code from Promise.all can be reused
for Promise.allSettled, including calling the `CommonPerformPromiseAllRace`
helper function.
Because each element has an own reject handler and we need to track if either
function of the resolve/reject handler pair was already called, it's not
possible to reuse the same trick as in `PromiseAllResolveElementFunction` where
the data-holder slot is used to track if the handler was already called. Instead
`PromiseAllSettledElementFunction` uses the values array to check if the
current index position is still set to `undefined` as a mean to verify that the
resolving functions for each element weren't already called.
Differential Revision: https://phabricator.services.mozilla.com/D25209
--HG--
extra : moz-landing-system : lando
And a shared helper function for Promise.all, Promise.race, and soon
Promise.allSettled to avoid code repetition.
Differential Revision: https://phabricator.services.mozilla.com/D25208
--HG--
extra : moz-landing-system : lando
std::tolower can be safely replaced with js::unicode::ToLowerCase in both contexts.
Differential Revision: https://phabricator.services.mozilla.com/D26510
--HG--
extra : moz-landing-system : lando
Provide js::IsAsciiPrintable as a safe alternative to std::isprint, which doesn't
lead to UB for inputs not representable as `unsigned char` and which also doesn't
depend on the current locale.
Differential Revision: https://phabricator.services.mozilla.com/D26509
--HG--
extra : moz-landing-system : lando
mozilla::IsAsciiDigit is equivalent to std::isdigit, except it's not necessary
to worry about UB when calling it with an input which can't be represented as
`unsigned char`.
Differential Revision: https://phabricator.services.mozilla.com/D26508
--HG--
extra : moz-landing-system : lando
js::AsciiDigitToNumber is an optimised version of mozilla::AsciiAlphanumericToNumber
for known ASCII digit-only cases, which avoids the extra comparisons for ASCII
alphabetical characters. This ensures replacing JS_UNDEC with js::AsciiDigitToNumber
still emits the same assembly.
Differential Revision: https://phabricator.services.mozilla.com/D26507
--HG--
extra : moz-landing-system : lando
JS7_ISOCT and JS7_UNOCT were only used in TokenStream, so the new functions were
directly moved into that file instead of adding them to util/Text.h.
Differential Revision: https://phabricator.services.mozilla.com/D26506
--HG--
extra : moz-landing-system : lando
Clang and GCC generate slightly better assembly when IsAsciiHexDigit is called,
because the `cmp` instruction for the `< 127` check in JS7_ISHEX is no longer
emitted.
Differential Revision: https://phabricator.services.mozilla.com/D26505
--HG--
extra : moz-landing-system : lando
This avoids a call to std::tolower, making hex-conversions slightly faster.
Differential Revision: https://phabricator.services.mozilla.com/D26504
--HG--
extra : moz-landing-system : lando
The scalar-type matches TypeIDOfType<T>::id, which is a constant, so it's not
necessary to recompute the type for each call to canConvertInfallibly.
Differential Revision: https://phabricator.services.mozilla.com/D26117
--HG--
extra : moz-landing-system : lando
moves where the VideoConduit related telemetry is recorded, so that non-standard stats can be removed from the stats report
Differential Revision: https://phabricator.services.mozilla.com/D22259
--HG--
extra : moz-landing-system : lando
With tasks able to access the hgmointernal config from a Taskcluster
secret, we can now add functionality to `run-task` to support checking
out from the private hg service. Here we add add a `resolve_checkout_url`
function which takes the base/head repository URLs and determines
whether we should clone from the public or private service, returning
the resolved URL. The function pulls down the secret and checks that
the region the task is executing in is in the set of supported regions.
Then we generate a random number and default to the public service if
the number is lower than our "rate". If all the above conditions are
met, we replace `hg.mozilla.org` with the resolved domain name for the
given region.
We add a call to this function to `collect_vcs_options`, and skip
resolving the private URL if we aren't performing a checkout from
within `run-task`.
Differential Revision: https://phabricator.services.mozilla.com/D25002
--HG--
extra : moz-landing-system : lando
Now that we have added the necessary scopes to `ci-configuration`,
we can add the in-tree scopes to give tasks access to the
`hgmointernal` config Taskcluster secret.
Differential Revision: https://phabricator.services.mozilla.com/D25001
--HG--
extra : moz-landing-system : lando
This task runs on wpt metadata changes and uploads an artifact
containing the summarised metadata.
Depends on D24178
Depends on D24178
Differential Revision: https://phabricator.services.mozilla.com/D24179
--HG--
extra : moz-landing-system : lando
This parses the metadata files without evaluating the conditional
expressions, producing a JSON summary file in which each possible
condition is represented as a string.
Not all data from the metadata files appears in the summary, only
exceptional cases likely to be of interest to engineers and unlikely
to be on wpt.fyi e.g. tests that have lsan leaks or tests that crash,
not just tests that fail. This is intended to keep the filesize down.
Depends on D24177
Depends on D24177
Differential Revision: https://phabricator.services.mozilla.com/D24178
--HG--
extra : moz-landing-system : lando
The manifest compilers follow a mostly common design so it seems
reasonable to put the common parts into a base class, and allow
subclasses to override the functionaility where required.
Differential Revision: https://phabricator.services.mozilla.com/D24177
--HG--
rename : testing/web-platform/tests/tools/wptrunner/wptrunner/wptmanifest/backends/static.py => testing/web-platform/tests/tools/wptrunner/wptrunner/wptmanifest/backends/base.py
extra : moz-landing-system : lando
It's possible to overflow when we do the position calculation, we should only store the position which won't cause the integer overflow when adding it to start time.
Differential Revision: https://phabricator.services.mozilla.com/D25340
--HG--
extra : moz-landing-system : lando
GeckoView is going to use ETP, so they're going to need this
workaround pref.
Differential Revision: https://phabricator.services.mozilla.com/D27093
--HG--
extra : moz-landing-system : lando
Depends on D26899
This test would timeout with the fix in the previous patch
Differential Revision: https://phabricator.services.mozilla.com/D26900
--HG--
extra : moz-landing-system : lando
Follow up to 1524982. We started using the browserloader to load almost all perf panel files.
However we kept two async methods in the js file loaded by performance/index.xul, which defeated the purpose.
Differential Revision: https://phabricator.services.mozilla.com/D26899
--HG--
extra : moz-landing-system : lando