The remaining uses of XPIDL's definition of nsrefcnt in Rust are all
now related to the return type of nsISupport's AddRef and Release
methods. The C++ name of the return types is MozExternalRefCountType,
not nsrefcnt (which is something else entirely), so use a more accurate
name.
I can't use the C++ definition, because it is in C++, and I eventually
want to remove the XPIDL definition, because it isn't accurate for C++,
so in this patch I'll make a specific one for Rust, so the code is a
little easier to read.
Differential Revision: https://phabricator.services.mozilla.com/D159322
The type of the refcount argument to these functions is the C++ type
nsrefcnt, which is actually uintptr_t. This is different from the
definition of nsrefcnt in XPIDL which is currently being used. These
functions are not actually defined in XPIDL, and also uintptr_t
can't be expressed in XPIDL, so let's just change it to the type it
really is in Rust, usize. The goal of the patch is to eliminate
some uses of nsrefcnt from Rust.
Differential Revision: https://phabricator.services.mozilla.com/D159321
Rust's definition of nsrefcnt is incorrect, so I'm eliminating uses of it
where possible. Nobody actually uses these return values, so remove them.
Differential Revision: https://phabricator.services.mozilla.com/D159320
InternalRequest::OverrideContentPolicyType was literally built for this.
I just had to call it while building requests and start checking for it in all of the relevant tests.
I know, code duplication is bad, but I think it is easier to see what a test is doing without helpers and they aren't hard to update entirely by hand yet.
Differential Revision: https://phabricator.services.mozilla.com/D158658
Currently, if users enabled COEP:Credentialless by Origin-Trial,
it won't put the document into an isolated process, this patch
fixes.
Though the caveat is this only works for enabling Origin-Trial
in the response header, setting it via <meta> still won't work.
Differential Revision: https://phabricator.services.mozilla.com/D158684
In SitePermsAddonWrapper, we are keeping track of permission with a uniqueness on the permission type.
But for a given permission type and origin, multiple permissions can be set (for regular and private windows, ...).
This patch make it so we bookkeep all the permission that are passed, so we can then later properly
remove them when the addon gets uninstalled, or when individual permission are being revoked.
Differential Revision: https://phabricator.services.mozilla.com/D159420
Python's `open('w')` by default uses system default line ending which is `\r\n` in Windows. `newline=\n` helps us to keep using `\n` everywhere.
Differential Revision: https://phabricator.services.mozilla.com/D159502
This adds a new native structure to hold the cyclic module record fields. This
removes a bunch of marshalling to and from Values.
Differential Revision: https://phabricator.services.mozilla.com/D159485
Annoyingly this definition is needed in builtin/ModuleObject.h which is included
via vm/Scope.h, but frontend/Stencil.h already includes vm/Scope.h. This moves
it to vm/SharedStencil.h.
Differential Revision: https://phabricator.services.mozilla.com/D159484
This is just changing the signature of a binding declaration from i8 to
libc::char, to fix a compilation error on Linux aarch64.
Differential Revision: https://phabricator.services.mozilla.com/D158956
With the new synthetic add-on provider, we do not return an error when calling `navigator.requestMIDIAccess()` without an add-on installed because there is *always* an add-on.
Differential Revision: https://phabricator.services.mozilla.com/D159464
Rather than having the enterprise policy push engine information to the search service, this pulls it from the policies whilst initialisation is in progress. This will ensure the search service always has the correct information for policy engines even if the search settings file is modified.
Differential Revision: https://phabricator.services.mozilla.com/D156538