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

759 Коммитов

Автор SHA1 Сообщение Дата
Paul Zuehlcke 6eb0d4fb20 Bug 1714608 - Cleaned up partitionKey base domain helpers. r=timhuang
Differential Revision: https://phabricator.services.mozilla.com/D118724
2021-07-07 16:05:06 +00:00
Valentin Gosu 733ed7c4bd Bug 1665836 - Make CacheIOThread::ThreadFunc hold reference to thread r=necko-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D118157
2021-06-24 16:20:16 +00:00
Paul Zuehlcke 2e06ca7e1c Bug 1705030 - Added NetworkCacheCleaner deleteByBaseDomain. r=necko-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D113128
2021-06-24 09:13:30 +00:00
Valentin Gosu 35bfc0713b Bug 1708673 - Do not recreate CacheEntry when OPEN_READONLY flag is passed r=necko-reviewers,dragana
This bug is caused by two cache visitors working in parallel:
Visitor1: calls asyncDoomURI
Visitor2: calls asyncOpenURI

This causes CacheStorageService::AddStorageEntry to create a new entry and add
it to the hashtable:
https://searchfox.org/mozilla-central/rev/308ea44d0d60b391b031ccee695920bd543f7d2f/netwerk/cache2/CacheStorageService.cpp#1566,1574,1576

Visitor3: will then go through the hashtable and see the newly added entry.

Differential Revision: https://phabricator.services.mozilla.com/D118344
2021-06-22 08:23:36 +00:00
Kershaw Chang c4afcf5b50 Bug 1662676 - Use a proof of lock everywhere, r=necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D118163
2021-06-21 21:18:38 +00:00
Florian Quèze dfeb53e219 Bug 1715257 - Remove Task Tracer code from the profiler, r=gerald,necko-reviewers.
Differential Revision: https://phabricator.services.mozilla.com/D117996
2021-06-17 09:33:00 +00:00
Iulian Moraru b02492de66 Backed out changeset 617a466d0cce (bug 1715257) for causing build bustages. CLOSED TREE 2021-06-17 10:58:16 +03:00
Florian Quèze 7b4906a6bd Bug 1715257 - Remove Task Tracer code from the profiler, r=gerald,necko-reviewers.
Differential Revision: https://phabricator.services.mozilla.com/D117996
2021-06-17 06:12:10 +00:00
Valentin Gosu 1a1f42da37 Bug 1714307 - Run modernize-use-default-member-init --fix check on netwerk r=necko-reviewers,kershaw
This changeset is the result of adding modernize-use-default-member-init to
tools/clang-tidy/config.yaml then proceeding to run
`./mach static-analysis check netwerk/ --fix`
I then went through the resulting fix and manually updated all of the member
variables which were missed due to them having a non-trivial constructor.

Note that the tool was only run on Linux, so code that only runs on some
platforms may have been missed.

