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
This prevents copies and avoids the hack we have to avoid this, which
right now is using nsDependent{C,}String.
Non-virtual actors can still use `nsString` if they need to on the
receiving end.
Differential Revision: https://phabricator.services.mozilla.com/D152519
Instead of creating a skeleton from the components bag on the Rust side,
directly pass the Rust components bag and translate it into the C++
components bag after crossing the FFI boundary.
Depends on D145580
Differential Revision: https://phabricator.services.mozilla.com/D145581
All callers were passing `Nothing()` for the hour-cycle override parameter, so
we might as well remove the parameter from the public API surface.
Differential Revision: https://phabricator.services.mozilla.com/D145580
This changes from using RefCell to Mutex. RefCell is suitable for
single-threaded applications, but we are seeing concurrent access here
leading to crashes when the sources are mutated at the same time that
bundles are being generated.
This appears to have a minimal effect on the criterion benchmarks. Most of the
results are within +/- 2.0% of the baseline, with a few slower (worst is 9%
slower) and a few faster (best is 7% faster).
Differential Revision: https://phabricator.services.mozilla.com/D140053
This comments out criterion to avoid vendoring it into mozilla-central.
It brings in duplicated crates and large test files. It can be re-enabled
easily by uncommenting it for local development.
Differential Revision: https://phabricator.services.mozilla.com/D139852
- Updates Gecko's Fluent class to use the new ResourceId type,
which can be either optional or required regarding a particular resource.
- Adds JS tests verifying the new behavior.
Differential Revision: https://phabricator.services.mozilla.com/D133579
- Updates Gecko's L10nRegistry class to use the new ResourceId type,
which can be either optional or required regarding a particular resource.
- Adds JS tests verifying the new behavior.
Differential Revision: https://phabricator.services.mozilla.com/D133578
This patch contains changes to moz_task to improve it's support for
async execution on multiple threads. Unlike the previous executor
implementation, this new implementation reduces the amount of unsafe
code substantially by depending on the async-task crate
(https://crates.io/crates/async-task) for the core task implementation.
This adds a few additional features:
* Both local (no Send bound) and non-local (with Send bound) execution support,
* Support for spawning on arbitrary nsIEventTargets or the background task pool,
* Returned Task objects from runnables which may be .await-ed on or detach()-ed,
* Support for spawning with the NS_DISPATCH_EVENT_MAY_BLOCK flag set,
* Automatic use of NS_DISPATCH_AT_END when required,
* Support for specifying the runnable priority for runnables.
There are also some correctness improvements, and exposed a better API
for dispatching normal runnable functions to background threads.
After these changes the TaskRunnable API should no longer be necessary.
It is re-implemented on top of the executor and kept in-place to avoid
rewriting all consumers.
Differential Revision: https://phabricator.services.mozilla.com/D130705
Otherwise, the warning is displayed:
```
WARNING: Could not lex literal_block as "json". Highlighting skipped.
```
Depends on D131092
Differential Revision: https://phabricator.services.mozilla.com/D131093
This patch will probably not compile on its own, but requires the SpiderMonkey
side as well. It aims at building a components bag interface that can be
then used in SpiderMonkey to back the ECMA 402 API.
Differential Revision: https://phabricator.services.mozilla.com/D123822