Граф коммитов

484 Коммитов

Автор SHA1 Сообщение Дата
Butkovits Atila 6ded0f39e9 Backed out 2 changesets (bug 1685180) for causing Xpcshell failures at test_l10nCache.js. CLOSED TREE
Backed out changeset c05d7c567c19 (bug 1685180)
Backed out changeset be4603eff17c (bug 1685180)
2022-11-21 19:51:30 +02:00
Greg Tatum be1aa4d51d Bug 1685180 - Debug assert Fluent strings where replaced variables are not provided; r=nordzilla
Differential Revision: https://phabricator.services.mozilla.com/D161996
2022-11-21 16:14:06 +00:00
Sylvestre Ledru 97f4c646c8 Bug 1801196 - remove unused crates r=xpcom-reviewers,nika,gregtatum
Differential Revision: https://phabricator.services.mozilla.com/D162334
2022-11-18 16:31:05 +00:00
Greg Tatum 24751e2521 Bug 1755216 - Vendor in fluent-fallback@0.7.0; r=nordzilla
Depends on D161733

Differential Revision: https://phabricator.services.mozilla.com/D161734
2022-11-17 16:00:17 +00:00
Csoregi Natalia 9550c6467f Bug 1800902 - Fix trailing whitespace. r=fix CLOSED TREE 2022-11-17 15:28:47 +02:00
Francesco Lodolo (:flod) 3c01cd430a Bug 1800902 - Remove comm-central from cross-channel generation, r=eemeli DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D162201
2022-11-17 12:11:40 +00:00
Greg Tatum 0f321c2172 Bug 1773733 - Remove some commented out code in l10n-registry; r=nordzilla
Depends on D159715

Differential Revision: https://phabricator.services.mozilla.com/D159716
2022-10-19 21:17:33 +00:00
Greg Tatum 4299b58786 Bug 1773733 - Add a README.md for l10nregistry-rs; r=nordzilla
Depends on D159714

Differential Revision: https://phabricator.services.mozilla.com/D159715
2022-10-19 21:17:32 +00:00
Greg Tatum caa67f36e3 Bug 1773733 - Add a fuzzing test for the l10nregistry; r=nordzilla
Depends on D159446

Differential Revision: https://phabricator.services.mozilla.com/D159714
2022-10-19 21:17:32 +00:00
Greg Tatum f0ed9daad0 Bug 1773733 - Remove locking and add a MetaSources struct; r=nordzilla
I believe the crashes are due to the metasources list being mutated
while the async iterators are running. This changes should fix this
issue if it is in fact the root cause. The scope of this patch is a bit
larger since it changes the implementation to use a proper MetaSources
struct.

This struct centralizes access and mutation to the MetaSources,
providing an ergonomic API that should be fairly idiomatic and similar
to other Rust APIs.

The Mutex is not needed as this code is not multi-threaded. The RefCell
should provide proper access controls for handling the mutation of the
MetaSources.

The MetaSources struct also favors a Vec<Vec<Rc<T>>> rather than
Vec<Vec<T>> so that it can be copied very cheaply for the async
iterators.

Differential Revision: https://phabricator.services.mozilla.com/D159446
2022-10-19 21:17:32 +00:00
Greg Tatum e055b8e94a Bug 1773733 - Add a bit more documentation to various pieces of the L10nRegistry; r=nordzilla
Differential Revision: https://phabricator.services.mozilla.com/D159445
2022-10-19 21:17:31 +00:00
Greg Tatum 1a8e733b51 Bug 1773733 - Rename L10nRegistry methods to be consistent and idiomatic; r=nordzilla
Differential Revision: https://phabricator.services.mozilla.com/D159444
2022-10-19 21:17:31 +00:00
Greg Tatum 79cc2c219c Bug 1773733 - Re-work and document the L10nRegistry bundle algorithm; r=nordzilla
This is probably the riskiest patch in the group, as it's touching the
core async iterator algorithm. The previous implementation relied on
pure match branches for handling things, but it made it awkward to share
some of the logic with a macro. I kept on running into issues with
refactoring tools not being able to work on the macro.

The changes here makes the code a bit more imperative, but I added
documentation of the current state that thing are in, so that it's
clearer where we were in the process of the algorithm.

This is a pure refactor and should not have any behavior changes.

Differential Revision: https://phabricator.services.mozilla.com/D159443
2022-10-19 21:17:30 +00:00
Greg Tatum 6c32be54a6 Bug 1773733 - Remove the bundle_adapter from the L10nRegistryLocked; r=nordzilla
This is a bit of chore work, as the upcoming MetaSources struct will not
need access to this member, and it's simpler without it.

Differential Revision: https://phabricator.services.mozilla.com/D159442
2022-10-19 21:17:30 +00:00
Greg Tatum 8dc7797215 Bug 1773733 - Fill in reasons for unreachable panics; r=nordzilla
Differential Revision: https://phabricator.services.mozilla.com/D159441
2022-10-19 21:17:29 +00:00
Greg Tatum 6b697478cc Bug 1773733 - Rename generate_sources_for_file to get_sources_for_resource; r=nordzilla
Differential Revision: https://phabricator.services.mozilla.com/D159440
2022-10-19 21:17:29 +00:00
Greg Tatum 22a6e7c007 Bug 1773733 - Mark test-only methods as cfg(test); r=nordzilla
Differential Revision: https://phabricator.services.mozilla.com/D159439
2022-10-19 21:17:29 +00:00
Greg Tatum 75cddf17e6 Bug 1773733 - Rename get_source to file_source_by_name; r=nordzilla
Depends on D159437

Differential Revision: https://phabricator.services.mozilla.com/D159438
2022-10-19 21:17:28 +00:00
Greg Tatum f5418b7733 Bug 1773733 - Rename set_adapt_bundle to set_bundle_adapter; r=nordzilla
Differential Revision: https://phabricator.services.mozilla.com/D159437
2022-10-19 21:17:28 +00:00
Mark Banner 2ffde1e92f Bug 1792341 - Migrate more toolkit/modules consumers to use direct ES module import. r=Gijs,webdriver-reviewers,perftest-reviewers,necko-reviewers,geckoview-reviewers,preferences-reviewers,application-update-reviewers,pip-reviewers,credential-management-reviewers,sgalich,owlish,bytesized,AlexandruIonescu,whimboo,mconley,mixedpuppy
Mainly automated changes. Some manual ESLint fixes and whitespace cleanup.

Differential Revision: https://phabricator.services.mozilla.com/D158452
2022-10-18 11:21:26 +00:00
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