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

5669 Коммитов

Автор SHA1 Сообщение Дата
Daniel Holbert 16170f25a6 Bug 1797840: Replace stray tab characters with spaces in IDL files throughout the tree. r=mccr8,necko-reviewers,credential-management-reviewers,smaug,sgalich,valentin
DONTBUILD because this is just whitespace cleanup.

I found the files to fix up here using this command:
    grep -r '   ' * 2>/dev/null | grep -v "other-licenses" | grep "idl:"

I replaced the tab characters with however many spaces seemed consistent with
the indentation in the surrounding code (and did some minor space-indentation
cleanup in contextual lines to preserve alignment, in a few cases).

Differential Revision: https://phabricator.services.mozilla.com/D160577
2022-10-28 18:08:17 +00:00
Henri Sivonen 1737aa6569 Bug 1630920 - Remove the gb2312han and big5han collations. r=anba
Makes the ICU data 191 KB smaller.

Differential Revision: https://phabricator.services.mozilla.com/D160337
2022-10-28 08:44:04 +00:00
Henri Sivonen 0b6dc7aed6 Bug 1793749 - Build ICU with the implicithan collation root. r=anba
Makes ICU data 353 KB smaller.

Differential Revision: https://phabricator.services.mozilla.com/D160345
2022-10-28 08:43:58 +00:00
André Bargull b9446c85e2 Bug 1797248: Update time zone data to tzdata2022e. r=platform-i18n-reviewers,dminor
Differential Revision: https://phabricator.services.mozilla.com/D160173
2022-10-27 11:32:17 +00:00
Stanca Serban 09251682b1 Backed out changeset 5bb3611c95d7 (bug 1797248) for causing time zones failures. CLOSED TREE 2022-10-27 13:00:39 +03:00
André Bargull 2b52b24839 Bug 1797248: Update time zone data to tzdata2022e. r=platform-i18n-reviewers,dminor
Differential Revision: https://phabricator.services.mozilla.com/D160173
2022-10-27 09:11:48 +00:00
Mark Banner 9613c19f16 Bug 1795880 - Add an ESLint rule to enforce using static imports where possible. r=arai,geckoview-reviewers,m_kato
Differential Revision: https://phabricator.services.mozilla.com/D160131
2022-10-26 09:37:46 +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
Sean Burke be3eb81a13 Bug 1790071 - work around ICU-22132. r=platform-i18n-reviewers,dminor
Differential Revision: https://phabricator.services.mozilla.com/D157023
2022-10-06 18:50:51 +00:00
Andrew McCreight 2da84b8ac4 Bug 1792574, part 3 - Don't include nsMemory where it isn't needed. r=xpcom-reviewers,necko-reviewers,valentin,nika
There are only 3 places where nsMemory.h is still needed (image/RasterImage.cpp,
gfx/thebes/gfxFT2FontList.cpp, and nsMemory.cpp). Remove the rest.

Differential Revision: https://phabricator.services.mozilla.com/D158213
2022-09-28 15:17:46 +00:00
Andrew McCreight e626a91a81 Bug 1792354, part 2 - Remove nsErrorService and nsIErrorService. r=xpcom-reviewers,necko-reviewers,nika,valentin
Nika pointed out that there are only two places that register
something, and only one place that uses it, so this entire module
can be turned into a couple of lines of a switch statement.

Differential Revision: https://phabricator.services.mozilla.com/D158132
2022-09-27 21:27:17 +00:00
Mark Banner a9ba6e830d Bug 1792398 - Enable ESLint rule 'strict' on mjs files as the directive is not necessary for modules. r=arai,pip-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D158115
2022-09-26 21:47:50 +00:00
Marian-Vasile Laza 130adc5d9a Backed out changeset 0679274d6ed5 (bug 1792398) for causing bc failures on browser_sendQuery.js. CLOSED TREE 2022-09-26 22:53:00 +03:00
Mark Banner 3e99025d45 Bug 1792398 - Enable ESLint rule 'strict' on mjs files as the directive is not necessary for modules. r=arai,pip-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D158115
2022-09-26 18:51:57 +00:00
Narcis Beleuzu 6c2d0d8cea Backed out changeset 849faf753208 (bug 1792398) for bc failures on browser_sendQuery.js . CLOSED TREE 2022-09-26 20:44:40 +03:00
Mark Banner 05dcda5a7f Bug 1792398 - Enable ESLint rule 'strict' on mjs files as the directive is not necessary for modules. r=arai,pip-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D158115
2022-09-26 16:51:10 +00:00
Nika Layzell 0316dc51b9 Bug 1790614 - Part 2: Use {ASSERT,ENSURE}_NS_{SUCCEEEDED,FAILED} in gtests, r=ahal,necko-reviewers
These macros will produce better outputs when they fail than these existing
patterns using `ENSURE_TRUE(NS_SUCCEEDED(...))` or similar, so this is a bulk
rewrite of existing tests to use them.

It should also help with discoverability when people base their tests off of
other existing tests.

Differential Revision: https://phabricator.services.mozilla.com/D157214
2022-09-15 14:51:50 +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
Mike Kaply 0ce6d5df0f Bug 1297520 - For Snap, only install language for system locale. r=nalexander,OlivierTilloy
Differential Revision: https://phabricator.services.mozilla.com/D151052
2022-09-12 18:41:56 +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
André Bargull eff8ea5f7f Bug 1752253: Change era skeleton to "GGG" to produce the expected era field length. r=platform-i18n-reviewers,gregtatum
This is actually exploiting an ICU bug, but ensures we return the same results
as other browsers. When the ICU bug has been fixed, we can revert this back to
"G".

Differential Revision: https://phabricator.services.mozilla.com/D156413
2022-09-08 06:05:55 +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
Masatoshi Kimura e7b3d513d4 Bug 1787633 - Make nsTextToSubURI::UnEscapeNonAsciiURI static. r=m_kato
Differential Revision: https://phabricator.services.mozilla.com/D156007
2022-09-06 15:59:06 +00:00
Eemeli Aro 9e7ffeb5e0 Bug 1446164 - Migrate formautofill edit dialogs to Fluent. r=sgalich,fluent-reviewers,flod
Migrating the strings used by the edit dialogs also allows/requires for their migration elsewhere.

Some streamlining is applied to how autofillEditForms.js gets access to e.g. FormFillUtils methods, so that they are no longer routed via the XHTML files' script tags. The prior independence of this file from internal dependencies appears to have been in place to support its use as a part of the Payments API's UI, but that was dropped in bug 1721229.

The Fluent migration script included in this patch also covers changes from the immediately preceding patch.

The intl documentation change is a typo correction that was noticed while working on this patch.

Differential Revision: https://phabricator.services.mozilla.com/D155705
2022-09-01 20:35:37 +00:00
Norisz Fay e1a0b90205 Backed out 2 changesets (bug 1786708, bug 1446164) for causing multiple failures CLOSED TREE
Backed out changeset 469e2500f00e (bug 1446164)
Backed out changeset 0d298c6f7475 (bug 1786708)
2022-09-01 15:34:56 +03:00
Eemeli Aro 5475c4b139 Bug 1446164 - Migrate formautofill edit dialogs to Fluent. r=sgalich,fluent-reviewers,flod
Migrating the strings used by the edit dialogs also allows/requires for their migration elsewhere.

