There is no need to cast to `TimeUnit` to `int64` and then cast to `TimeUnit` again.
Differential Revision: https://phabricator.services.mozilla.com/D26758
--HG--
extra : moz-landing-system : lando
Now the caller of `AdjustForStartTime()` should check the return value to know whether the adjustment is succeeded.
If the error happens the caller should handle it and return an error.
Differential Revision: https://phabricator.services.mozilla.com/D26756
--HG--
extra : moz-landing-system : lando
Several of these JS char-copying functions allocate memory, and currently
they implicitly do it in the MallocArena. They now take an explicit argument
about which arena they perform their allocation in.
Differential Revision: https://phabricator.services.mozilla.com/D25708
--HG--
extra : moz-landing-system : lando
After calling Lookup API per table, Safe Browsing outputs too many debug
message for a single URL lookup. Refine the current output.
Differential Revision: https://phabricator.services.mozilla.com/D27066
--HG--
extra : moz-landing-system : lando
`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