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
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
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
70c9b7ef2c
Bug 1681546 - rename MOZ_ATOMIC_BITFIELDS methods to Load/Store. r=valentin,necko-reviewers
...
I was running into issues where these names would conflict with the type's own Get/Set methods
and these names have the added benefit of indicating a bit more that atomic stuff is going on.
Differential Revision: https://phabricator.services.mozilla.com/D99268
2020-12-09 18:14:55 +00:00
Alexis Beingessner
137f4e977f
Bug 1670982 - Make the bitflags in CacheStorageService actually atomic. r=decoder,necko-reviewers,dragana,valentin
...
TSan found races on these flags that are ostensibly benign but this way there's no UB.
This code is a bit weird. These bitfields are seemingly pointless as
they're squeezed between a uint64_t and an Atomic<bool>. There's plenty
of space for 2 more bools there.
Also the Atomic<bool> could theoretically be merged into the flags. For
now, here's the version of this patch that preserves the semantics of
this code as closely as possible, for review by the code owners.
Differential Revision: https://phabricator.services.mozilla.com/D93416
2020-12-08 16:56:23 +00:00
Bogdan Tara
f121ad11ea
Backed out 2 changesets (bug 1670982) for tsan xpc shell failures CLOSED TREE
...
Backed out changeset 3ce1e8c65cbc (bug 1670982 )
Backed out changeset e7211a44d968 (bug 1670982 )
2020-12-08 01:59:32 +02:00
Alexis Beingessner
d9f9c2427e
Bug 1670982 - Make the bitflags in CacheStorageService actually atomic. r=decoder,necko-reviewers,dragana,valentin
...
TSan found races on these flags that are ostensibly benign but this way there's no UB.
This code is a bit weird. These bitfields are seemingly pointless as
they're squeezed between a uint64_t and an Atomic<bool>. There's plenty
of space for 2 more bools there.
Also the Atomic<bool> could theoretically be merged into the flags. For
now, here's the version of this patch that preserves the semantics of
this code as closely as possible, for review by the code owners.
Differential Revision: https://phabricator.services.mozilla.com/D93416
2020-12-07 18:32:51 +00:00
Simon Giesecke
de7bab0f06
Bug 1650145 - Replace all value uses of Empty[C]String by 0-length _ns literals. r=froydnj,geckoview-reviewers,agi
...
Differential Revision: https://phabricator.services.mozilla.com/D82325
2020-09-23 15:17:15 +00:00
Honza Bambas
a14447a33a
Bug 1642602 - Make about:cache show all entries, remove the no longer usable context switch UI, r=michal,necko-reviewers
...
Differential Revision: https://phabricator.services.mozilla.com/D81885
2020-07-03 11:41:53 +00:00
Simon Giesecke
cd8b8939b9
Bug 1648010 - Replace uses of NS_LITERAL_STRING/NS_LITERAL_CSTRING macros by _ns literals. r=geckoview-reviewers,jgilbert,agi,hsivonen,froydnj
...
Differential Revision: https://phabricator.services.mozilla.com/D80860
2020-07-01 08:29:29 +00:00
Honza Bambas
0aefd3e956
Bug 1487101 - Do not interrupt purging of HTTP cache entries from memory by frecency until the pool containts at most 2000 entries, r=michal,necko-reviewers
...
Differential Revision: https://phabricator.services.mozilla.com/D80180
2020-06-19 05:43:42 +00:00
Honza Bambas
4f360112b6
Bug 1626809 - Sanitize HTTP disk cache storage context key to prevent leak of private data like URLs, r=njn
...
Differential Revision: https://phabricator.services.mozilla.com/D69625
--HG--
extra : moz-landing-system : lando
2020-04-09 12:38:09 +00:00
Simon Giesecke
aaf6cb4e75
Bug 1617628 - Hide nsBaseHashtable Put overloads in nsRefPtrHashtable subclass. r=froydnj
...
Differential Revision: https://phabricator.services.mozilla.com/D63899
--HG--
extra : moz-landing-system : lando
2020-02-25 17:03:36 +00:00
Michal Novotny
5cd74804aa
Bug 1614637 - ThreadSanitizer: data race [@ assign_assuming_AddRef] vs. [@ operator bool] in CacheStorageService r=mayhemer
...
Differential Revision: https://phabricator.services.mozilla.com/D62550
--HG--
extra : moz-landing-system : lando
2020-02-17 18:44:21 +00:00
Mihai Alexandru Michis
31990b30b7
Backed out changeset 4758bb49e763 (bug 1614637) for causing multiple failures.
...
CLOSED TREE
2020-02-12 17:04:50 +02:00
Michal Novotny
b1f514bcc7
Bug 1614637 - ThreadSanitizer: data race [@ assign_assuming_AddRef] vs. [@ operator bool] in CacheStorageService r=mayhemer
...
Differential Revision: https://phabricator.services.mozilla.com/D62550
--HG--
extra : moz-landing-system : lando
2020-02-12 13:55:15 +00:00
Eric Rahm
78ee6675cf
Bug 1606187 - Part 2b: Update users of nsClassHashtable to handle UniquePtr differences r=KrisWright,froydnj
...
Differential Revision: https://phabricator.services.mozilla.com/D59042
--HG--
extra : moz-landing-system : lando
2020-01-13 19:18:56 +00:00
Chris Peterson
406763af7f
Bug 1570499 - Part 1: Replace MOZ_FALLTHROUGH macro with C++17's [[fallthrough]] attribute. r=froydnj
...
This changeset is a simple find and replace of `MOZ_FALLTHROUGH` and `[[fallthrough]]`.
Unfortunately, the MOZ_FALLTHROUGH_ASSERT macro (to assert on case fallthrough in debug builds) is still necessary after switching from [[clang::fallthrough]] to [[fallthrough]] because:
* MOZ_ASSERT(false) followed by [[fallthrough]] triggers a -Wunreachable-code warning in DEBUG builds
* but MOZ_ASSERT(false) without [[fallthrough]] triggers a -Wimplicit-fallthrough warning in NDEBUG builds.
Differential Revision: https://phabricator.services.mozilla.com/D56440
--HG--
extra : moz-landing-system : lando
2019-12-20 07:16:43 +00:00
Tom Tung
dcf0aeb0a2
Bug 1474608 - P2 - Clear origin attributes data directly on cache2; r=asuth,michal,baku
...
Differential Revision: https://phabricator.services.mozilla.com/D34324
--HG--
extra : moz-landing-system : lando
2019-12-02 19:47:05 +00:00
Andrea Marchesini
000c5d8a75
Bug 1320404 - Remove appId from origin attributes - part 4 - necko, r=valentin
...
Differential Revision: https://phabricator.services.mozilla.com/D29356
--HG--
extra : moz-landing-system : lando
2019-05-03 17:14:23 +00:00
Bogdan Tara
386d23bfe7
Backed out 4 changesets (bug 1320404) for test_permmanager_load_invalid_entries.js failures
...
Backed out changeset 7c2f4e64d38e (bug 1320404)
Backed out changeset a7e7c0251179 (bug 1320404)
Backed out changeset dd741b25a244 (bug 1320404)
Backed out changeset de9073c57d20 (bug 1320404)
2019-05-03 06:12:25 +03:00
Andrea Marchesini
3621968eed
Bug 1320404 - Remove appId from origin attributes - part 4 - necko, r=valentin
...
Differential Revision: https://phabricator.services.mozilla.com/D29356
--HG--
extra : moz-landing-system : lando
2019-05-02 17:25:05 +00:00
Cosmin Sabou
a884fb99d8
Backed out 4 changesets (bug 1320404) for xperf failures on permissions.sqlite-journal.
...
Backed out changeset fbacf18b6532 (bug 1320404)
Backed out changeset fed7c475d75c (bug 1320404)
Backed out changeset 557b586f774a (bug 1320404)
Backed out changeset 5a20b5f43280 (bug 1320404)
2019-05-02 04:51:18 +03:00
Andrea Marchesini
7a0fabb9f6
Bug 1320404 - Remove appId from origin attributes - part 4 - necko, r=valentin
...
Differential Revision: https://phabricator.services.mozilla.com/D29356
--HG--
extra : moz-landing-system : lando
2019-05-01 23:21:19 +00:00
Sylvestre Ledru
ef0bfc3822
Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan
...
# ignore-this-changeset
Differential Revision: https://phabricator.services.mozilla.com/D24168
--HG--
extra : moz-landing-system : lando
2019-03-31 15:12:55 +00:00
Honza Bambas
5ffebc7b88
Bug 1536387 - Append a regular HTTP cache key tag of value 0x7f to distinguish memory-only entries, r=michal
...
Differential Revision: https://phabricator.services.mozilla.com/D24170
--HG--
extra : moz-landing-system : lando
2019-03-20 13:54:57 +00:00
Michal Novotny
f0e2bfb56c
Bug 1479357 - Specific values for browser.cache.disk.capacity do break the cache, r=mayhemer
...
This patch changes all size limits in CacheObserver to kilobytes. The same unit is used at most places when checking these limits. This avoids uint32_t overflow when converting to bytes and back.
2019-01-08 16:28:00 +02:00
Sylvestre Ledru
265e672179
Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
...
# ignore-this-changeset
--HG--
extra : amend_source : 4d301d3b0b8711c4692392aa76088ba7fd7d1022
2018-11-30 11:46:48 +01:00
Gabriele Svelto
266ef73c96
Bug 1503207 - Remove nsWeakPtr.h and cleanup all files including weak reference-related headers r=froydnj
...
Differential Revision: https://phabricator.services.mozilla.com/D10251
--HG--
extra : moz-landing-system : lando
2018-10-31 20:39:03 +00:00
Andrea Marchesini
28962b5168
Bug 1468501 - Implement a way to delete network cache by nsIPrincipal, r=mayhemer, r=michal
2018-07-20 13:57:18 +02:00
Andi-Bogdan Postelnicu
90ac230485
Bug 1453795 - Necko - Initialize member fields in classes/ structures. r=michal
2018-06-14 11:19:07 +03:00
Andi-Bogdan Postelnicu
3f2298c2f6
Bug 1457411 - Update netwerk module to make use of newer methods introduced with c++11 and c++14. r=valentin
...
MozReview-Commit-ID: 666LNaHyiuQ
--HG--
extra : rebase_source : f3a24e0342d8dcdf9020dd473bc6b1045cbc533b
2018-04-30 19:46:04 +03:00
Sebastian Hengst
0819f35e51
Backed out 4 changesets (bug 525063) on request from Andi. a=backout
...
Backed out changeset 516c4fb1e4b8 (bug 525063)
Backed out changeset 6ff8aaef2866 (bug 525063)
Backed out changeset bf13e4103150 (bug 525063)
Backed out changeset d7d2f08e051c (bug 525063)
2018-04-13 16:01:28 +03:00
Tristan Bourvon
a3a77c0312
Bug 525063 - Initialize uninitialized class attributes in m-c. r=ehsan
2018-04-10 21:11:02 +02:00
Honza Bambas
951c3c0c9e
Bug 1441726 - Include CacheStorageService::mPurgeTimeStamps hashtable in the memory reporter. r=michal
2018-03-27 10:21:00 +03:00
Valentin Gosu
13f4c5ecaf
Bug 1408552 - Make sure we only instantiate CacheStorageService in the main process r=mayhemer
...
* A memory leak occurs when this happens in the content process
* I added an assertion that we only create it in the parent process
MozReview-Commit-ID: 1UTyusRg0qx
--HG--
extra : rebase_source : 400cfb21ee094ad33e15681f213af6dbe20ebbf5
2017-10-18 21:10:22 +02:00
Sebastian Hengst
538797050e
Backed out changeset dfb238189002 (bug 1408552) for asserting in xpcshell's netwerk/test/unit_ipc/test_cache-entry-id_wrap.js. r=backout on a CLOSED TREE
2017-10-18 15:56:09 +02:00
Valentin Gosu
ec70ea390d
Bug 1408552 - Make sure we only instantiate CacheStorageService in the main process r=mayhemer
...
* A memory leak occurs when this happens in the content process
* I added an assertion that we only create it in the parent process
MozReview-Commit-ID: 1UTyusRg0qx
--HG--
extra : rebase_source : 646c1c82d141cadc6c1b19843b4cc750e1a1ce59
2017-10-18 14:35:33 +02:00
Kris Maglione
d1f06996d7
Bug 1404198: Part 2c - Switch to NS_NewTimer* in necko. r=njn
...
MozReview-Commit-ID: 3YyyaBAEjHc
--HG--
extra : rebase_source : 8ea5a8adb4d134ae15041f86f0b185603ab9a989
2017-10-15 23:12:02 -07:00
Valentin Gosu
df4b6f9baf
Bug 1395938 - Prevent crash when we are missing an IOThread during shutdown r=michal
...
MozReview-Commit-ID: 4iuMoHMTzia
2017-09-07 15:15:25 +02:00
Michal Novotny
8030ac3f2d
Bug 1382688 - Do not allow to enable old disk cache backend, r=honzab
2017-08-24 10:25:38 +02:00
Carsten "Tomcat" Book
d360d49d2a
merge mozilla-inbound to mozilla-central a=merge
2017-07-27 10:57:25 +02:00
Bevis Tseng
95b18d794e
Bug 1382172 - Name nsITimerCallback instances in native implementation. r=billm
...
--HG--
extra : rebase_source : 84de1abfcc30a6964144c2e6718a508c71027b65
2017-07-27 02:18:20 +08:00