Some streamlining is applied to how autofillEditForms.js gets access to e.g. FormFillUtils methods, so that they are no longer routed via the XHTML files' script tags. The prior independence of this file from internal dependencies appears to have been in place to support its use as a part of the Payments API's UI, but that was dropped in bug 1721229.

The Fluent migration script included in this patch also covers changes from the immediately preceding patch.

The intl documentation change is a typo correction that was noticed while working on this patch.

Depends on D155478

Differential Revision: https://phabricator.services.mozilla.com/D155705
2022-09-01 08:26:47 +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
samronning f832ff9ad3 Bug 1786402 - Fix ESLint rule warnings for no-unused-vars in intl/uconv/tests/unit/test_bug340714.js r=hsivonen
Differential Revision: https://phabricator.services.mozilla.com/D155290
2022-08-25 08:28:17 +00:00
Ed Lee 96460bcff8 Bug 1784901 - Show Language Mismatch Screen with negotiated language on left secondary section and switch button r=pdahiya
As part of installing the lang pack, add the negotiated language as string args and convert to raw if it wants to use the lang pack.

Differential Revision: https://phabricator.services.mozilla.com/D155021
2022-08-19 22:07:10 +00:00
André Bargull 52aed99c43 Bug 1786025: Update time zone data to tzdata2022b. r=platform-i18n-reviewers,dminor
Differential Revision: https://phabricator.services.mozilla.com/D155068
2022-08-19 17:14:03 +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 53b35796e0 Bug 1784699 - Add more ESLint worker annotations to test files. r=arai
Differential Revision: https://phabricator.services.mozilla.com/D154601
2022-08-15 16:50:31 +00:00
André Bargull 8c3a6dad95 Bug 1784375: Call LocaleParser::TryParse() with a new, empty Locale. r=platform-i18n-reviewers,dminor
For this to work, we need to add a move-constructor to `Locale`, so that it's
possible to write `loc = {}`. (We need move instead of copy semantics, because
`Locale` has UniquePtr members.) All other `Locale` members except for
`LanguageTagSubtag` already support move semantics. Add copy-constructors to
`LanguageTagSubtag`, so defaulted move-constructor/assignment works for `Locale`.
`LanguageTagSubtag` gets copy- instead of move-constructors, because there isn't
a good reason to disallow copying when moving is allowed.

Also add extra assertions and comments to document the requirement that `TryParse`
expects a new, empty `Locale`.

Differential Revision: https://phabricator.services.mozilla.com/D154496
2022-08-15 15:37:20 +00:00
Nika Layzell aef919f890 Bug 1170668 - Improve short read handling in nsConverterInputStream, r=hsivonen
This patch changes how nsConverterInputStream handles passing data
through to the underlying unicode converter in order to make it more
reliably handle propagating errors and deal with short reads from the
underlying input stream.

This was done by making the code continuously read within the Fill
method until at least one character has been decoded from the input
stream, so that we don't spuriously communicate an EOF to the caller due
to a short read not producing enough bytes for the decoder to produce a
UTF-16 character.

In addition, while making this change it became easier to signal to
the decoder about the final read from the input stream, meaning that
partial characters at the end of the stream will now generate a
replacement character, rather than being ignored.

Differential Revision: https://phabricator.services.mozilla.com/D152682
2022-08-11 17:37:20 +00:00
Norisz Fay 948922a968 Backed out changeset 2c6bb36b0667 (bug 1170668) for causing build bustages on TestShortRead.cpp CLOSED TREE 2022-08-11 00:01:03 +03:00
Nika Layzell 1972b3b710 Bug 1170668 - Improve short read handling in nsConverterInputStream, r=hsivonen
This patch changes how nsConverterInputStream handles passing data
through to the underlying unicode converter in order to make it more
reliably handle propagating errors and deal with short reads from the
underlying input stream.

This was done by making the code continuously read within the Fill
method until at least one character has been decoded from the input
stream, so that we don't spuriously communicate an EOF to the caller due
to a short read not producing enough bytes for the decoder to produce a
UTF-16 character.

In addition, while making this change it became easier to signal to
the decoder about the final read from the input stream, meaning that
partial characters at the end of the stream will now generate a
replacement character, rather than being ignored.

Differential Revision: https://phabricator.services.mozilla.com/D152682
2022-08-10 19:44:41 +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
Nika Layzell c15823d075 Bug 1772006 - Part 5: Simplify and move the string searching APIs from ns[T]StringObsolete, r=xpcom-reviewers,necko-reviewers,eeejay,dragana,barret
The biggest set of APIs from ns[T]StringObsolete which are still heavily used
are the string searching APIs. It appears the intention was for these to be
replaced by the `FindInReadable` APIs, however that doesn't appear to have
happened.

In addition, the APIs have some quirks around their handling of mixed character
widths. These APIs generally supported both narrow strings and the native
string type, probably because char16_t string literals weren't available until
c++11. Finally they also used easy-to-confuse unlabeled boolean and integer
optional arguments to control behaviour.

These patches do the following major changes to the searching APIs:

1. The ASCII case-insensitive search method was split out as
   LowerCaseFindASCII, rather than using a boolean. This should be less
   error-prone and more explicit, and allows the method to continue to use
   narrow string literals for all string types (as only ASCII is supported).
2. The other [R]Find methods were restricted to only support arguments with
   matching character types. I considered adding a FindASCII method which would
   use narrow string literals for both wide and narrow strings but it would've
   been the same amount of work as changing all of the literals to unicode
   literals.
   This ends up being the bulk of the changes in the patch.
3. All find methods were re-implemented using std::basic_string_view's find
   algorithm or stl algorithms to reduce code complexity, and avoid the need to
   carry around the logic from nsStringObsolete.cpp.
4. The implementations were moved to nsTStringRepr.cpp.
5. An overload of Find was added to try to catch callers which previously
   called `Find(..., false)` or `Find(..., true)` to set case-sensitivity, due
   to booleans normally implicitly coercing to `index_type`. This should
   probably be removed at some point, but may be useful during the transition.

Differential Revision: https://phabricator.services.mozilla.com/D148300
2022-07-30 00:12:48 +00:00
Nika Layzell 997047e2a4 Bug 1772006 - Part 4: Simplify and move the string comparison APIs from ns[T]StringObsolete, r=xpcom-reviewers,necko-reviewers,dragana,barret
This patch moves EqualsIgnoreCase to ns[T]StringObsolete, and removes
the aCount argument, instead migrating callers to use `StringBeginsWith`
with a case-insensitive comparator.

In addition, nsTStringRepr::Compare was removed and replaced with either
calls to methods like `StringBeginsWith` or the global `Compare` method.

These changes required some modifications at call-sites but should make
the behaviour less surprising and more consistent.

