Commit Graph

464 Commits

Author SHA1 Message Date
Andrew McCreight
566e2d6cec Bug 1792920, part 1 - Remove the unused return values for various Rust AddRef and Release methods. r=necko-reviewers,platform-i18n-reviewers,gregtatum,valentin
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
2022-10-17 16:09:20 +00:00
Nika Layzell
3d9a6d0374 Bug 1789902 - Part 2: Use XPCOM static components instead of Services in Rust, r=xpcom-reviewers,necko-reviewers,barret,valentin
Differential Revision: https://phabricator.services.mozilla.com/D156891
2022-09-13 13:47:13 +00:00
justchen1369
4743055749 Bug 1789765 - Fix broken links to 'Fluent for Firefox Developers' page. r=firefox-source-docs-reviewers,marco DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D156761
2022-09-08 19:03:25 +00:00
Mike Hommey
0e59ca6e3c Bug 1789524 - Use drop(Box::from_raw). r=platform-i18n-reviewers,dminor
As of rustc 1.64, Box::from_raw is #[must_use].

Differential Revision: https://phabricator.services.mozilla.com/D156617
2022-09-07 20:48:02 +00:00
Olli Pettay
93acdfad59 Bug 1777574, automate CC zone handling, r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D155084
2022-09-07 11:22:51 +00:00
Bobby Holley
f7234adda2 Bug 1787306 - Upgrade serial_test to 0.6 to leverage Embark's audit. r=supply-chain-reviewers,nika
This unfortunately pulls in rustversion but it was easy enough to audit.

Differential Revision: https://phabricator.services.mozilla.com/D155641
2022-08-26 04:06:55 +00:00
criss
055a8632de Backed out 6 changesets (bug 1787306) for causing Toolchains bustages. CLOSED TREE
Backed out changeset bcee96aa7df1 (bug 1787306)
Backed out changeset b5be37b86b21 (bug 1787306)
Backed out changeset 7e518de15dbb (bug 1787306)
Backed out changeset 07d938340e27 (bug 1787306)
Backed out changeset 9b8971442df5 (bug 1787306)
Backed out changeset 4d719c2b2711 (bug 1787306)
2022-08-26 02:25:46 +03:00
Bobby Holley
34fe6c3121 Bug 1787306 - Upgrade serial_test to 0.6 to leverage Embark's audit. r=supply-chain-reviewers,nika
This unfortunately pulls in rustversion but it was easy enough to audit.

Differential Revision: https://phabricator.services.mozilla.com/D155641
2022-08-25 23:05:41 +00:00
Nika Layzell
4011409c5d Bug 1783282 - Use a custom attribute instead of derive for implementing xpcom interfaces in rust, r=xpcom-reviewers,necko-reviewers,dragana,barret
Differential Revision: https://phabricator.services.mozilla.com/D153801
2022-08-18 13:57:35 +00:00
Eemeli Aro
d831257098 Bug 1771917 - Add FormatMessagesSync C++ Localization gtests. r=nordzilla,emilio
Differential Revision: https://phabricator.services.mozilla.com/D154379
2022-08-16 17:46:53 +00:00
Andi-Bogdan Postelnicu
5981839b9a Bug 1617369 - Reformat recent rust changes with rustfmt r=emilio
Updated with rustfmt 1.5.1-stable (4b91a6e 2022-08-08)
# ignore-this-changeset

Depends on D154661