The member variables that are still initialized in the contructor definition
are:
  - bitfields (not all currently supported compilers allow default-member-init
  - variables that are initialized via a parameter
  - variables that use code not visible in the header file

There are a few advantages to landing this change:
- fewer lines of code - now declaration is in the same place as initialization
  this also makes it easier to see when looking at the header.
- it makes it harder to miss initializing a member when adding a new contructor
- variables that depend on an include guard look much nicer now

Additionally I removed some unnecessary reinitialization of NetAddr members
(it has a constructor that does that now), and changed nsWifiScannerDBus to
use the thread-safe strtok_r instead of strtok.

Differential Revision: https://phabricator.services.mozilla.com/D116980
2021-06-11 07:10:41 +00:00
Csoregi Natalia 938a6943c6 Backed out changeset 6e00f8bd2acc (bug 1714307) for causing hazard bustage. CLOSED TREE 2021-06-09 21:50:03 +03:00
Valentin Gosu d1513f313e Bug 1714307 - Run modernize-use-default-member-init --fix check on netwerk r=necko-reviewers,kershaw
This changeset is the result of adding modernize-use-default-member-init to
tools/clang-tidy/config.yaml then proceeding to run
`./mach static-analysis check netwerk/ --fix`
I then went through the resulting fix and manually updated all of the member
variables which were missed due to them having a non-trivial constructor.

Note that the tool was only run on Linux, so code that only runs on some
platforms may have been missed.

The member variables that are still initialized in the contructor definition
are:
  - bitfields (not all currently supported compilers allow default-member-init
  - variables that are initialized via a parameter
  - variables that use code not visible in the header file

There are a few advantages to landing this change:
- fewer lines of code - now declaration is in the same place as initialization
  this also makes it easier to see when looking at the header.
- it makes it harder to miss initializing a member when adding a new contructor
- variables that depend on an include guard look much nicer now

Additionally I removed some unnecessary reinitialization of NetAddr members
(it has a constructor that does that now), and changed nsWifiScannerDBus to
use the thread-safe strtok_r instead of strtok.

Differential Revision: https://phabricator.services.mozilla.com/D116980
2021-06-09 10:20:04 +00:00
Valentin Gosu d595491cc7 Bug 1714307 - Autofix static-analysis warnings in netwerk/ r=necko-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D116701
2021-06-04 12:35:16 +00:00
Butkovits Atila 692bda1ca1 Backed out changeset c4b44c4ef15b (bug 1714307) for causing build bustages on nsHTTPCompressConv.h. CLOSED TREE 2021-06-04 13:53:37 +03:00
Valentin Gosu 98146ae90b Bug 1714307 - Autofix static-analysis warnings in netwerk/ r=necko-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D116701
2021-06-04 10:00:55 +00:00
Kershaw Chang e412a4f3bf Bug 1662676 - Wrap CacheIndexRecord, r=necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D113112
2021-05-17 21:16:33 +00:00
Dorel Luca 241907c8fc Backed out changeset dc1a00f252c8 (bug 1662676) for cpp failures in CacheIndexRecordWrapper. CLOSED TREE 2021-05-17 18:13:14 +03:00
Kershaw Chang f5dce82d78 Bug 1662676 - Wrap CacheIndexRecord, r=necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D113112
2021-05-17 13:55:45 +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 9e4bdb9c25 Bug 1694662 - Remove old cache implementation r=necko-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D106456
2021-04-30 07:20:24 +00:00
Valentin Gosu 5afdc02366 Bug 1694662 - Remove Appcachestorage & oldwrappers r=necko-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D106455
2021-04-30 07:20:24 +00:00
Valentin Gosu e99e05a205 Bug 1694662 - Remove appcache storage attribute r=necko-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D106454
2021-04-30 07:20:23 +00:00
Valentin Gosu 125e29a561 Bug 1694662 - Remove nsApplicationCacheService component r=necko-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D106452
2021-04-30 07:20:23 +00:00
Valentin Gosu e744992067 Bug 1694662 - Remove appcache arg from nsICacheEntryOpenCallback r=necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D106438
2021-04-30 07:20:17 +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 15d3d060cf Bug 1184468 - Use nsTHashtable::Keys where possible in netwerk. r=necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D106950
2021-03-24 17:51:12 +00:00
Csoregi Natalia f54ee076ae Backed out 13 changesets (bug 708901, bug 1184468) for causing build bustage on GeckoViewHistory.cpp. CLOSED TREE
Backed out changeset b1e4c01e63b8 (bug 708901)
Backed out changeset 37b52cce83c0 (bug 708901)
Backed out changeset eee75f33f060 (bug 708901)
Backed out changeset 479bf64c7986 (bug 708901)
Backed out changeset 15a8fb94d15d (bug 708901)
Backed out changeset be31ccd9a61d (bug 708901)
Backed out changeset fc54f4eaedd5 (bug 708901)
Backed out changeset 03c3a56c3d13 (bug 708901)
Backed out changeset 73f11d3c1298 (bug 708901)
Backed out changeset aed22fd80893 (bug 708901)
Backed out changeset 74d8249fbe7e (bug 708901)
Backed out changeset acb725eb3c1d (bug 1184468)
Backed out changeset 70f3ea6efec4 (bug 1184468)
2021-03-24 19:26:20 +02:00
Simon Giesecke 8aaa3daac8 Bug 1184468 - Use nsTHashtable::Keys where possible in netwerk. r=necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D106950
2021-03-24 16:58:57 +00:00
Simon Giesecke b9621d6376 Bug 1695162 - Use range-based for instead of custom hashtable iterators. r=xpcom-reviewers,kmag
Differential Revision: https://phabricator.services.mozilla.com/D108585
2021-03-17 15:49:46 +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 318303d8e8 Bug 1662676 - Add diagnostic assertion at more places r=necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D106939
2021-03-09 08:35:45 +00:00
Simon Giesecke b5855b89fc Bug 1634281 - Remove unused nsDataHashtable.h includes. r=xpcom-reviewers,nika
Differential Revision: https://phabricator.services.mozilla.com/D106007
2021-03-03 08:58:52 +00:00
Simon Giesecke 0b443059fd Bug 1693306 - Simplify some uses of LookupOrInsertWith by GetOrInsertNew. r=xpcom-reviewers,necko-reviewers,dragana,nika
Differential Revision: https://phabricator.services.mozilla.com/D105479
2021-02-26 09:22:54 +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
Simon Giesecke 4f75368dcb Bug 1691913 - Rename nsBaseHashtable::GetOrInsert(With) to LookupOrInsert(With). r=xpcom-reviewers,necko-reviewers,jgilbert,dragana,nika
The functions should be called "Lookup" rather than "Get" because they return
a DataType& (rather than UserDataType).

Differential Revision: https://phabricator.services.mozilla.com/D105472
2021-02-26 09:11:45 +00:00
Simon Giesecke 661e25bf09 Bug 1692880 - Make Put accept DataType instead of wrapping UserDataType. r=xpcom-reviewers,necko-reviewers,nika
Differential Revision: https://phabricator.services.mozilla.com/D104850
2021-02-16 15:53:33 +00:00
Gerald Squelart 2416d881e2 Bug 1691589 - Reduce reliance on GeckoProfiler.h when only labels (and maybe markers) are needed - r=necko-reviewers,geckoview-reviewers,sg,agi,florian
There are no code changes, only #include changes.
It was a fairly mechanical process: Search for all "AUTO_PROFILER_LABEL", and in each file, if only labels are used, convert "GeckoProfiler.h" into "ProfilerLabels.h" (or just add that last one where needed).
In some files, there were also some marker calls but no other profiler-related calls, in these cases "GeckoProfiler.h" was replaced with both "ProfilerLabels.h" and "ProfilerMarkers.h", which still helps in reducing the use of the all-encompassing "GeckoProfiler.h".

Differential Revision: https://phabricator.services.mozilla.com/D104588
2021-02-16 04:44:19 +00:00
Simon Giesecke 780a1636a9 Bug 1691894 - Replace several suboptimal uses of Put after Get by GetOrInsertWith or WithEntryHandle. r=xpcom-reviewers,necko-reviewers,kmag,valentin,geckoview-reviewers,agi
Differential Revision: https://phabricator.services.mozilla.com/D104849
2021-02-15 15:12:17 +00:00
smolnar 1afbbe67e1 Backed out 5 changesets (bug 1691894) for causing hazard failures in nsXULPrototypeCache. CLOSED TREE
Backed out changeset 22dc870ee609 (bug 1691894)
Backed out changeset 58c31e9d6ae3 (bug 1691894)
Backed out changeset 7483e84149d8 (bug 1691894)
Backed out changeset f977d6cfa973 (bug 1691894)
Backed out changeset db4503476f34 (bug 1691894)
2021-02-15 16:43:23 +02:00
Simon Giesecke 3c29a68440 Bug 1691894 - Make Put accept DataType instead of wrapping UserDataType. r=xpcom-reviewers,necko-reviewers,nika
Differential Revision: https://phabricator.services.mozilla.com/D104850
2021-02-15 10:04:46 +00:00
Simon Giesecke 8973094ec1 Bug 1691894 - Replace several suboptimal uses of Put after Get by GetOrInsertWith or WithEntryHandle. r=xpcom-reviewers,necko-reviewers,kmag,valentin,geckoview-reviewers,agi
Differential Revision: https://phabricator.services.mozilla.com/D104849
2021-02-15 10:04:45 +00:00
Alexis Beingessner 316b5113e0 Bug 1633239 - make the bitfields on CacheStorageService atomic. r=valentin,necko-reviewers
this is only a hypothetical fix to the underlying issue since we don't have a clean trace.

Differential Revision: https://phabricator.services.mozilla.com/D103057
2021-01-28 11:05:02 +00:00
David Major bc943f076f Bug 1688292 - Fix non-unified build errors in netwerk/cache2/ r=necko-reviewers,valentin
This is a drive-by fix while I was looking into something else.

Differential Revision: https://phabricator.services.mozilla.com/D102795
2021-01-25 12:23:13 +00:00
Alexis Beingessner 6cf6d9fd33 Bug 1682948 - properly hold the CacheEntry's lock when accessing mPinned. r=necko-reviewers,dragana,decoder
Differential Revision: https://phabricator.services.mozilla.com/D100248
2021-01-18 13:55:30 +00:00
Deepali Garg 4ca397e7fd Bug 1684637 - CacheFile.cpp: do not use 'else' after 'return' r=necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D101749
2021-01-15 13:14:02 +00:00
Masatoshi Kimura 22723674f7 Bug 1684110 - Stop using some 'A'-functions in netwerk/. r=necko-reviewers,kershaw
Depends on D100466

Differential Revision: https://phabricator.services.mozilla.com/D100467
2021-01-04 20:34:50 +00:00
Kershaw Chang 0eebf69d04 Bug 1662676 r=necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D99680
2020-12-22 16:44:36 +00:00
Butkovits Atila d25ca898cd Backed out changeset 9b4ab01fda40 (bug 1662676) for gv-junit failures. CLOSED TREE 2020-12-21 20:20:04 +02:00
Kershaw Chang 1c40c3d129 Bug 1662676 r=necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D99680
2020-12-21 15:19:46 +00:00
Alexis Beingessner 53ac8f1b86 Bug 1682932 - ensure sAutoMemoryCacheCapacity is properly synchronized. r=valentin,necko-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D100027
2020-12-17 17:16:14 +00:00
Simon Giesecke 78678eab21 Bug 1679987 - Implement nsTSubstring::Split using nsTokenizedRange. r=xpcom-reviewers,necko-reviewers,nika
nsTSubstring::Split used to heap-allocate an array to store all tokens.
However, most uses of Split just use it to iterate in a range-based for loop.
The few remaining uses also don't need to iterate multiple times over all
tokens, so it's better to just use nsTokenizedRange, which tokenizes lazily.

Differential Revision: https://phabricator.services.mozilla.com/D99234
2020-12-17 12:36:47 +00:00