Differential Revision: https://phabricator.services.mozilla.com/D148299
2022-07-30 00:12:48 +00:00
Dan Minor 043ae52e12 Bug 1779621 - Migrate intl/locale from jsm to esm; r=nordzilla
Differential Revision: https://phabricator.services.mozilla.com/D151865
2022-07-26 12:28:41 +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 54623364da Bug 1777486 - Part 2: Migrate XPCOMUtils.jsm consumers with automatic migration. r=webdriver-reviewers,geckoview-reviewers,preferences-reviewers,application-update-reviewers,pip-reviewers,kmag,owlish,whimboo
Differential Revision: https://phabricator.services.mozilla.com/D151214
2022-07-12 04:21:34 +00:00
Andreea Pavel 7738a75fdd Backed out 11 changesets (Bug 1777486) for failing bc at browser_startup.js on a CLOSED TREE
Backed out changeset b6c4c386f1a6 (Bug 1777486)
Backed out changeset 195cc2de8433 (Bug 1777486)
Backed out changeset 20c746fb1648 (Bug 1777486)
Backed out changeset d5fd8173d62d (Bug 1777486)
Backed out changeset 6d758fab5a3e (Bug 1777486)
Backed out changeset e938b601ba15 (Bug 1777486)
Backed out changeset 0c4ea0b9416b (Bug 1777486)
Backed out changeset 0559c53cc668 (Bug 1777486)
Backed out changeset eea573d3a9f9 (Bug 1777486)
Backed out changeset 9ce3a6496a49 (bug 1777486)
Backed out changeset b0867652fc48 (bug 1777486)
2022-07-11 22:24:40 +03:00
Tooru Fujisawa 8cd6ed7409 Bug 1777486 - Part 2: Migrate XPCOMUtils.jsm consumers with automatic migration. r=webdriver-reviewers,geckoview-reviewers,preferences-reviewers,application-update-reviewers,pip-reviewers,kmag,owlish,whimboo
Differential Revision: https://phabricator.services.mozilla.com/D151214
2022-07-11 15:09:13 +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
Tooru Fujisawa f3a8c52c53 Bug 1667455 - Part 4: Stop importing Services.jsm from JSM. r=kmag,webdriver-reviewers,perftest-reviewers,webcompat-reviewers,geckoview-reviewers,application-update-reviewers,pip-reviewers,twisniewski,devtools-reviewers,m_kato,jdescottes,ochameau,mconley,sfoster,AlexandruIonescu
Differential Revision: https://phabricator.services.mozilla.com/D150893
2022-07-11 12:41:50 +00:00
Narcis Beleuzu 2838b177f3 Backed out changeset 94420b6eff4c (bug 1297520) for xpcshell failures on test_snap.js 2022-07-06 19:16:34 +03:00
Nika Layzell 7ced96212e Bug 1778211 - Reject xpidl CDATA containing 'virtual', r=xpcom-reviewers,necko-reviewers,mccr8,dragana
We'll probably want to do something more accurate in the future with a
custom clang static analysis pass which validates that XPIDL interfaces
have the expected vtable and struct layout, however doing so would be
more involved than the string matching done in this patch.

In addition to checking for extra virtual methods, we'll likely also
want to check for data members on interfaces, and reject them unless the
class is marked as `[builtinclass]` in addition to some other attribute
which we'll need to add to prevent them from being implemented in Rust
(as c++ data members will not be reflected by the rust macro).

There were 2 instances of a comment which contained the word 'virtual'
within a CDATA block. These comments were moved out of the CDATA block
to avoid triggering the error.

Differential Revision: https://phabricator.services.mozilla.com/D151068
2022-07-06 14:53:06 +00:00
Mike Kaply 288d325a1c Bug 1297520 - For Snap, only install language for system locale. r=nalexander
Differential Revision: https://phabricator.services.mozilla.com/D151052
2022-07-06 13:34:18 +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
serge-sans-paille b122b6d13d Bug 1774865 - extra cleanup mozglue, security, intl and netwerk includes r=sylvestre
Differential Revision: https://phabricator.services.mozilla.com/D149670
2022-06-22 09:51:52 +00:00
criss c6b2c5db61 Backed out 9 changesets (bug 1772006) causing build bustages on nsTString.cpp. CLOSED TREE
Backed out changeset f17c7565707b (bug 1772006)
Backed out changeset c725fe1f5882 (bug 1772006)
Backed out changeset d19663161261 (bug 1772006)
Backed out changeset b6611ab002d9 (bug 1772006)
Backed out changeset 790f42b64af9 (bug 1772006)
Backed out changeset 79a734b4e4d9 (bug 1772006)
Backed out changeset 42730aae16ea (bug 1772006)
Backed out changeset b2542aef3054 (bug 1772006)
Backed out changeset 962bfea4a309 (bug 1772006)
2022-06-11 01:13:42 +03:00
Nika Layzell b3c13bf114 Bug 1772006 - Part 6: Simplify and move the string searching APIs from ns[T]StringObsolete, r=xpcom-reviewers,necko-reviewers,eeejay,dragana,barret
The biggest set of APIs from ns[T]StringObsolete which are still heavily used
are the string searching APIs. It appears the intention was for these to be
replaced by the `FindInReadable` APIs, however that doesn't appear to have
happened.

In addition, the APIs have some quirks around their handling of mixed character
widths. These APIs generally supported both narrow strings and the native
string type, probably because char16_t string literals weren't available until
c++11. Finally they also used easy-to-confuse unlabeled boolean and integer
optional arguments to control behaviour.

These patches do the following major changes to the searching APIs:

1. The ASCII case-insensitive search method was split out as
   LowerCaseFindASCII, rather than using a boolean. This should be less
   error-prone and more explicit, and allows the method to continue to use
   narrow string literals for all string types (as only ASCII is supported).
2. The other [R]Find methods were restricted to only support arguments with
   matching character types. I considered adding a FindASCII method which would
   use narrow string literals for both wide and narrow strings but it would've
   been the same amount of work as changing all of the literals to unicode
   literals.
   This ends up being the bulk of the changes in the patch.
3. All find methods were re-implemented using std::basic_string_view's find
   algorithm or stl algorithms to reduce code complexity, and avoid the need to
   carry around the logic from nsStringObsolete.cpp.
4. The implementations were moved to nsTStringRepr.cpp.
5. An overload of Find was added to try to catch callers which previously
   called `Find(..., false)` or `Find(..., true)` to set case-sensitivity, due
   to booleans normally implicitly coercing to `index_type`. This should
   probably be removed at some point, but may be useful during the transition.