Differential Revision: https://phabricator.services.mozilla.com/D154662
2022-08-16 07:08:28 +00:00
Mark Banner
7428be4a86 Bug 1782008 - Remove now unnecessary .eslintrc.js files. r=webcompat-reviewers,extension-reviewers,media-playback-reviewers,pip-reviewers,denschub,rpl,alwu,mossop
Differential Revision: https://phabricator.services.mozilla.com/D152736
2022-08-03 11:16:20 +00:00
Emilio Cobos Álvarez
42b7f1a58c Bug 1780788 - Use abstract strings as in-arguments for ipdl. r=nika,necko-reviewers,media-playback-reviewers,alwu,dragana
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
2022-07-25 20:19:48 +00:00
Tooru Fujisawa
bf93d07148 Bug 1667455 - Part 5: Stop importing Services.jsm from chrome-priv JS code, top-level single-line cases. r=kmag,webdriver-reviewers,perftest-reviewers,webcompat-reviewers,geckoview-reviewers,extension-reviewers,application-update-reviewers,pip-reviewers,twisniewski,m_kato,jdescottes,mconley,AlexandruIonescu,mossop
Differential Revision: https://phabricator.services.mozilla.com/D150894
2022-07-11 12:41:50 +00:00
Aki Sasaki
339b9867ca Bug 1727300 - initial cross-channel doc updates. r=flod DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D150605
2022-06-29 17:11:17 +00:00
Sylvestre Ledru
b848a697dc Bug 1617369 - Reformat recent rust changes with rustfmt r=emilio,extension-reviewers,willdurand
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D148376
2022-06-10 09:21:45 +00:00
Greg Tatum
c8a4b709d5 Bug 1767537 - Update pseudolocalization docs; r=platform-i18n-reviewers,dminor
Differential Revision: https://phabricator.services.mozilla.com/D145374
2022-05-05 16:25:32 +00:00
André Bargull
8459959c8f Bug 1767961 - Part 2: Switch fluent-ffi to use TryCreateFromComponents. r=platform-i18n-reviewers,dminor
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
2022-05-05 15:00:34 +00:00
André Bargull
e6d82f6c5e Bug 1767961 - Part 1: Remove hour-cycle override from TryCreateFromSkeleton public API. r=platform-i18n-reviewers,dminor
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
2022-05-05 15:00:34 +00:00
Peter Van der Beken
e77783380e Bug 1766130 - Properly propagate errors from Promise creation. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D144515
2022-05-02 07:44:23 +00:00
Dan Minor
cbc20fad2b Bug 1728849 - Protect l10nregistry sources with mutex; r=platform-i18n-reviewers,gregtatum
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
2022-03-28 13:54:36 +00:00
Dan Minor
b12629beea Bug 1757407 - Comment out criterion in l10nregistry-rs Cargo.toml; r=platform-i18n-reviewers,gregtatum
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
2022-03-25 20:39:43 +00:00
Dan Minor
16dc400c19 Bug 1757407 - Point to in-tree version of l10nregistry-rs; r=platform-i18n-reviewers,gregtatum
Differential Revision: https://phabricator.services.mozilla.com/D139851
2022-03-25 20:39:43 +00:00
Dan Minor
80a80ab927 Bug 1757407 - Add l10nregistry-rs to mozilla-central; r=platform-i18n-reviewers,gregtatum,jfkthame,flod
This is a copy of git revision 9da98c6e5325a5f2997191727eaa82c0ebc2004c from
https://github.com/mozilla/l10nregistry-rs.

