WebAssembly.validate can take feature options, like enabling
js-string-builtins. This is useful for feature detection.
The test is extended to use it.
Differential Revision: https://phabricator.services.mozilla.com/D199391
This is difficult to test because all strings are limited to less than
2GiB of characters, and negative indices are not valid, so any difference
between unsigned and signed will trap either way.
The one case I can think of, I added a test for.
Differential Revision: https://phabricator.services.mozilla.com/D199390
We need to be able to have a type signature such as:
(func (param (ref (array i16))))
In our builtin methods to support JS-string-builtins.
This commit:
* Adds wasm::StaticTypeDefs for process-lifetime wasm::TypeDef*
* Adds wasm::BuiltinModuleFuncs for process-lifetime BuiltinModuleFunc
* Change GenerateBuiltinModules.py to accept type syntax
- For generating SymbolicAddressSignature, we just need a MIRType
- For BuiltinModuleFunc, we generate a ValType
* The signature for JS-string-builtin methods that need types are fixed
Differential Revision: https://phabricator.services.mozilla.com/D199387
The warn only check is supposed to mach the debug only assertion, but it
is actually not in line with the assertion causing a lot of warnings during
test_connection_idle_maintenance.js execution.
Differential Revision: https://phabricator.services.mozilla.com/D200770
Add an exception to AccessibilityUtils during label checks to determine if an accessible is a XUL:button on a prompt popup. We know this button is accessible, but it disappears as soon as it is clicked during tests and the a11y-checks do not have time to test the label, because the Fluent localization is not yet completed by then. Thus, we need to special case the label check for these controls.
The test affected: `browser/components/urlbar/tests/browser/browser_add_search_engine.js`
Differential Revision: https://phabricator.services.mozilla.com/D201028
These buttons are dissappearing as soon as they are clicked during tests, and their accessible dies before the Fluent localization is completed. We want to exclude these groups of nodes from the label check.
Differential Revision: https://phabricator.services.mozilla.com/D200745
This would make these exceptions more specific. After moving the `isUnlabeledUrlBarOption()` and `isUnlabeledMenuitem()` checks in the try-catch block, it won't be enough for the accessible to exist but have no name; the accessible must actually disappear after having no name. Most of the time, this will make no practical difference because clicking a URL bar option or menu item pretty much always makes it disappear. But the AccessibilityUtils would be more explicit about its exceptions.
We also explicitly including in the checks `<richlistitem>` and `<menuitem>` from the Url Bar and Search Bar autocomplete dialogs to be excluded from the label check via the `isUnlabeledMenuitem`
Differential Revision: https://phabricator.services.mozilla.com/D200744
It's not clear that there is any user-visible bug here but it is causing unnecessary work and can
cause debugging to be harder than it needs to be.
Differential Revision: https://phabricator.services.mozilla.com/D202790
This patch adds fetchpriority support for the `<img>` element, also
exposing the corresponding attribute in the WebIDL. As in D197493, we
try and minimize the change and rely on a mapping configurable under a
preference to ease future experiments. We use initial mapping
PRIORITY_LOW/PRIORITY_HIGH/PRIORITY_LOW for fetchpriority=low/high/auto
and allow further adjustments in the image code.
Internal fetchpriority mapping is covered by the following tests:
- `image-initial-load.h2.html` (typos fixed here)
- `image-dynamic-load.h2.html`
DOM tests are covered by the following tests (pref enabled to make them
pass):
- `idlharness.https.html`
- `attr-img-fetchpriority.html`
Differential Revision: https://phabricator.services.mozilla.com/D202222
* Adds a new switchToWindow helper and calls it in openFirefoxViewTab to ensure we wait until the window is active
* Fix some fallout from this change in the browser_opentabs_recency.js test
Differential Revision: https://phabricator.services.mozilla.com/D201861
We are possibly facing intermittent failures with the telemetry tests for the clear history dialog because we currently report the telemetry after waiting for the data sizes to load. This could mean that there are cases where the telemetry has not been done reporting and the test runs.
Differential Revision: https://phabricator.services.mozilla.com/D201989
Following the previous patch, `IsRefcountedSmartPointer` is no longer
needed in ThreadUtils.h. Replace the one remaining use in MozPromise.h
with a more precise version tailored to that use-site.
No functional changes.
Differential Revision: https://phabricator.services.mozilla.com/D201787
`const T&&` parameters don't have associated storage semantics defined
for them. Previously they would end up as `StoreCopyPassByRRef`, which
might even have been intentional. Forbid them, and change the one use
case invoking it to a non-reference (becoming StoreCopyPassByConstLRef).
Additionally, there are four optional storage classes that are never
automatically selected. Two of these are never used, and a third is only
used mistakenly (...ByLRef where only ...ByConstLRef is needed). Adjust
the third's use-sites, and remove all three.
The last, `StoreCopyPassByPtr`, has more of an argument to be kept: it's
simpler to use (and, arguably, to understand) than its lambda-function
equivalent when wrapping an XPCOM method that takes an [in]-pointer
argument -- but it has only one use site in the entire codebase. Replace
and remove it, as well.
No functional changes. All deleted cases remain possible via lambda
functions fed to NS_NewRunnableFunction.
Differential Revision: https://phabricator.services.mozilla.com/D202173
Using `std::conditional` unconditionally instantiates both of its
type-arguments, regardless of the value of its boolean argument. This
means that the entire tree of auxiliary metafunction-types were being
instantiated by any use of ParameterStorage -- i.e., at least once per
use of NewRunnableMethod, plus one for each explicit parameter the
method took.
Use partial specialization both to significantly simplify the selection
code (replacing most explicit tests), ensuring that only O(log n))
templates are instantiated, rather than O(n).
As verified by the unchanged TestThreadUtils.cpp, no functional changes.
Differential Revision: https://phabricator.services.mozilla.com/D201786
Remove some type-level indirections from the SmartPointer template-
metaprogramming helpers.
Additionally, replace some nearby uses of `typedef` with `using`, as
suggested by clang-tidy.
No functional changes.
Differential Revision: https://phabricator.services.mozilla.com/D201785
Remove some type-level indirections from template-metaprogramming
helpers.
Additionally, replace some nearby uses of `typedef` with `using`, as
suggested by clang-tidy.
No functional changes.
Differential Revision: https://phabricator.services.mozilla.com/D201784