Differential Revision: https://phabricator.services.mozilla.com/D148300
2022-06-10 21:12:08 +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
Tooru Fujisawa 0acf5d541a Bug 1772313 - Part 10: Stop calling XPCOMUtils.defineLazyModuleGetters for Services in intl/. r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D148163
2022-06-06 04:42:08 +00:00
Molnar Sandor 77402a5caa Backed out 15 changesets (bug 1772313, bug 1772351, bug 1772360) for causing xpc failures in telemetry/tests/unit/test_SocketScalars.js CLOSED TREE
Backed out changeset c8b0a2ed239e (bug 1772360)
Backed out changeset 1922adad6abe (bug 1772351)
Backed out changeset 6d3634cce489 (bug 1772351)
Backed out changeset f03968a9d053 (bug 1772351)
Backed out changeset e7a38ef90fe4 (bug 1772351)
Backed out changeset b389e7654771 (bug 1772313)
Backed out changeset 59a33598ff51 (bug 1772313)
Backed out changeset ab60885a8a93 (bug 1772313)
Backed out changeset aad8efac9d05 (bug 1772313)
Backed out changeset 4378e519a8e7 (bug 1772313)
Backed out changeset 302ac54741f8 (bug 1772313)
Backed out changeset 74c59f9fd51c (bug 1772313)
Backed out changeset 575fb877c56c (bug 1772313)
Backed out changeset 2eaa68f10b19 (bug 1772313)
Backed out changeset 4a8b3ba193dc (bug 1772313)
2022-06-06 07:04:25 +03:00
Tooru Fujisawa d332568199 Bug 1772313 - Part 10: Stop calling XPCOMUtils.defineLazyModuleGetters for Services in intl/. r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D148163
2022-06-06 02:49:12 +00:00
Tooru Fujisawa b844fd7815 Bug 1772102 - Use plain object for lazy getter in intl/locale/. r=platform-i18n-reviewers,dminor
Depends on D147889

Differential Revision: https://phabricator.services.mozilla.com/D147890
2022-06-01 16:56:14 +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
Greg Tatum d621733e7f Bug 1767537 - Dispatch intl:app-locales-changed for pseudo-locale changes; r=platform-i18n-reviewers,dminor
Differential Revision: https://phabricator.services.mozilla.com/D145371
2022-05-05 16:25:31 +00:00
André Bargull 0d0356d4a0 Bug 1767961 - Part 4: Make TryCreateFromSkeleton a private method. r=platform-i18n-reviewers,dminor
`TryCreateFromSkeleton()` is only called internally in `DateTimeFormat`, so we
can make it a private method to reduce the API surface.

Differential Revision: https://phabricator.services.mozilla.com/D145583
2022-05-05 15:00:35 +00:00
André Bargull 011e248afb Bug 1767961 - Part 3: Remove no longer used TryCreateFromSkeleton() method. r=platform-i18n-reviewers,dminor
There aren't any callers left for `TryCreateFromSkeleton()` after part 2.

Depends on D145581

