We don't need the full generality of templated typed arrays here, just
the ability to assign from `Uint8Array`. Some versions of clang in
C++17 mode have problems with overload resolution when faced with
templated method parameters that resolve to base classes of the passed
arguments. Using the more-specific type here avoids those bugs.
Differential Revision: https://phabricator.services.mozilla.com/D53069
--HG--
extra : moz-landing-system : lando
1. Add nsAHttpTransactionShell layer to nsHttpTransaction
2. Replace nsHttpTransaction with nsAHttpTransactionShell in nsHttpChannel and nsHttpHandler
Differential Revision: https://phabricator.services.mozilla.com/D52363
--HG--
extra : moz-landing-system : lando
We always fall through if !IsInNativeAnonymousContent(), as
GetAnonRootIfInAnonymousContentContainer will return null.
Differential Revision: https://phabricator.services.mozilla.com/D53031
--HG--
extra : moz-landing-system : lando
As with AggregateError, `Promise.any` is only enabled in Nightly.
Now that everything is in place, the actual `Promise.any` implementation is
relatively straight forward. The only tricky part is probably just the
`ThrowAggregateError` function, when the async stack is created to give a
better stack trace.
Differential Revision: https://phabricator.services.mozilla.com/D51659
--HG--
rename : js/src/jit-test/tests/promise/promise-race-with-non-default-resolving.js => js/src/jit-test/tests/promise/promise-any-with-non-default-resolving.js
extra : moz-landing-system : lando
Adds a separate struct to hold the elements arrays and to apply wrapping and
unwrapping at the correct points. This will let us avoid copying this code
another time for the `Promise.any` proposal.
Differential Revision: https://phabricator.services.mozilla.com/D51658
--HG--
extra : moz-landing-system : lando
The first five steps in each Promise combinator element function are always the
same. Add a helper function for this task to reduce more code duplication.
Differential Revision: https://phabricator.services.mozilla.com/D51656
--HG--
extra : moz-landing-system : lando
Moves the `NewNativeFunction` and the two `setExtendedSlot` calls into a helper
function to reduce code duplication.
Differential Revision: https://phabricator.services.mozilla.com/D51655
--HG--
extra : moz-landing-system : lando
The draft proposal calls `Promise.all`, `Promise.allSettled`, `Promise.any`, and
`Promise.race` "Promise combinators". Let's reuse that name to avoid having to
spell each function name in shared functions. For example instead of
`CommonStaticAllRace`, or soon `CommonStaticAllRaceAny`, we get
`CommonPromiseCombinator`.
- `PromiseAllDataHolder` is currently used for `Promise.all` and
`Promise.allSettled`, and soon also for `Promise.any`. Rename it to
`PromiseCombinatorDataHolder` to express that different Promise combinators use
this object.
Differential Revision: https://phabricator.services.mozilla.com/D51654
--HG--
extra : moz-landing-system : lando
Adds AggregateError, but only enables it for Nightly builds, because the draft
proposal is still incomplete, so it doesn't make sense to let this feature ride
the trains at this moment.
- The `other_error_properties` array was changed to individual static variables,
because AggregateError has more than three properties, which prevents it to be
stored in `JSPropertySpec[][3]`.
- `AggregateErrorObject` can't use the normal `ErrorObject` class, because it
needs an additional slot for the [[AggregateErrors]].
- For similar reasons it can't use the shared `Error` constructor function,
because the `AggregateError` constructor has an additional `errors` iterable
argument which it needs to process.
Differential Revision: https://phabricator.services.mozilla.com/D51653
--HG--
extra : moz-landing-system : lando
The ErrorObject classes are already declared in ErrorObject.h, so it seems
useful to also move their definitions into the corresponding cpp file.
Also adds `js::CaptureStack` to jsexn.h so it can be called from ErrorObject.cpp
and to remove the duplicated implementation in JSContext.cpp.
Differential Revision: https://phabricator.services.mozilla.com/D51651
--HG--
extra : moz-landing-system : lando
GlobalObject.h had an unnecessary #include for ErrorObject.h, which led to
recompiling more or less all of SpiderMonkey when modifying ErrorObject.h,
because GlobalObject.h is (transitively) included in most files.
Differential Revision: https://phabricator.services.mozilla.com/D51649
--HG--
extra : moz-landing-system : lando
We don't have any NAC which is a <xul:label>. We could keep it for shadow dom but it
doesn't seem to me like this code is working correctly.
nsXULLabelFrame::RegUnregAccessKey doesn't have similar code, and uses the
<label> node to register / unregister.
Finally, we do have non-anon labels, and those would be broken... So just
remove the special-case.
Depends on D53058
Differential Revision: https://phabricator.services.mozilla.com/D53059
--HG--
extra : moz-landing-system : lando
This is technically a behavior change, but the current thing is more correct
anyways, IMO, and it's only a warning in any case.
Differential Revision: https://phabricator.services.mozilla.com/D53058
--HG--
extra : moz-landing-system : lando
This doesn't need to handle NAC anymore since <svg:use> element doesn't use NAC
anymore.
Handle Shadow DOM by using GetParentOrShadowHostNode(), though we should figure
out what the right thing to do since GetOwnerSVGElement and co. use
GetFlattenedTreeParent().
In practice, these should be equivalent because SVG Elements can't be shadow
hosts.
Differential Revision: https://phabricator.services.mozilla.com/D53063
--HG--
extra : moz-landing-system : lando
It looked a bit weird after the XBL removal. Can be simpler and not use
GetBindingParent.
Differential Revision: https://phabricator.services.mozilla.com/D53062
--HG--
extra : moz-landing-system : lando
Now that XBL is gone, the only anonymous subtrees are NAC.
I'd prefer to defer the removal of IsInAnonymousSubtree if possible, as there's
a bunch of patches coming on top of this one :)
Differential Revision: https://phabricator.services.mozilla.com/D53033
--HG--
extra : moz-landing-system : lando
A bit more efficient when saving a JSOp in a data structure. It's also
compatible with jsbytecode.
Differential Revision: https://phabricator.services.mozilla.com/D52627
--HG--
extra : moz-landing-system : lando