Commit Graph

1496 Commits

Author SHA1 Message Date
Nicklas Boman
1f607e5f9f Bug 1725363 - Replace PL_strcasecmp with nsCRT::strcasecmp modules/libjar/ r=valentin
Differential Revision: https://phabricator.services.mozilla.com/D129076
2022-01-26 09:06:37 +00:00
Nika Layzell
7b2e6d4996 Bug 1741665 - Align nsCString's public size_type better with other C++ APIs, r=mccr8,geckoview-reviewers,agi
Differential Revision: https://phabricator.services.mozilla.com/D131422
2021-12-13 21:47:56 +00:00
ssummar
b9d6fce436 Bug 1530209 - Removed context argument from various methods. r=necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D129797
2021-11-24 11:25:41 +00:00
Kershaw Chang
40dab11b6b Bug 1544127 - Always release load info on main thread, r=necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D127675
2021-10-12 14:20:41 +00:00
Andi-Bogdan Postelnicu
2fc4f70e9b Bug 1725145 - Preparation for the hybrid build env. r=necko-reviewers,firefox-build-system-reviewers,valentin,glandium
Automatically generated path that adds flag `REQUIRES_UNIFIED_BUILD = True` to `moz.build`
when the module governed by the build config file is not buildable outside on the unified environment.

This needs to be done in order to have a hybrid build system that adds the possibility of combing
unified build components with ones that are built outside of the unified eco system.

Differential Revision: https://phabricator.services.mozilla.com/D122345
2021-08-25 10:46:17 +00:00
Iulian Moraru
9e1bbc59d1 Backed out changeset 7fa060b566d6 (bug 1724718) for causing failures on nsJARChannel. CLOSED TREE 2021-08-20 17:08:10 +03:00
Gijs Kruitbosch
4027d30a67 Bug 1724718 - put missing chrome/resource check from jar channels in a better place so we catch all cases, r=valentin
Depends on D122166

Differential Revision: https://phabricator.services.mozilla.com/D122167
2021-08-20 11:28:57 +00:00
Nicklas Boman
f288624a43 Bug 1308094 - Remove deprecated PL_strdup and PL_strfree calls from modules code r=valentin
Differential Revision: https://phabricator.services.mozilla.com/D122150
2021-08-17 19:34:33 +00:00
Valentin Gosu
57e3894d7d Bug 1722925 - Avoid unnecessary string copies by nsCString constructor r=necko-reviewers,kershaw CLOSED TREE
Since the Find method does not exist on nsACString, I had to use std::search
to find the "data:" substring in the spec.

Differential Revision: https://phabricator.services.mozilla.com/D122082
2021-08-12 07:40:58 +00:00
Valentin Gosu
d97def2f41 Bug 1722925 - Remove NS_MutatorMethod in favor of templated nsIURIMutator::Apply r=necko-reviewers,kershaw
This basically reverts the changes in 5caa81103c00 (bug 1435671). In that bug
we switched from having a templated method to using a templated function
that returned a lambda because the templated method caused a binary size
regression on windows (MSVC). Since Firefox 67 we no longer support MSVC.
Using a lambda also required capturing the arguments by value, so it was
slightly inefficient.

This patch removes NS_MutatorMethod and makes the Apply method a template.
This improves perfomance as we can just pass the arguments to the called
function, without worrying about needing to copy them.
Since MSVC is not supported anymore, and clang and gcc didn't report a
binary size regression, this is a much better solution.

Differential Revision: https://phabricator.services.mozilla.com/D122081
2021-08-12 07:40:58 +00:00
Iulian Moraru
32090542c0 Backed out 2 changesets (bug 1722925) for causing reftest failures in color_quads. CLOSED TREE
Backed out changeset 95a6eacbef27 (bug 1722925)
Backed out changeset 2e2a98aeca5c (bug 1722925)
2021-08-12 12:22:34 +03:00
Valentin Gosu
32b251ca35 Bug 1722925 - Avoid unnecessary string copies by nsCString constructor r=necko-reviewers,kershaw
Since the Find method does not exist on nsACString, I had to use std::search
to find the "data:" substring in the spec.