Differential Revision: https://phabricator.services.mozilla.com/D145582
2022-05-05 15:00:34 +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
Mike Hommey 028ad1b883 Bug 1766377 - Fix remaining sign-compare warnings in Windows builds. r=rkraesig,gsvelto,media-playback-reviewers,gfx-reviewers,bryce,sotaro
browser/components/shell/WindowsUserChoice.cpp(233,23): error: comparison of integers of different signs: 'int' and 'const size_t' (aka 'const unsigned long long') [-Werror,-Wsign-compare]
    for (int j = 0; j < DWORDS_PER_BLOCK; ++j) {
                    ~ ^ ~~~~~~~~~~~~~~~~
browser/components/shell/WindowsUserChoice.cpp(388,21): error: comparison of integers of different signs: 'int' and 'size_t' (aka 'unsigned long long') [-Werror,-Wsign-compare]
  for (int i = 0; i < ArrayLength(exts); ++i) {
                  ~ ^ ~~~~~~~~~~~~~~~~~
browser/components/shell/nsWindowsShellService.cpp(1225,21): error: comparison of integers of different signs: 'int' and 'size_t' (aka 'unsigned long long') [-Werror,-Wsign-compare]
  for (int i = 0; i < ArrayLength(shortcutCSIDLs); ++i) {
                  ~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
browser/components/shell/nsWindowsShellService.cpp(1492,21): error: comparison of integers of different signs: 'int' and 'size_t' (aka 'unsigned long long') [-Werror,-Wsign-compare]
  for (int i = 0; i < ArrayLength(folders); ++i) {
                  ~ ^ ~~~~~~~~~~~~~~~~~~~~
dom/media/platforms/wmf/MFTDecoder.cpp(85,23): error: comparison of integers of different signs: 'int' and 'UINT32' (aka 'unsigned int') [-Werror,-Wsign-compare]
    for (int i = 1; i < actsNum; i++) {
                    ~ ^ ~~~~~~~
gfx/2d/Factory.cpp(1276,21): error: comparison of integers of different signs: 'int' and 'uint32_t' (aka 'unsigned int') [-Werror,-Wsign-compare]
  for (int y = 0; y < height; y++) {
                  ~ ^ ~~~~~~
gfx/layers/d3d11/CompositorD3D11.cpp(1096,36): error: comparison of integers of different signs: 'UINT' (aka 'unsigned int') and 'int' [-Werror,-Wsign-compare]
        swapDesc.BufferDesc.Height == mSize.height) ||
        ~~~~~~~~~~~~~~~~~~~~~~~~~~ ^  ~~~~~~~~~~~~
gfx/layers/d3d11/CompositorD3D11.cpp(1095,35): error: comparison of integers of different signs: 'UINT' (aka 'unsigned int') and 'int' [-Werror,-Wsign-compare]
  if (((swapDesc.BufferDesc.Width == mSize.width &&
        ~~~~~~~~~~~~~~~~~~~~~~~~~ ^  ~~~~~~~~~~~
gfx/layers/d3d11/TextureD3D11.cpp(1278,30): error: comparison of integers of different signs: 'UINT' (aka 'unsigned int') and 'int' [-Werror,-Wsign-compare]
          currentDesc.Height != mSize.height ||
          ~~~~~~~~~~~~~~~~~~ ^  ~~~~~~~~~~~~
gfx/layers/d3d11/TextureD3D11.cpp(1277,29): error: comparison of integers of different signs: 'UINT' (aka 'unsigned int') and 'int' [-Werror,-Wsign-compare]
      if (currentDesc.Width != mSize.width ||
          ~~~~~~~~~~~~~~~~~ ^  ~~~~~~~~~~~
gfx/layers/ipc/ContentCompositorBridgeParent.cpp(248,19): error: comparison of integers of different signs: 'const uint32_t' (aka 'const unsigned int') and 'int32_t' (aka 'int') [-Werror,-Wsign-compare]
  if (sequenceNum == status.sequenceNumber() && !dm->HasDeviceReset()) {
      ~~~~~~~~~~~ ^  ~~~~~~~~~~~~~~~~~~~~~~~
gfx/thebes/D3D11Checks.cpp(129,21): error: comparison of integers of different signs: 'int' and 'unsigned int' [-Werror,-Wsign-compare]
    if (resultColor != 0xffffff00) {
        ~~~~~~~~~~~ ^  ~~~~~~~~~~
gfx/thebes/D3D11Checks.cpp(154,23): error: comparison of integers of different signs: 'int' and 'unsigned long long' [-Werror,-Wsign-compare]
    for (int i = 0; i < PR_ARRAY_SIZE(checkModules); i += 1) {
                    ~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
gfx/thebes/D3D11Checks.cpp(409,14): error: comparison of integers of different signs: 'int32_t' (aka 'int') and 'UINT' (aka 'unsigned int') [-Werror,-Wsign-compare]
  if (vendor != desc.VendorId) {
      ~~~~~~ ^  ~~~~~~~~~~~~~
gfx/thebes/gfxDWriteFontList.cpp(1248,39): error: comparison of integers of different signs: 'unsigned int' and 'int' [-Werror,-Wsign-compare]
        addFamily(names[index], index != sysLocIndex);
                                ~~~~~ ^  ~~~~~~~~~~~
intl/lwbrk/nsUniscribeBreaker.cpp(121,21): error: comparison of integers of different signs: 'int' and 'uint32_t' (aka 'unsigned int') [-Werror,-Wsign-compare]
  for (int i = 0; i < aLength; ++i) {
                  ~ ^ ~~~~~~~
intl/lwbrk/nsUniscribeBreaker.cpp(132,23): error: comparison of integers of different signs: 'int' and 'uint32_t' (aka 'unsigned int') [-Werror,-Wsign-compare]
    for (int i = 0; i < aLength; ++i) {
                    ~ ^ ~~~~~~~
intl/lwbrk/nsUniscribeBreaker.cpp(138,23): error: comparison of integers of different signs: 'int' and 'uint32_t' (aka 'unsigned int') [-Werror,-Wsign-compare]
    for (int i = 0; i < aLength; ++i) {
                    ~ ^ ~~~~~~~
mozglue/misc/PreXULSkeletonUI.cpp(319,26): error: comparison of integers of different signs: 'std::basic_string<char>::size_type' (aka 'unsigned long long') and 'int' [-Werror,-Wsign-compare]
    while (line.length() > whitespace &&
           ~~~~~~~~~~~~~ ^ ~~~~~~~~~~
mozglue/misc/PreXULSkeletonUI.cpp(1003,21): error: comparison of integers of different signs: 'int' and 'size_t' (aka 'unsigned long long') [-Werror,-Wsign-compare]
  for (int i = 1; i < noPlaceholderSpans.length(); i++) {
                  ~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
mozglue/misc/PreXULSkeletonUI.cpp(1708,21): error: comparison of integers of different signs: 'int' and 'unsigned long long' [-Werror,-Wsign-compare]
  for (int i = 0; i < dataLen / (2 * sizeof(double)); i++) {
                  ~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
security/sandbox/chromium-shim/sandbox/win/permissionsService.cpp(40,16): error: comparison of integers of different signs: 'int' and 'const std::basic_string<wchar_t>::size_type' (aka 'const unsigned long long') [-Werror,-Wsign-compare]
  if (slashIdx != std::wstring::npos) {
      ~~~~~~~~ ^  ~~~~~~~~~~~~~~~~~~
toolkit/components/aboutthirdparty/tests/gtest/TestAboutThirdParty.cpp(107,21): error: comparison of integers of different signs: 'int' and 'size_t' (aka 'unsigned long long') [-Werror,-Wsign-compare]
  for (int i = 0; i < ArrayLength(kDirectoriesUnsorted); ++i) {
                  ~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
toolkit/crashreporter/breakpad-client/windows/crash_generation/crash_generation_server.cc(957,23): error: comparison of integers of different signs: 'int' and 'const size_t' (aka 'const unsigned long long') [-Werror,-Wsign-compare]
    for (int i = 0; i < kExceptionAppMemoryRegions; i++) {
                    ~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~
toolkit/crashreporter/client/crashreporter_win.cpp(373,21): error: comparison of integers of different signs: 'int' and 'unsigned long long' [-Werror,-Wsign-compare]
  for (int i = 0; i < sizeof(kDefaultAttachedBottom) / sizeof(UINT); i++) {
                  ~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
toolkit/crashreporter/client/crashreporter_win.cpp(671,21): error: comparison of integers of different signs: 'int' and 'unsigned long long' [-Werror,-Wsign-compare]
  for (int i = 0; i < sizeof(controls) / sizeof(controls[0]); i++) {
                  ~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
toolkit/crashreporter/client/crashreporter_win.cpp(1048,21): error: comparison of integers of different signs: 'int' and 'unsigned long long' [-Werror,-Wsign-compare]
  for (int i = 0; i < sizeof(kDefaultAttachedBottom) / sizeof(UINT); i++) {
                  ~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
toolkit/mozapps/defaultagent/SetDefaultBrowser.cpp(248,21): error: comparison of integers of different signs: 'int' and 'size_t' (aka 'unsigned long long') [-Werror,-Wsign-compare]
  for (int i = 0; i < mozilla::ArrayLength(associations); ++i) {
                  ~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
toolkit/system/windowsproxy/ProxyUtils.cpp(27,36): error: comparison of integers of different signs: 'const int' and 'nsTArray_base::size_type' (aka 'unsigned long long') [-Werror,-Wsign-compare]
                             if (i < addr.Length()) {
                                 ~ ^ ~~~~~~~~~~~~~
toolkit/xre/dllservices/mozglue/interceptor/Arm64.h(178,28): error: comparison of integers of different signs: 'int32_t' (aka 'int') and 'unsigned int' [-Werror,-Wsign-compare]
  if (signbits && signbits != 0xFE000000) {
                  ~~~~~~~~ ^  ~~~~~~~~~~
obj-build/dist/include/gtest/gtest.h(1842,54): note: expanded from macro 'EXPECT_EQ'
  EXPECT_PRED_FORMAT2(::testing::internal::EqHelper::Compare, val1, val2)
                                                     ^
obj-build/dist/include/gtest/gtest.h(1354,11): error: comparison of integers of different signs: 'const unsigned int' and 'const int' [-Werror,-Wsign-compare]
  if (lhs == rhs) {
      ~~~ ^  ~~~
obj-build/dist/include/gtest/gtest.h(1373,12): note: in instantiation of function template specialization 'testing::internal::CmpHelperEQ<unsigned int, int>' requested here
    return CmpHelperEQ(lhs_expression, rhs_expression, lhs, rhs);
           ^
toolkit/xre/dllservices/tests/gtest/TestUntrustedModules.cpp(35,5): note: in instantiation of function template specialization 'testing::internal::EqHelper::Compare<unsigned int, int, nullptr>' requested here
    EXPECT_EQ(mCounters.Count(), N);
    ^
obj-build/dist/include/gtest/gtest.h(1842,54): note: expanded from macro 'EXPECT_EQ'
  EXPECT_PRED_FORMAT2(::testing::internal::EqHelper::Compare, val1, val2)
                                                     ^
toolkit/xre/dllservices/tests/gtest/TestUntrustedModules.cpp(210,28): note: in instantiation of function template specialization 'ModuleLoadCounter::Remains<1>' requested here
    EXPECT_TRUE(waitForOne.Remains({kTestModules[0]}, {0}));
                           ^
toolkit/xre/test/gtest/TestAssembleCommandLineWin.cpp(139,21): error: comparison of integers of different signs: 'int' and 'size_t' (aka 'unsigned long long') [-Werror,-Wsign-compare]
  for (int i = 0; i < ArrayLength(kExpectedArgsW); ++i) {
                  ~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
toolkit/xre/test/gtest/TestAssembleCommandLineWin.cpp(151,21): error: comparison of integers of different signs: 'int' and 'size_t' (aka 'unsigned long long') [-Werror,-Wsign-compare]
  for (int i = 0; i < ArrayLength(kExpectedArgsW); ++i) {
                  ~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
toolkit/xre/test/gtest/TestAssembleCommandLineWin.cpp(164,21): error: comparison of integers of different signs: 'int' and 'size_t' (aka 'unsigned long long') [-Werror,-Wsign-compare]
  for (int i = 0; i < ArrayLength(kExpectedArgsW); ++i) {
                  ~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
obj-build/dist/include/gtest/gtest.h(1354,11): error: comparison of integers of different signs: 'const int' and 'const unsigned long long' [-Werror,-Wsign-compare]
  if (lhs == rhs) {
      ~~~ ^  ~~~
obj-build/dist/include/gtest/gtest.h(1373,12): note: in instantiation of function template specialization 'testing::internal::CmpHelperEQ<int, unsigned long long>' requested here
    return CmpHelperEQ(lhs_expression, rhs_expression, lhs, rhs);
           ^
toolkit/xre/test/gtest/TestAssembleCommandLineWin.cpp(138,3): note: in instantiation of function template specialization 'testing::internal::EqHelper::Compare<int, unsigned long long, nullptr>' requested here
  EXPECT_EQ(len, ArrayLength(kExpectedArgsW));
  ^
widget/windows/TSFTextStore.cpp(3455,28): error: comparison of integers of different signs: 'uint32_t' (aka 'unsigned int') and 'long' [-Werror,-Wsign-compare]
          range.mEndOffset == end - mComposition->StartOffset() &&
          ~~~~~~~~~~~~~~~~ ^  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
widget/windows/TSFTextStore.cpp(3454,30): error: comparison of integers of different signs: 'uint32_t' (aka 'unsigned int') and 'long' [-Werror,-Wsign-compare]
      if (range.mStartOffset == start - mComposition->StartOffset() &&
          ~~~~~~~~~~~~~~~~~~ ^  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
xpfe/appshell/AppWindow.cpp(1900,21): error: comparison of integers of different signs: 'int' and 'uint32_t' (aka 'unsigned int') [-Werror,-Wsign-compare]
  for (int i = 0; i < toolbarSprings->Length(); i++) {
                  ~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~

Differential Revision: https://phabricator.services.mozilla.com/D144695
2022-04-29 09:14:12 +00:00
Norisz Fay 6e06e2da92 Backed out 4 changesets (bug 1766377) for causing mochitest failures on HyperTextAccessible.cpp CLOSED TREE
Backed out changeset 6335511477a4 (bug 1766377)
Backed out changeset e8108d6fab9f (bug 1766377)
Backed out changeset 80d16d55c490 (bug 1766377)
Backed out changeset 1a6583d6e52e (bug 1766377)
2022-04-29 07:35:11 +03:00
Mike Hommey 9cd056be1e Bug 1766377 - Fix remaining sign-compare warnings in Windows builds. r=rkraesig,gsvelto,media-playback-reviewers,gfx-reviewers,bryce,sotaro
browser/components/shell/WindowsUserChoice.cpp(233,23): error: comparison of integers of different signs: 'int' and 'const size_t' (aka 'const unsigned long long') [-Werror,-Wsign-compare]
    for (int j = 0; j < DWORDS_PER_BLOCK; ++j) {
                    ~ ^ ~~~~~~~~~~~~~~~~
browser/components/shell/WindowsUserChoice.cpp(388,21): error: comparison of integers of different signs: 'int' and 'size_t' (aka 'unsigned long long') [-Werror,-Wsign-compare]
  for (int i = 0; i < ArrayLength(exts); ++i) {
                  ~ ^ ~~~~~~~~~~~~~~~~~
browser/components/shell/nsWindowsShellService.cpp(1225,21): error: comparison of integers of different signs: 'int' and 'size_t' (aka 'unsigned long long') [-Werror,-Wsign-compare]
  for (int i = 0; i < ArrayLength(shortcutCSIDLs); ++i) {
                  ~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
browser/components/shell/nsWindowsShellService.cpp(1492,21): error: comparison of integers of different signs: 'int' and 'size_t' (aka 'unsigned long long') [-Werror,-Wsign-compare]
  for (int i = 0; i < ArrayLength(folders); ++i) {
                  ~ ^ ~~~~~~~~~~~~~~~~~~~~
dom/media/platforms/wmf/MFTDecoder.cpp(85,23): error: comparison of integers of different signs: 'int' and 'UINT32' (aka 'unsigned int') [-Werror,-Wsign-compare]
    for (int i = 1; i < actsNum; i++) {
                    ~ ^ ~~~~~~~
gfx/2d/Factory.cpp(1276,21): error: comparison of integers of different signs: 'int' and 'uint32_t' (aka 'unsigned int') [-Werror,-Wsign-compare]
  for (int y = 0; y < height; y++) {
                  ~ ^ ~~~~~~
gfx/layers/d3d11/CompositorD3D11.cpp(1096,36): error: comparison of integers of different signs: 'UINT' (aka 'unsigned int') and 'int' [-Werror,-Wsign-compare]
        swapDesc.BufferDesc.Height == mSize.height) ||
        ~~~~~~~~~~~~~~~~~~~~~~~~~~ ^  ~~~~~~~~~~~~
gfx/layers/d3d11/CompositorD3D11.cpp(1095,35): error: comparison of integers of different signs: 'UINT' (aka 'unsigned int') and 'int' [-Werror,-Wsign-compare]
  if (((swapDesc.BufferDesc.Width == mSize.width &&
        ~~~~~~~~~~~~~~~~~~~~~~~~~ ^  ~~~~~~~~~~~
gfx/layers/d3d11/TextureD3D11.cpp(1278,30): error: comparison of integers of different signs: 'UINT' (aka 'unsigned int') and 'int' [-Werror,-Wsign-compare]
          currentDesc.Height != mSize.height ||
          ~~~~~~~~~~~~~~~~~~ ^  ~~~~~~~~~~~~
gfx/layers/d3d11/TextureD3D11.cpp(1277,29): error: comparison of integers of different signs: 'UINT' (aka 'unsigned int') and 'int' [-Werror,-Wsign-compare]
      if (currentDesc.Width != mSize.width ||
          ~~~~~~~~~~~~~~~~~ ^  ~~~~~~~~~~~
gfx/layers/ipc/ContentCompositorBridgeParent.cpp(248,19): error: comparison of integers of different signs: 'const uint32_t' (aka 'const unsigned int') and 'int32_t' (aka 'int') [-Werror,-Wsign-compare]
  if (sequenceNum == status.sequenceNumber() && !dm->HasDeviceReset()) {
      ~~~~~~~~~~~ ^  ~~~~~~~~~~~~~~~~~~~~~~~
gfx/thebes/D3D11Checks.cpp(129,21): error: comparison of integers of different signs: 'int' and 'unsigned int' [-Werror,-Wsign-compare]
    if (resultColor != 0xffffff00) {
        ~~~~~~~~~~~ ^  ~~~~~~~~~~
gfx/thebes/D3D11Checks.cpp(154,23): error: comparison of integers of different signs: 'int' and 'unsigned long long' [-Werror,-Wsign-compare]
    for (int i = 0; i < PR_ARRAY_SIZE(checkModules); i += 1) {
                    ~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
gfx/thebes/D3D11Checks.cpp(409,14): error: comparison of integers of different signs: 'int32_t' (aka 'int') and 'UINT' (aka 'unsigned int') [-Werror,-Wsign-compare]
  if (vendor != desc.VendorId) {
      ~~~~~~ ^  ~~~~~~~~~~~~~
gfx/thebes/gfxDWriteFontList.cpp(1248,39): error: comparison of integers of different signs: 'unsigned int' and 'int' [-Werror,-Wsign-compare]
        addFamily(names[index], index != sysLocIndex);
                                ~~~~~ ^  ~~~~~~~~~~~
intl/lwbrk/nsUniscribeBreaker.cpp(121,21): error: comparison of integers of different signs: 'int' and 'uint32_t' (aka 'unsigned int') [-Werror,-Wsign-compare]
  for (int i = 0; i < aLength; ++i) {
                  ~ ^ ~~~~~~~
intl/lwbrk/nsUniscribeBreaker.cpp(132,23): error: comparison of integers of different signs: 'int' and 'uint32_t' (aka 'unsigned int') [-Werror,-Wsign-compare]
    for (int i = 0; i < aLength; ++i) {
                    ~ ^ ~~~~~~~
intl/lwbrk/nsUniscribeBreaker.cpp(138,23): error: comparison of integers of different signs: 'int' and 'uint32_t' (aka 'unsigned int') [-Werror,-Wsign-compare]
    for (int i = 0; i < aLength; ++i) {
                    ~ ^ ~~~~~~~
mozglue/misc/PreXULSkeletonUI.cpp(319,26): error: comparison of integers of different signs: 'std::basic_string<char>::size_type' (aka 'unsigned long long') and 'int' [-Werror,-Wsign-compare]
    while (line.length() > whitespace &&
           ~~~~~~~~~~~~~ ^ ~~~~~~~~~~
mozglue/misc/PreXULSkeletonUI.cpp(1003,21): error: comparison of integers of different signs: 'int' and 'size_t' (aka 'unsigned long long') [-Werror,-Wsign-compare]
  for (int i = 1; i < noPlaceholderSpans.length(); i++) {
                  ~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
mozglue/misc/PreXULSkeletonUI.cpp(1708,21): error: comparison of integers of different signs: 'int' and 'unsigned long long' [-Werror,-Wsign-compare]
  for (int i = 0; i < dataLen / (2 * sizeof(double)); i++) {
                  ~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
security/sandbox/chromium-shim/sandbox/win/permissionsService.cpp(40,16): error: comparison of integers of different signs: 'int' and 'const std::basic_string<wchar_t>::size_type' (aka 'const unsigned long long') [-Werror,-Wsign-compare]
  if (slashIdx != std::wstring::npos) {
      ~~~~~~~~ ^  ~~~~~~~~~~~~~~~~~~
toolkit/components/aboutthirdparty/tests/gtest/TestAboutThirdParty.cpp(107,21): error: comparison of integers of different signs: 'int' and 'size_t' (aka 'unsigned long long') [-Werror,-Wsign-compare]
  for (int i = 0; i < ArrayLength(kDirectoriesUnsorted); ++i) {
                  ~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
toolkit/crashreporter/breakpad-client/windows/crash_generation/crash_generation_server.cc(957,23): error: comparison of integers of different signs: 'int' and 'const size_t' (aka 'const unsigned long long') [-Werror,-Wsign-compare]
    for (int i = 0; i < kExceptionAppMemoryRegions; i++) {
                    ~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~
toolkit/crashreporter/client/crashreporter_win.cpp(373,21): error: comparison of integers of different signs: 'int' and 'unsigned long long' [-Werror,-Wsign-compare]
  for (int i = 0; i < sizeof(kDefaultAttachedBottom) / sizeof(UINT); i++) {
                  ~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
toolkit/crashreporter/client/crashreporter_win.cpp(671,21): error: comparison of integers of different signs: 'int' and 'unsigned long long' [-Werror,-Wsign-compare]
  for (int i = 0; i < sizeof(controls) / sizeof(controls[0]); i++) {
                  ~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
toolkit/crashreporter/client/crashreporter_win.cpp(1048,21): error: comparison of integers of different signs: 'int' and 'unsigned long long' [-Werror,-Wsign-compare]
  for (int i = 0; i < sizeof(kDefaultAttachedBottom) / sizeof(UINT); i++) {
                  ~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
toolkit/mozapps/defaultagent/SetDefaultBrowser.cpp(248,21): error: comparison of integers of different signs: 'int' and 'size_t' (aka 'unsigned long long') [-Werror,-Wsign-compare]
  for (int i = 0; i < mozilla::ArrayLength(associations); ++i) {
                  ~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
toolkit/system/windowsproxy/ProxyUtils.cpp(27,36): error: comparison of integers of different signs: 'const int' and 'nsTArray_base::size_type' (aka 'unsigned long long') [-Werror,-Wsign-compare]
                             if (i < addr.Length()) {
                                 ~ ^ ~~~~~~~~~~~~~
toolkit/xre/dllservices/mozglue/interceptor/Arm64.h(178,28): error: comparison of integers of different signs: 'int32_t' (aka 'int') and 'unsigned int' [-Werror,-Wsign-compare]
  if (signbits && signbits != 0xFE000000) {
                  ~~~~~~~~ ^  ~~~~~~~~~~
obj-build/dist/include/gtest/gtest.h(1842,54): note: expanded from macro 'EXPECT_EQ'
  EXPECT_PRED_FORMAT2(::testing::internal::EqHelper::Compare, val1, val2)
                                                     ^
obj-build/dist/include/gtest/gtest.h(1354,11): error: comparison of integers of different signs: 'const unsigned int' and 'const int' [-Werror,-Wsign-compare]
  if (lhs == rhs) {
      ~~~ ^  ~~~
obj-build/dist/include/gtest/gtest.h(1373,12): note: in instantiation of function template specialization 'testing::internal::CmpHelperEQ<unsigned int, int>' requested here
    return CmpHelperEQ(lhs_expression, rhs_expression, lhs, rhs);
           ^
toolkit/xre/dllservices/tests/gtest/TestUntrustedModules.cpp(35,5): note: in instantiation of function template specialization 'testing::internal::EqHelper::Compare<unsigned int, int, nullptr>' requested here
    EXPECT_EQ(mCounters.Count(), N);
    ^
obj-build/dist/include/gtest/gtest.h(1842,54): note: expanded from macro 'EXPECT_EQ'
  EXPECT_PRED_FORMAT2(::testing::internal::EqHelper::Compare, val1, val2)
                                                     ^
toolkit/xre/dllservices/tests/gtest/TestUntrustedModules.cpp(210,28): note: in instantiation of function template specialization 'ModuleLoadCounter::Remains<1>' requested here
    EXPECT_TRUE(waitForOne.Remains({kTestModules[0]}, {0}));
                           ^
toolkit/xre/test/gtest/TestAssembleCommandLineWin.cpp(139,21): error: comparison of integers of different signs: 'int' and 'size_t' (aka 'unsigned long long') [-Werror,-Wsign-compare]
  for (int i = 0; i < ArrayLength(kExpectedArgsW); ++i) {
                  ~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
toolkit/xre/test/gtest/TestAssembleCommandLineWin.cpp(151,21): error: comparison of integers of different signs: 'int' and 'size_t' (aka 'unsigned long long') [-Werror,-Wsign-compare]
  for (int i = 0; i < ArrayLength(kExpectedArgsW); ++i) {
                  ~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
toolkit/xre/test/gtest/TestAssembleCommandLineWin.cpp(164,21): error: comparison of integers of different signs: 'int' and 'size_t' (aka 'unsigned long long') [-Werror,-Wsign-compare]
  for (int i = 0; i < ArrayLength(kExpectedArgsW); ++i) {
                  ~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
obj-build/dist/include/gtest/gtest.h(1354,11): error: comparison of integers of different signs: 'const int' and 'const unsigned long long' [-Werror,-Wsign-compare]
  if (lhs == rhs) {
      ~~~ ^  ~~~
obj-build/dist/include/gtest/gtest.h(1373,12): note: in instantiation of function template specialization 'testing::internal::CmpHelperEQ<int, unsigned long long>' requested here
    return CmpHelperEQ(lhs_expression, rhs_expression, lhs, rhs);
           ^
toolkit/xre/test/gtest/TestAssembleCommandLineWin.cpp(138,3): note: in instantiation of function template specialization 'testing::internal::EqHelper::Compare<int, unsigned long long, nullptr>' requested here
  EXPECT_EQ(len, ArrayLength(kExpectedArgsW));
  ^
widget/windows/TSFTextStore.cpp(3455,28): error: comparison of integers of different signs: 'uint32_t' (aka 'unsigned int') and 'long' [-Werror,-Wsign-compare]
          range.mEndOffset == end - mComposition->StartOffset() &&
          ~~~~~~~~~~~~~~~~ ^  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
widget/windows/TSFTextStore.cpp(3454,30): error: comparison of integers of different signs: 'uint32_t' (aka 'unsigned int') and 'long' [-Werror,-Wsign-compare]
      if (range.mStartOffset == start - mComposition->StartOffset() &&
          ~~~~~~~~~~~~~~~~~~ ^  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
xpfe/appshell/AppWindow.cpp(1900,21): error: comparison of integers of different signs: 'int' and 'uint32_t' (aka 'unsigned int') [-Werror,-Wsign-compare]
  for (int i = 0; i < toolbarSprings->Length(); i++) {
                  ~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~

Differential Revision: https://phabricator.services.mozilla.com/D144695
2022-04-29 00:43:32 +00:00
Greg Tatum f30d9ead28 Bug 1764920 - Install the langpack even if it is the fallback; r=platform-i18n-reviewers,preferences-reviewers,mstriemer,dminor
The fallback locale is not guaranteed to have all of the strings for
non-fluent files, even if it is one of the available locales. This patch
shares the logic with about:preferences for getting the available
locales.

Differential Revision: https://phabricator.services.mozilla.com/D143910
2022-04-28 15:00:57 +00:00
André Bargull ee902f8f06 Bug 1766220: Backport ICU-21994 to fix a potential heap buffer overflow. r=platform-i18n-reviewers,dminor
Differential Revision: https://phabricator.services.mozilla.com/D144542
2022-04-25 16:34:42 +00:00
Noemi Erli b72aebe50e Backed out changeset 015c2c72a2a2 (bug 1761835) for causing failures in browser_stringBundleInvalidation.js CLOSED TREE 2022-04-21 04:32:28 +03:00
Greg Tatum 85d131c3dc Bug 1761835 - Add a test for switching locales and string bundles; r=platform-i18n-reviewers,dminor
Differential Revision: https://phabricator.services.mozilla.com/D144032
2022-04-20 18:02:02 +00:00
Karnik Kanojia f56be3984d Bug 1762683 - Fix ESLint rule warnings for no-unused-vars in intl/uconv/tests/unit/test_bug317216.js. r=Standard8
Differential Revision: https://phabricator.services.mozilla.com/D143223
2022-04-19 11:22:34 +00:00
André Bargull 8d87ceda13 Bug 1763783 - Part 10: Remove no longer needed workarounds for ICU-21154 and ICU-21155. r=platform-i18n-reviewers,jfkthame
ICU-21154 and ICU-21155 have been fixed in ICU 71, so we can remove this
workaround.

Depends on D143282

Differential Revision: https://phabricator.services.mozilla.com/D143283
2022-04-10 09:18:06 +00:00
André Bargull 2130cb5dbf Bug 1763783 - Part 9: Update ICU draft API guards. r=platform-i18n-reviewers,jfkthame
- `UCAL_TZ_LOCAL_FORMER` and `UCAL_TZ_LOCAL_FORMER` are now stable.
- `UNUM_APPROXIMATELY_SIGN_FIELD` is a new draft API.

Depends on D143281

Differential Revision: https://phabricator.services.mozilla.com/D143282
2022-04-10 09:18:05 +00:00
André Bargull 64e2cbf62b Bug 1763783 - Part 7: Update expected test results. r=platform-i18n-reviewers,jfkthame
Depends on D143279

Differential Revision: https://phabricator.services.mozilla.com/D143280
2022-04-10 09:18:04 +00:00
André Bargull 0730f55989 Bug 1763783 - Part 4: Update language tags mappings to CLDR 41. r=platform-i18n-reviewers,jfkthame
Depends on D143276

Differential Revision: https://phabricator.services.mozilla.com/D143277
2022-04-10 09:18:03 +00:00
André Bargull bf0b6fd5c1 Bug 1763783 - Part 3: Update time zone data to tzdata2022a. r=platform-i18n-reviewers,jfkthame
Depends on D143275

Differential Revision: https://phabricator.services.mozilla.com/D143276
2022-04-10 09:18:03 +00:00
André Bargull d9409e29f8 Bug 1763783 - Part 2: Update in-tree ICU to release 71.1. r=platform-i18n-reviewers,jfkthame
Depends on D143273

Differential Revision: https://phabricator.services.mozilla.com/D143275
2022-04-10 09:17:54 +00:00
André Bargull 2d1c97da63 Bug 1763783 - Part 1: Remove no longer needed ICU patch. r=platform-i18n-reviewers,jfkthame
`UNUM_APPROXIMATELY_SIGN_FIELD` is now available as a draft API in ICU itself.

Differential Revision: https://phabricator.services.mozilla.com/D143273
2022-04-10 09:17:54 +00:00
Greg Tatum 852ecad7f2 Bug 1762659 - Use MozIntl for stand-alone display names in LangPackMatcher.jsm; r=Mardak,nordzilla
Differential Revision: https://phabricator.services.mozilla.com/D142730
2022-04-01 21:39:17 +00:00