This avoids an AssertionError when loading a stylesheet in a nested
event loop. See comment 15 in the bug.
Differential Revision: https://phabricator.services.mozilla.com/D26971
--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
nsBrowserStatusFilter is updated to not filter out STATE_IS_REDIRECTED_DOCUMENT.
The test here is adding a way to have a "login form" do a post to a server script, which then does a 303 redirect. This mimics what some services, including LinkedIn do during this stage.
Differential Revision: https://phabricator.services.mozilla.com/D26969
--HG--
extra : moz-landing-system : lando
This is a follow-up for Part 1. I find all the candidates by running the
following command under layout/, and manually replace them.
ag -A 1 reflow$ | ag -B 1 state
Differential Revision: https://phabricator.services.mozilla.com/D27162
--HG--
extra : moz-landing-system : lando
nsHTMLReflowState was renamed to ReflowInput in bug 1277129, so remove
the "Html" in the variable name.
Also, remove the comment "ReflowBlock will initialize it." because
ReflowInput::Init() is called in the constructor. We are not using
ReflowInput::CALLER_WILL_INIT flag here.
Differential Revision: https://phabricator.services.mozilla.com/D27024
--HG--
extra : moz-landing-system : lando
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