Differential Revision: https://phabricator.services.mozilla.com/D122082
2021-08-12 07:40:58 +00:00
Valentin Gosu
c6b1fa7e03 Bug 1722925 - Remove NS_MutatorMethod in favor of templated nsIURIMutator::Apply r=necko-reviewers,kershaw
This basically reverts the changes in 5caa81103c00 (bug 1435671). In that bug
we switched from having a templated method to using a templated function
that returned a lambda because the templated method caused a binary size
regression on windows (MSVC). Since Firefox 67 we no longer support MSVC.
Using a lambda also required capturing the arguments by value, so it was
slightly inefficient.

This patch removes NS_MutatorMethod and makes the Apply method a template.
This improves perfomance as we can just pass the arguments to the called
function, without worrying about needing to copy them.
Since MSVC is not supported anymore, and clang and gcc didn't report a
binary size regression, this is a much better solution.

Differential Revision: https://phabricator.services.mozilla.com/D122081
2021-08-12 07:40:58 +00:00
Nicklas Boman
cd8acaa740 Bug 1308105 - Replace PL_strpbrk with strpbrk r=xpcom-reviewers,kmag
Differential Revision: https://phabricator.services.mozilla.com/D116933
2021-08-10 11:30:39 +00:00
Gijs Kruitbosch
1e4a561ac0 Bug 1721627 - crash on requests to non-existing chrome: and resource: files on infra, r=necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D120557
2021-08-03 16:46:34 +00:00
Dorel Luca
24feffa455 Backed out 2 changesets (bug 1721627) for Talos failures. CLOSED TREE
Backed out changeset bc5e08d27347 (bug 1721627)
Backed out changeset a670f5679e0b (bug 1721627)
2021-08-03 03:57:21 +03:00
Gijs Kruitbosch
50385d763f Bug 1721627 - crash on requests to non-existing chrome: and resource: files on infra, r=necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D120557
2021-08-02 16:55:35 +00:00
Mike Hommey
a53b913e63 Bug 1717947 - Remove support for brotli streams in Jar archives. r=valentin
This was added in bug 1355661, has been kept Nightly-only since then,
and was only used briefly for omni.ja, and eventually we switched
compression off entirely on omni.ja. If we ever switch compression on
again on omni.ja, it would likely be with zstd, which is much faster
on the compression side.

Differential Revision: https://phabricator.services.mozilla.com/D118654
2021-06-25 00:20:10 +00:00
Jens Stutte
f2f68509d3 Bug 1690326: Add mappings for ERROR_DEVICE_HARDWARE_ERROR, ERROR_DEVICE_NOT_CONNECTED, ERROR_DISK_FULL and remove error NS_ERROR_FILE_DISK_FULL in favor of existing NS_ERROR_FILE_NO_DEVICE_SPACE r=xpcom-reviewers,necko-reviewers,nika,valentin
Win32 errors ERROR_DEVICE_HARDWARE_ERROR, ERROR_DEVICE_NOT_CONNECTED, ERROR_DISK_FULL need a mapping.
NS_ERROR_FILE_DISK_FULL is duplicate to NS_ERROR_FILE_NO_DEVICE_SPACE
Drive by: RejectJSPromise lacked some NS_ERROR_* mappings

Differential Revision: https://phabricator.services.mozilla.com/D113974
2021-05-06 14:00:06 +00:00
Valentin Gosu
0033f0524c Bug 1707853 - Add always-skipped unit test for documentation purposes r=necko-reviewers,dragana
This test is for documentation purposes. You may run it locally on Windows by removing the skip-if = true from xpcshell.ini
As sharing  folders on windows requires elevated priviledges, you will need to execute some commands in a separate cmd.exe instance with Admin priviledges.

Differential Revision: https://phabricator.services.mozilla.com/D113498
2021-04-27 13:33:28 +00:00
Valentin Gosu
e7889adba2 Bug 1707853 - Use std::copy instead of memcpy to ensure exception handling works r=necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D113497
2021-04-27 13:33:27 +00:00
Valentin Gosu
3477d25274 Bug 1551562 - Use CopyMemory instead of memcpy on Windows inside try/catch blocks r=necko-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D112343
2021-04-16 12:58:28 +00:00
Kershaw Chang
cefbdf0c3b Bug 1702937 - Narrow down the zero_byte_load probe, r=zbraniecki
Differential Revision: https://phabricator.services.mozilla.com/D110967
2021-04-06 19:53:19 +00:00
Kershaw Chang
49d7717cc6 Bug 1656329 - Add a mutex to protect nsZipArchive::mFiles and nsZipArchive::mBuiltSynthetics r=valentin
Differential Revision: https://phabricator.services.mozilla.com/D109820
2021-03-30 08:48:26 +00:00
Simon Giesecke
613e20d136 Bug 1184468 - Use nsBaseHashtable::Values. r=xpcom-reviewers,nika
Differential Revision: https://phabricator.services.mozilla.com/D108587
2021-03-24 17:56:49 +00:00
Simon Giesecke
ad01a10a3b Bug 1634281 - Use nsTHashMap instead of nsDataHashtable. r=xpcom-reviewers,necko-reviewers,jgilbert,nika,valentin
Note that this patch only transforms the use of the nsDataHashtable type alias
to a directly equivalent use of nsTHashMap. It does not change the specification
of the hash key type to make use of the key class deduction that nsTHashMap
allows for in some cases. That can be done in a separate step, but requires more
attention.