Differential Revision: https://phabricator.services.mozilla.com/D139850
2022-03-25 20:39:43 +00:00
Nick Alexander
230fa93996 Bug 1752968 - Pre: Make l10n gtests robust to changes to aboutAbout.ftl. r=eemeli
Differential Revision: https://phabricator.services.mozilla.com/D139963
2022-03-02 17:43:47 +00:00
Sylvestre Ledru
caaedeee98 Bug 1753413 - fx doc: Remove whitespaces, trailing lines & windows CR r=andi,perftest-reviewers,sparky
Differential Revision: https://phabricator.services.mozilla.com/D137741
2022-02-03 18:34:58 +00:00
Matthew Gaudet
bc10b96605 Bug 1748888 - Add ErrorResult parameter to PromiseNativeHandler callbacks r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D136423
2022-01-20 19:11:39 +00:00
Nika Layzell
e8f83d2043 Bug 1748718 - Part 3: Remove now-unnecessary xpidl constant casts, r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D135166
2022-01-07 20:35:15 +00:00
Erik Nordin
20f8e5c93a Bug 1743657 - Link to DOM L10n Tutorial in Firefox Source Docs r=kpatenio?
Differential Revision: https://phabricator.services.mozilla.com/D134998
2022-01-04 21:51:38 +00:00
Erik Nordin
d9a63c9302 Bug 1743659 - Part 2: Update Gecko's Localization to use the new l10nregistry-rs API r=zbraniecki,dminor,eemeli,smaug,emilio?,eemeli?,zbraniecki
- 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
2021-12-22 19:08:38 +00:00
Erik Nordin
5a5e1c57ed Bug 1743659 - Part 1: Update Gecko's L10nRegistry to use the new l10nregistry-rs API r=zbraniecki,dminor,eemeli,fluent-reviewers,webidl,smaug?,eemeli?,zbraniecki
- 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
2021-12-22 19:08:38 +00:00
Zibi Braniecki
7ec3a677e7 Bug 1746124 - Use nsIRunnablePriority::PRIORITY_RENDER_BLOCKING for Fluent async API calls. r=nordzilla,nika
Differential Revision: https://phabricator.services.mozilla.com/D133845
2021-12-15 20:30:34 +00:00
Eemeli Aro
51b1f5c4fd Bug 1596726 - Update documentation for legacy migration tools. r=flod
Differential Revision: https://phabricator.services.mozilla.com/D133640
2021-12-14 10:10:18 +00:00
Nika Layzell
3e323b7d7a Bug 1739727 - Part 2: Improve rust async support in moz_task, r=emilio
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
2021-12-07 20:01:41 +00:00
Zibi Braniecki
07f49c8f68 Bug 1742106 - Add basic C++ Localization gtests. r=nordzilla,eemeli,emilio
Differential Revision: https://phabricator.services.mozilla.com/D131615
2021-11-22 21:57:34 +00:00
Zibi Braniecki
8d28718532 Bug 1563128 - Handle broken l10n-args gracefully. r=nordzilla
Differential Revision: https://phabricator.services.mozilla.com/D131251
2021-11-16 18:28:26 +00:00
Sylvestre Ledru
1df999712f Bug 1714788 - doc: do not provide the language if the code isn't valid r=firefox-source-docs-reviewers,championshuttler DONTBUILD
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
2021-11-16 07:59:48 +00:00
Zibi Braniecki
1aa25b7d0b Bug 1739143 - Capture DOM L10n initial translation and mutations rejections and report to console. r=nordzilla
Differential Revision: https://phabricator.services.mozilla.com/D130797
2021-11-10 23:40:43 +00:00
Butkovits Atila
7f1436e4bc Backed out changeset 4f859ea95ec6 (bug 1739143) for causing failures at document_l10n/non-system-principal/browser_resource_uri.js. CLOSED TREE 2021-11-10 02:14:34 +02:00
Zibi Braniecki
d32521c61b Bug 1739143 - Capture DOM L10n initial translation and mutations rejections and report to console. r=nordzilla
Differential Revision: https://phabricator.services.mozilla.com/D130797
2021-11-09 23:10:26 +00:00
Francesco Lodolo (:flod)
557468ff99 Bug 1735338 - Fix obsolete references (people, repos) in l10n docs, r=eemeli
Differential Revision: https://phabricator.services.mozilla.com/D128209
2021-10-22 09:58:04 +00:00
Dan Minor
f62d42b1d9 Bug 1642415 - Add metasource to L10nFileSourceDescriptor; r=platform-i18n-reviewers,gregtatum
Differential Revision: https://phabricator.services.mozilla.com/D125242
2021-09-22 18:16:08 +00:00
Dan Minor
451b4ef52f Bug 1642415 - Add unit tests for metasources; r=platform-i18n-reviewers,gregtatum
Differential Revision: https://phabricator.services.mozilla.com/D125241
2021-09-22 18:16:08 +00:00
Dan Minor
2228681a5b Bug 1642415 - Update existing tests to pass metasource into createMock; r=platform-i18n-reviewers,gregtatum
Differential Revision: https://phabricator.services.mozilla.com/D125240
2021-09-22 18:16:07 +00:00
Dan Minor
7e6caf3eeb Bug 1642415 - Use metasource in FileSource; r=platform-i18n-reviewers,extension-reviewers,gregtatum,zombie
Differential Revision: https://phabricator.services.mozilla.com/D125239
2021-09-22 18:16:07 +00:00
Dan Minor
c5d2261220 Bug 1642415 - Remove unused L10nFileSource::Create method; r=platform-i18n-reviewers,gregtatum
Differential Revision: https://phabricator.services.mozilla.com/D125238
2021-09-22 18:16:06 +00:00
Dan Minor
6e6201d36c Bug 1642415 - Use metasource in l10nregistry-ffi; r=platform-i18n-reviewers,gregtatum
Differential Revision: https://phabricator.services.mozilla.com/D125237
2021-09-22 18:16:06 +00:00
Dan Minor
89a5ba9d69 Bug 1642415 - Update to l10nregistry to 0.3.0; r=platform-i18n-reviewers,gregtatum
Differential Revision: https://phabricator.services.mozilla.com/D125235
2021-09-22 18:16:05 +00:00
Greg Tatum
129339b6b8 Bug 1719696 - Create a components bag abstraction for mozilla::intl::DateTimeFormat; r=anba,platform-i18n-reviewers,dminor
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
2021-09-13 20:52:59 +00:00
Dan Minor
d8d32990af Bug 1719462 - Use ICUError in NumberFormat; r=platform-i18n-reviewers,gregtatum
Differential Revision: https://phabricator.services.mozilla.com/D121410
2021-08-30 19:50:19 +00:00