This patch doesn't change behavior; it's just expanding an abbreviated typename.
Without this patch, my local static-analysis build fails with the following
error for mozStorageStatementJSHelper.h (which has a class that implements
nsIXPCScriptable and is outside of SpiderMonkey):
"error: The fully qualified types are preferred over the shorthand typedefs for
JS::Handle/JS::Rooted types outside SpiderMonkey."
The error message points to the NS_DECL_NSIXPCSCRIPTABLE macro, and
specifically to a usage of this typename inside of that macro. This patch's
type-expansion seems to appease this static analysis rule.
Before this patch, the type here was `JS::MutableHandleIdVector` which is a
typedef for `MutableHandle<StackGCVector<JS::PropertyKey>>` as defined here:
https://searchfox.org/mozilla-central/rev/fe5c9c39a879b07d5b629257f63d825c3c8cd0ed/js/public/TypeDecls.h#98
After this patch, the type here is `JS::MutableHandleVector<JS::PropertyKey>`
(which I took from the static analysis error message's suggestion). That
expands to the same full-qualified type, since `MutableHandleVector<T>` is an
alias for `MutableHandle<StackGCVector<T>>` as defined here:
https://searchfox.org/mozilla-central/rev/fe5c9c39a879b07d5b629257f63d825c3c8cd0ed/js/public/TypeDecls.h#128
Differential Revision: https://phabricator.services.mozilla.com/D160690
The only remaining user of this function uses it as an awkward way to get the
debug name of a timer callback function. We should just provide it with a
straightforward way to do that instead.
Differential Revision: https://phabricator.services.mozilla.com/D159335
They haven't been scriptable in years, so there's no need for them to go
through XPIDL or for the methods to be virtual.
Differential Revision: https://phabricator.services.mozilla.com/D158081
They haven't been scriptable in years, so there's no need for them to go
through XPIDL or for the methods to be virtual.
Differential Revision: https://phabricator.services.mozilla.com/D158081
They can never be implemented by JS.
I'll enforce this later once some XPConnect interfaces have been removed.
[noscript] also doesn't do anything, so I removed it from nsIUDPSocketSyncListener while
I was there.
Differential Revision: https://phabricator.services.mozilla.com/D158135
This only ports documentation for options which used to be documented on MDN.
Since then new sandbox options have been added, I will try to add documentation for them in a second changeset
Differential Revision: https://phabricator.services.mozilla.com/D154260
Added 4 new functions, into Cu, for the following reasons:
* Cu.isModuleLoaded and Cu.loadedModule is kept for backward compatibility
* Cu.isModuleLoaded and Cu.loadedModule uses shim (bug 1769029 and
bug 1768922), and loaded ESM (.sys.mjs) is visible as JSM (`.jsm`) there
Differential Revision: https://phabricator.services.mozilla.com/D146167
Added 4 new functions, into Cu, for the following reasons:
* Cu.isModuleLoaded and Cu.loadedModule is kept for backward compatibility
* Cu.isModuleLoaded and Cu.loadedModule uses shim (bug 1769029 and
bug 1768922), and loaded ESM (.sys.mjs) is visible as JSM (`.jsm`) there
Differential Revision: https://phabricator.services.mozilla.com/D146167
Added 4 new functions, into Cu, for the following reasons:
* Cu.isModuleLoaded and Cu.loadedModule is kept for backward compatibility
* Cu.isModuleLoaded and Cu.loadedModule uses shim (bug 1769029 and
bug 1768922), and loaded ESM (.sys.mjs) is visible as JSM (`.jsm`) there
Differential Revision: https://phabricator.services.mozilla.com/D146167
There's a lot of history in this area that mostly explains why this
has not been supported in the past, leading to several awkward
workarounds in tests. But it doesn't appear that there's any reason
to prevent tests from creating actual command lines, so that's what we
allow here.
I've elected to flesh out `Cu.createCommandLine` rather than expose
`.init(..._)` directly since `Cu.createCommandLine` is already used in
the relevant tests and is only used in tests. And I've made the
arguments required, rather than optional, so that consumers think
about the arguments, in particular `state`.
Differential Revision: https://phabricator.services.mozilla.com/D132089
There's a lot of history in this area that mostly explains why this
has not been supported in the past, leading to several awkward
workarounds in tests. But it doesn't appear that there's any reason
to prevent tests from creating actual command lines, so that's what we
allow here.
I've elected to flesh out `Cu.createCommandLine` rather than expose
`.init(..._)` directly since `Cu.createCommandLine` is already used in
the relevant tests and is only used in tests. And I've made the
arguments required, rather than optional, so that consumers think
about the arguments, in particular `state`.
Differential Revision: https://phabricator.services.mozilla.com/D132089
Allow-list all Python code in tree for use with the black linter, and re-format all code in-tree accordingly.
To produce this patch I did all of the following:
1. Make changes to tools/lint/black.yml to remove include: stanza and update list of source extensions.
2. Run ./mach lint --linter black --fix
3. Make some ad-hoc manual updates to python/mozbuild/mozbuild/test/configure/test_configure.py -- it has some hard-coded line numbers that the reformat breaks.
4. Make some ad-hoc manual updates to `testing/marionette/client/setup.py`, `testing/marionette/harness/setup.py`, and `testing/firefox-ui/harness/setup.py`, which have hard-coded regexes that break after the reformat.
5. Add a set of exclusions to black.yml. These will be deleted in a follow-up bug (1672023).
# ignore-this-changeset
Differential Revision: https://phabricator.services.mozilla.com/D94045
Allow-list all Python code in tree for use with the black linter, and re-format all code in-tree accordingly.
To produce this patch I did all of the following:
1. Make changes to tools/lint/black.yml to remove include: stanza and update list of source extensions.
2. Run ./mach lint --linter black --fix
3. Make some ad-hoc manual updates to python/mozbuild/mozbuild/test/configure/test_configure.py -- it has some hard-coded line numbers that the reformat breaks.
4. Make some ad-hoc manual updates to `testing/marionette/client/setup.py`, `testing/marionette/harness/setup.py`, and `testing/firefox-ui/harness/setup.py`, which have hard-coded regexes that break after the reformat.
5. Add a set of exclusions to black.yml. These will be deleted in a follow-up bug (1672023).
# ignore-this-changeset
Differential Revision: https://phabricator.services.mozilla.com/D94045
Allow-list all Python code in tree for use with the black linter, and re-format all code in-tree accordingly.
To produce this patch I did all of the following:
1. Make changes to tools/lint/black.yml to remove include: stanza and update list of source extensions.
2. Run ./mach lint --linter black --fix
3. Make some ad-hoc manual updates to python/mozbuild/mozbuild/test/configure/test_configure.py -- it has some hard-coded line numbers that the reformat breaks.
4. Add a set of exclusions to black.yml. These will be deleted in a follow-up bug (1672023).
# ignore-this-changeset
Differential Revision: https://phabricator.services.mozilla.com/D94045
This builds on the existing static components infrastructure to allow defining
a Services.jsm-type services cache with no runtime memory overhead for any
services until they're accessed.
Any class entry with a 'js_name' attribute automatically becomes available on
the services cache with that name, and any interfaces listed in its
'interfaces' list are automatically queried on it.
Differential Revision: https://phabricator.services.mozilla.com/D81417
This builds on the existing static components infrastructure to allow defining
a Services.jsm-type services cache with no runtime memory overhead for any
services until they're accessed.
Any class entry with a 'js_name' attribute automatically becomes available on
the services cache with that name, and any interfaces listed in its
'interfaces' list are automatically queried on it.
Differential Revision: https://phabricator.services.mozilla.com/D81417
With the following changes Object.prototype.toString is not using the JSClass' name
anymore. This means we now fail to detect opaque wrappers, because they just get the default string: [object Object]
Differential Revision: https://phabricator.services.mozilla.com/D74016
These are no longer used after the removal of XBL. The underlying
SpiderMonkey APIs will be removed as well to fascilitate modernizing of
bytecode caching.
Differential Revision: https://phabricator.services.mozilla.com/D54007
--HG--
extra : moz-landing-system : lando