Differential Revision: https://phabricator.services.mozilla.com/D106008
2021-03-10 10:47:47 +00:00
Kershaw Chang
970b68dbba Bug 1696151 - Make sure network.jar.record_failure_reason is true when the test is running r=zbraniecki
Differential Revision: https://phabricator.services.mozilla.com/D107061
2021-03-03 15:54:59 +00:00
Kershaw Chang
bdb4bcc1b8 Bug 1695560 - Narrow down the zero_byte_load probe r=zbraniecki
Differential Revision: https://phabricator.services.mozilla.com/D106770
2021-03-01 20:45:33 +00:00
Simon Giesecke
9af107a839 Bug 1691913 - Rename nsBaseHashtable::Put to InsertOrUpdate. r=xpcom-reviewers,necko-reviewers,jgilbert,dragana,nika
This makes the naming more consistent with other functions called
Insert and/or Update. Also, it removes the ambiguity whether
Put expects that an entry already exists or not, in particular because
it differed from nsTHashtable::PutEntry in that regard.

Differential Revision: https://phabricator.services.mozilla.com/D105473
2021-02-26 09:11:46 +00:00
Kershaw Chang
59e3afaf3d Bug 1694263 - P2: Record more file types in zero_byte_load telemetry r=zbraniecki
Differential Revision: https://phabricator.services.mozilla.com/D106139
2021-02-23 18:09:55 +00:00
Kershaw Chang
70e69d628e Bug 1694263 - P1: ODA should not be called when the channel is cancelled r=necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D106138
2021-02-23 18:09:54 +00:00
Zibi Braniecki
fe0003065b Bug 1693955 - Narrow down the zero_byte_load probe to tailor results for YSOD, part 2. r=kershaw
Differential Revision: https://phabricator.services.mozilla.com/D105860
2021-02-22 20:44:54 +00:00
Zibi Braniecki
f904ec3bc0 Bug 1693708 - Narrow down the scope of the YSOD probe to limit the volume of events. r=mossop
Differential Revision: https://phabricator.services.mozilla.com/D105713
2021-02-19 06:21:50 +00:00
Kershaw Chang
5b4663a115 Bug 1693146 - Report telemetry when a JAR channel is failed or en empty file is loaded, r=zbraniecki,Gijs
Differential Revision: https://phabricator.services.mozilla.com/D105359
2021-02-17 23:12:43 +00:00
Kershaw Chang
d9e8c3a9e6 Bug 1690438 - Add telemetry for zero byte loads in nsJARChannel::Open r=zbraniecki
Differential Revision: https://phabricator.services.mozilla.com/D104404
2021-02-10 16:47:13 +00:00
Masatoshi Kimura
a29e207781 Bug 1685900 - Split internal and external contentPolicyType. r=ckerschb,smaug
Differential Revision: https://phabricator.services.mozilla.com/D101271
2021-01-15 12:07:16 +00:00
Narcis Beleuzu
0322452233 Backed out changeset a52961071dcd (bug 1685900) for Build bustage in nsContentSecurityManager.cpp. CLOSED TREE 2021-01-15 04:04:37 +02:00
Masatoshi Kimura
b384f14cde Bug 1685900 - Split internal and external contentPolicyType. r=ckerschb,smaug
Differential Revision: https://phabricator.services.mozilla.com/D101271
2021-01-15 04:02:41 +02:00
Dorel Luca
9ed19e2828 Backed out changeset a52961071dcd (bug 1685900) for Build bustage in nsContentSecurityManager.cpp. CLOSED TREE 2021-01-15 02:45:34 +02:00
Masatoshi Kimura
87e50835c4 Bug 1685900 - Split internal and external contentPolicyType. r=ckerschb,smaug
Differential Revision: https://phabricator.services.mozilla.com/D101271
2021-01-14 20:44:54 +00:00
Geoff Brown
58cf701644 Bug 1607446 - Fix tsan-detected data race in nsJARChannel; r=valentin,decoder
Simply use Atomic to avoid a data race.

