This patch factors the DOM related sizes in nsWindowSizes to its own
struct, such that callers can easily acess DOM memory sizes.
Differential Revision: https://phabricator.services.mozilla.com/D111317
The checkRequestAllowed() function that determines whether we can bypass the
permission prompt and fulfill immediately with a device, is given a list of devices
sorted by fitness distance from most ideal to least. — It used to grant any
device on that list that was already active, even if less than ideal (not
first in the list).
This caused problems with sites using ideal constraints to switch between
devices because this function has to fail before Firefox prompts for a new
device, and the new grace periods added in bug 1697284 extended "active" to
include any device active within the last 60 minutes, making it impossible
to pick anything else using ideal constraints alone.
The fix is to only look at the first device in the list (per kind). If that
device is not active, we should prompt for that device, not return a
different one, which means failing this function.
Differential Revision: https://phabricator.services.mozilla.com/D115523
The reported error happens because `.parentNode` can be a document,
which doesn't implement the Element interface. Using `.parentElement`
solves this issue.
And while I'm fixing this: move the logic behind the menu ID check, so
that the logic is not unnecessarily run for non-pageAction contextmenus.
Differential Revision: https://phabricator.services.mozilla.com/D116138
LogError signature is now separately defined for the case when
QM_ERROR_STACKS_ENABLED is defined and when it's not defined).
HandleError has been changed as well to have explicit handling depending on
QM_ERROR_STACKS_ENABLED.
TestQMResult.cpp has been fixed to compile with undefined
QM_ERROR_STACKS_ENABLED in non-unified builds.
Differential Revision: https://phabricator.services.mozilla.com/D116070
We allow changing the number of helper threads used by GC by setting a GC
parameter, and this can spawn new threads. This operation is actually fallible
at the moment and will never succeed when we use an external thread pool.
This patch changes the code to get the actual number of helper threads after
attempting a change.
Differential Revision: https://phabricator.services.mozilla.com/D116125
This adds isInitialized_ which is set to true when initialization succeeds.
The call to ensureContextList in js::CreateHelperThreadsState was unnecessary
because it happens later on in ensureInitialized. The initialization of
runningTaskCount should only happen in ensureInitialized, otherwise it could
happen if more threads are added later.
Differential Revision: https://phabricator.services.mozilla.com/D116124
This commit splits out the TypeDef family.
* FuncType
* StructType
* ArrayType
* TypeDef
* TypeContext
* TypeCache
* TypeHandle
This one is trickier as these definitions must be serializable
and shareable. The WasmSerialize header is improved to support
this, and a WasmShareable header is added for sharing.
Additionally, TypeContext relies on FeatureArgs. Instead of
adding FeatureArgs to WasmTypeDef, I think it makes more
sense to create a new header for just the 'CompileArgs'
family. CompileArgs from WasmCompile is moved to this file,
as well as CompilerEnvironment from WasmValidate. The
implementations of *Args::build() for these definitions
remain in WasmCompile.cpp for now, as they rely on the
tiering heuristics and platform examination defined in that
file.
Differential Revision: https://phabricator.services.mozilla.com/D115229
This commit moves the SymbolicAddress family.
* SymbolicAddress
* SymbolicAddressSignature
* FailureMode
And one method.
Differential Revision: https://phabricator.services.mozilla.com/D115228
This commit splits out the Val family of definitions.
* V128
* WasmValueBox
* AnyRef
* FuncRef
* LitVal
* Val
And associated methods.
Differential Revision: https://phabricator.services.mozilla.com/D115227
This commit splits out the family of 'ValType' definitions.
* PackedTypeCode
* PackedType
* ValType
* FieldType
* RefTypes
And some inline methods.
A header for type declarations was added to be shared.
Differential Revision: https://phabricator.services.mozilla.com/D115226
This is a bit peculiar. When we show the bookmarks toolbar, we create its children. When it then
gets hidden, they do not get removed. When we then re-enable the bookmarks toolbar, we call
`rebuild` on the next tick (because of the `await` in `init` in PlacesToolbarHelper), which
synchronously removes all the children of the toolbar, and then rebuilds the places node. It
does that async because it avoids doing synchronous layout flushes.
This breaks in the test - and the closer you put the "show the bookmarks toolbar" code to
the code that tries to open the context menu, the more reliably it breaks, because we try
to show the context menu right after we synchronously remove everything, and before we've
(asynchronously) put content back.
To avoid the raciness here, we wait for the custom event in the places toolbar to indicate
we're done building it.
Differential Revision: https://phabricator.services.mozilla.com/D116118
Accidentally missing a `return` in a code path could mean that
`handle_package(...)` would accidentally do an action _and_
raise the "Unknown action" error.
This change resolves that, and it simplifies the code a bit.
Differential Revision: https://phabricator.services.mozilla.com/D115923
`MACH_VIRTUALENV` was never used, and `MOZBUILD_VIRTUALENV` was never
set (the virtualenv was always activated during the build, rather
than before).
Differential Revision: https://phabricator.services.mozilla.com/D115921
This was originally set up so that tests wouldn't "create a new
`virtualenv` for no reason." However, virtual environments now will have
different packages installed, and therefore the separation is necessary.
So, for the virtual environment used for builds (regular or for tests):
* We want it to be able to reuse the build venv, if it already exists.
* We don't want to pollute a `pytest` virtualenv with build-specific
packages.
Differential Revision: https://phabricator.services.mozilla.com/D115641
We had split up `init` from `init_py3` because `mach` had
traditionally been invoked by either Python 2 or Python 3, and
the two couldn't share the same virtualenv.
Now that the same context isn't shared by both Python 2 and 3
3
(developers always use Python 3, and the remaining Python 2
usages are CI jobs that never reuse the objdir with Python 3),
We can centralize on a single default virtualenv.
I've called this "common" instead of "init" to clarify its
existing position as the virtualenv that's used by many different
commands. As we associate virtualenvs with requirement definitions,
it'll also make the file less confusing: it's a "common" requirement
definition as opposed to an "init" one.
Differential Revision: https://phabricator.services.mozilla.com/D115635
Now, when running mach commands that invoke `pip`, it will no longer
inform the user that it needs an update.
We reach into `distutils` to determine the "site-packages" directory
pattern, then apply it to our virtualenv.
Differential Revision: https://phabricator.services.mozilla.com/D115940
At least in PyCharm, expanding a `VirtualenvManager` instance means
resolving all the properties and fields of the instance.
However, if that property is doing non-trivial work, the debugger
wouldn't run that subprocess while we're stopped at a breakpoint.
So, the instance would sit there with the "Collecting data..." text.
Differential Revision: https://phabricator.services.mozilla.com/D115935
We now set the descriptor's getter or setter when the corresponding argument
to DefineAccessorProperty is non-nullptr.
Usually the flag was passed only if the corresponding object argument was non-nullptr,
so there's no change in behavior for those.
The exception is `Console::PopulateConsoleNotificationInTheTargetScope` where we passed
JSPROP_SETTER with a nullptr setter. Changing this is likely okay; it shouldn't make a
difference for new properties anyway.
Note that code can still use the richer PropertyDescriptor API to set nullptr
getters/setters explicitly.
Differential Revision: https://phabricator.services.mozilla.com/D116091
This roll-up includes the following fixes:
- Bug 1711082 - Add an intervention for m.aliexpress.com
- Bug 1712807 - Add an override for www.dealnews.com
- Bug 1712833 - Add an intervention for buskocchi.desuca.co.jp
- Bug 1712843 - Add an intervention for snaptik.app
- Bug 1712626 - Change CSS intervention for livescience.com
- Bug 1710993 - Remove Intervention for dev.to
- Bug 1710997 - Remove Intervention for slack.com
- Bug 1711003 - Remove Intervention for store.hp.com
Differential Revision: https://phabricator.services.mozilla.com/D116123
We were raising an exception as a result of a python error
which was masked by a catch statement that thought we didn't
know how to remove the file. But we did.
Fix the python error, and add an exception at the end of the
function to be raised and then caught when we really don't know
how to remove a file.
Differential Revision: https://phabricator.services.mozilla.com/D115936