Differential Revision: https://phabricator.services.mozilla.com/D98276
2020-12-02 07:36:56 +00:00
Zibi Braniecki
adfbf1b7d8 Bug 1679606 - Enable telemetry collection for network.jar.channel event. r=valentin
Differential Revision: https://phabricator.services.mozilla.com/D98101
2020-11-28 21:37:29 +00:00
Simon Giesecke
971b645fe3 Bug 1660470 - Add missing include directives/forward declarations. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D87865
2020-11-23 16:21:38 +00:00
Magnus Melin
3b30d2a34f Bug 1675205 - don't fail test_empty_jar_telemetry.js for products the probe isn't enabled for. r=zbraniecki DONTBUILD
Avoids Thunderbird test failures.

Differential Revision: https://phabricator.services.mozilla.com/D97095
2020-11-15 19:21:18 +00:00
Valentin Gosu
5f2e68c256 Bug 1675205 - Report telemetry when load an empty file via a JAR archive r=zbraniecki
This will report when a telemetry even whenever we load an empty file via a
JAR channel. It will not catch situations where onStopRequest is called with
an error code, or when the listener of the channel does not consume the stream.

Differential Revision: https://phabricator.services.mozilla.com/D96412
2020-11-14 22:06:35 +00:00
Cosmin Sabou
437d0bd9e9 Backed out changeset b5cf0a593e64 (bug 1675205) for xpcshell failures on test_empty_jar_telemetry. 2020-11-13 02:36:00 +02:00
Valentin Gosu
28ca4d553d Bug 1675205 - Report telemetry when load an empty file via a JAR archive r=zbraniecki
This will report when a telemetry even whenever we load an empty file via a
JAR channel. It will not catch situations where onStopRequest is called with
an error code, or when the listener of the channel does not consume the stream.

Differential Revision: https://phabricator.services.mozilla.com/D96412
2020-11-10 21:24:45 +00:00
Valentin Gosu
0c6e62ade6 Bug 1675465 - Add DIAGNOSTIC_ASSERT in nsJARInputStream::Read r=jstutte
We want to make sure we don't accidentally read more than the size of the file.

Differential Revision: https://phabricator.services.mozilla.com/D96006
2020-11-05 12:18:39 +00:00
Ricky Stewart
02a7b4ebdf Bug 1654103: Standardize on Black for Python code in mozilla-central.
Allow-list all Python code in tree for use with the black linter, and re-format all code in-tree accordingly.

To produce this patch I did all of the following:

1. Make changes to tools/lint/black.yml to remove include: stanza and update list of source extensions.

2. Run ./mach lint --linter black --fix

3. Make some ad-hoc manual updates to python/mozbuild/mozbuild/test/configure/test_configure.py -- it has some hard-coded line numbers that the reformat breaks.

4. Make some ad-hoc manual updates to `testing/marionette/client/setup.py`, `testing/marionette/harness/setup.py`, and `testing/firefox-ui/harness/setup.py`, which have hard-coded regexes that break after the reformat.

5. Add a set of exclusions to black.yml. These will be deleted in a follow-up bug (1672023).

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D94045
2020-10-26 18:34:53 +00:00
Bogdan Tara
da1098d4aa Backed out 10 changesets (bug 1654103, bug 1672023, bug 1518999) for PanZoomControllerTest.touchEventForResult gv-junit failures CLOSED TREE
Backed out changeset ff3fb0b4a512 (bug 1672023)
Backed out changeset e7834b600201 (bug 1654103)
Backed out changeset 807893ca8069 (bug 1518999)
Backed out changeset 13e6b92440e9 (bug 1518999)
Backed out changeset 8b2ac5a6c98a (bug 1518999)
Backed out changeset 575748295752 (bug 1518999)
Backed out changeset 65f07ce7b39b (bug 1518999)
Backed out changeset 4bb80556158d (bug 1518999)
Backed out changeset 8ac8461d7bd7 (bug 1518999)
Backed out changeset e8ba13ee17f5 (bug 1518999)
2020-10-24 03:36:18 +03:00