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

571 Коммитов

Автор SHA1 Сообщение Дата
Valentin Gosu 7937c7c4cc Bug 1476928 - Remove nsIURI.CloneIgnoringRef and nsIURI.CloneWithNewRef r=JuniorHsu
The patch introduces NS_GetURIWithNewRef and NS_GetURIWithNewRef which perform the same function.

Differential Revision: https://phabricator.services.mozilla.com/D2239

--HG--
extra : moz-landing-system : lando
2018-07-23 11:28:47 +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
Sylvestre Ledru b4f411b274 Bug 1472945 - Remove some deadcode introduced by bug 1470355 r=valentin
MozReview-Commit-ID: 46IcpU2uw5o

--HG--
extra : rebase_source : 325bb7d66519376858c250626cfc0cffff98a88f
2018-07-03 10:38:46 +02:00
Michal Novotny 92e0c48aaf Bug 1470355 - Firefox is unresponsive when visiting https://www.youtube.com/premium, r=valentin
This patch avoids returning NS_BASE_STREAM_WOULD_BLOCK from CacheFileInputStream::ReadSegments when it was called with aCount=0.
2018-07-02 00:26:00 +03:00
Dorel Luca 9a50b6f6de Backed out 2 changesets (bug 1470355) for causing multiple failures
Backed out changeset 50b0bfa64b2c (bug 1470355)
Backed out changeset 198a4644c09a (bug 1470355)

--HG--
extra : amend_source : 10f20801a4e72fec17d53f6428d1c983a908a771
2018-07-02 15:06:11 +03:00
Michal Novotny dd9505228b Bug 1470355 - Firefox is unresponsive when visiting https://www.youtube.com/premium, r=valentin
This patch avoids returning NS_BASE_STREAM_WOULD_BLOCK from CacheFileInputStream::ReadSegments when it was called with aCount=0.
2018-07-02 00:26:00 +03:00
Chris Peterson 2afd829d0f Bug 1469769 - Part 6: Replace non-failing NS_NOTREACHED with MOZ_ASSERT_UNREACHABLE. r=froydnj
This patch is an automatic replacement of s/NS_NOTREACHED/MOZ_ASSERT_UNREACHABLE/. Reindenting long lines and whitespace fixups follow in patch 6b.

MozReview-Commit-ID: 5UQVHElSpCr

--HG--
extra : rebase_source : 4c1b2fc32b269342f07639266b64941e2270e9c4
extra : source : 907543f6eae716f23a6de52b1ffb1c82908d158a
2018-06-17 22:43:11 -07:00
Andi-Bogdan Postelnicu 90ac230485 Bug 1453795 - Necko - Initialize member fields in classes/ structures. r=michal 2018-06-14 11:19:07 +03:00
Emilio Cobos Álvarez fffb25b74f Bug 1465585: Switch from mozilla::Move to std::move. r=froydnj
This was done automatically replacing:

  s/mozilla::Move/std::move/
  s/ Move(/ std::move(/
  s/(Move(/(std::move(/

Removing the 'using mozilla::Move;' lines.

And then with a few manual fixups, see the bug for the split series..

MozReview-Commit-ID: Jxze3adipUh
2018-06-01 10:45:27 +02:00
Michal Novotny 574a724d01 Bug 1457084 - Increase max chunk memory usage limit, r=mayhemer
We can hit the limit very easily when writing javascript bytecode as alternative data to the cache entry because all data is written at once but CacheFileOutputStream splits it into chunks which are then written on a backgound thread. 40MB was chosen because bytecode is usually 4x-10x larger than the original data, so it can occupy most of the cache entry which is limited to 50MB.
2018-05-23 05:03:00 +03:00
Michal Novotny f9b87f1b40 Bug 1456871 - Consider increasing disk cache size, r=mayhemer
The patch changes default cache size on desktop and mobile. The smart cache size calculation is changed to grow faster. It also introduces a cache size limit for users who have enabled clearing cache on shutdown, which should reduce number of shutdown crashes (bug 1356853).
2018-05-22 14:14:00 +03:00
Kris Maglione 6b12d08f7d Bug 1462937: Update callers to use nsIFile::GetDirectoryEntries as a nsIDirectoryEnumerator. r=froydnj
MozReview-Commit-ID: Iv4T1MVAF5

--HG--
extra : rebase_source : 1c518883d082884db7f9323a5acc20361228c26b
extra : histedit_source : 70a73c23d1199d3bfbb5379c78930401166c094b
2018-05-19 20:17:45 -07:00
Chris Peterson 71422dcaa9 Bug 1457813 - Part 2: Replace non-asserting NS_PRECONDITIONs with MOZ_ASSERTs. r=froydnj
s/NS_PRECONDITION/MOZ_ASSERT/ and reindent

MozReview-Commit-ID: KuUsnVe2h8L

--HG--
extra : source : c14655ab3df2c9b1465dd8102b9d25683359a37b
2018-04-28 12:50:58 -07: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
Michal Novotny ee8f43208a Bug 1448476 - Cache entry corruption after writing the alternate data. r=honzab
When writing to alt-data output stream fails for whatever reason, we now try to
truncate alternative data and keep the original data instead of dooming the
whole entry. The patch also changes how is the predicted size passed to the
cache. Instead of a dedicated method it's now an argument of openOutputStream
and openAlternativeOutputStream methods which fail in case the entry would
exceed the allowed limit.
2018-04-25 07:01:00 +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
Nika Layzell 0c3ba13e4c Bug 1437167 - Part 1: Stop using PRIntervalTime as the argument to CondVar::Wait and Monitor::Wait, r=mstange, r=froydnj 2018-04-10 17:49:47 -04:00
Honza Bambas 951c3c0c9e Bug 1441726 - Include CacheStorageService::mPurgeTimeStamps hashtable in the memory reporter. r=michal 2018-03-27 10:21:00 +03:00
Miko Mynttinen 65c6bee9d6 Bug 1445302 - Replace TArray.RemoveElementAt(TArray.Length() - 1) pattern with TArray.RemoveLastElement() or TArray.PopLastElement() r=froydnj
MozReview-Commit-ID: rGjabnP2iz

--HG--
extra : rebase_source : 1ef6c5ce028ac9ebd9f3176d57835c43fe46bada
2018-03-13 14:51:33 +01:00
Tom Ritter 9c3d32ebab Bug 1444490 Declare classses (and one method) in network/ final to reduce virtual function calls r=nwgh
MozReview-Commit-ID: 4oaazbPhpbc

--HG--
extra : rebase_source : 7c01066363605c64fc76332686b2c4d9c2af6518
2018-03-09 08:37:18 -06:00
Nathan Froyd d260382328 Bug 1443900 - don't allocate nsCStrings when doing integer parsing; r=michal
There's no need to allocate a completely new nsCString when all we want
to do is parse a character string into an integer.  We can allocate a
dependent string instead, which will avoid some memory churn.
2018-03-08 09:43:00 -05:00
Cosmin Sabou ed1b2a8736 Backed out 4 changesets (bug 1437167) for build bustages on nsUpdateDriver.cpp and WindowsMessageLoop.cpp on a CLOSED TREE.
Backed out changeset b98740e7c639 (bug 1437167)
Backed out changeset 4476e8f51fa6 (bug 1437167)
Backed out changeset c79dc40faa41 (bug 1437167)
Backed out changeset b608d2dcbb86 (bug 1437167)
2018-03-06 00:09:46 +02:00
Nika Layzell 262be91f75 Bug 1437167 - Part 1: Stop using PRIntervalTime as the argument to CondVar::Wait and Monitor::Wait, r=mstange, r=froydnj
MozReview-Commit-ID: BN18I8Q6c7S
2018-03-05 16:00:00 -05:00
Boris Zbarsky 9bdcffc985 Bug 1436902 part 3. Replace usage of NS_IMPL_ISUPPORTS_INHERITED0 with NS_INLINE_DECL_REFCOUNTING_INHERITED when possible. r=mccr8
The change to RootAccessible.cpp fixes an obvious bug introduced in bug 741707.

The visibility changes in gfx/thebes are because NS_DECL_ISUPPORTS has a
trailing "public:" that those classes were relying on to have public
constructors.

MozReview-Commit-ID: IeB8KIJCGhU
2018-02-12 15:44:40 -05:00
Nathan Froyd 0f56acaf26 Bug 1437604 - remove NS_INTERFACE_MAP_END_THREADSAFE; r=mystor
This macro is identical to NS_INTERFACE_MAP_END and encourages the
reader to think that there's something extra-special threadsafe about QI
implementations that use the macro, when in reality there's nothing of
the sort.
2018-02-12 14:36:46 -05:00
Honza Bambas cf147a770a Bug 1437058 - Add LOG for CacheEntryHandle::~CacheEntryHandle to track its lifetime correctly, r=michal 2018-02-09 07:19:00 +02:00
Masatoshi Kimura 32bbccbd78 Bug 685236 - Stop using GetNativePath in netwerk/. r=mayhemer
MozReview-Commit-ID: JdHhXPiS0fv

--HG--
extra : source : ef77ec8c110852b74e251c28753467a79bad7d2a
extra : intermediate-source : 7e5b9d09196916daac73b23c58c6fe870f223970
2017-12-15 20:21:19 +09:00
Michal Novotny 4188a83001 Bug 1412320 - CacheIndex::~CacheIndex is called outside CacheIndex::sLock. r=honzab
We must close cache iterators before shutting down CacheIndex because they hold reference to CacheIndex which causes that CacheIndex is not destroyed when it's dereferenced in CacheIndex::Shutdown.

--HG--
extra : amend_source : d74243f4eb4f4073ecc72ac9b331091456a91504
2018-01-18 07:14:00 -05:00
Michal Novotny 8af453aa79 Bug 1418028 - UBSan: null pointer passed to memcpy in CacheFileMetadata::WriteMetadata. r=honzab
--HG--
extra : amend_source : a88ab6e916c2d41696f6201e3d92cb6db2ce15c4
2018-01-18 07:50:00 -05:00
Honza Bambas 5d0de25dc2 Bug 1430197 - Remove the HTTP cache half-live experiment, r=michal 2018-01-12 11:51:00 +02:00
Chris Peterson 37efe4d0e6 Bug 1428535 - Add missing override specifiers to overridden virtual functions. r=froydnj
MozReview-Commit-ID: DCPTnyBooIe

--HG--
extra : rebase_source : cfec2d96faeb11656d86d760a34e0a04cacddb13
extra : intermediate-source : 6176724d63788b0fe8caa3f91607c2d93dbaa7ec
extra : source : eebbb0600447f9b64aae3bcd47b4be66c02a51ea
2017-11-05 19:37:28 -08:00
Sylvestre Ledru 9bfe27d903 Bug 1394734 - Replace CONFIG['GNU_C*'] by CONFIG['CC_TYPE'] r=glandium
MozReview-Commit-ID: 7duJk2gSd4m

--HG--
extra : rebase_source : 7312fe276e561e8c034a5f6749774ae812727f9c
2017-12-07 22:09:15 +01:00
Honza Bambas 3fa9ca21fd Bug 1416682 - Add nsICacheEntry.drop() to explicitly release HTTP cache entries from channels to avoid logical deadlocks, r=michal 2017-11-30 12:03:00 +02:00
Nicholas Nethercote f553c82da0 Bug 1416638 - Add a PrefValueKind arg to Preferences::Get*(), and remove Preferences::GetDefault*(). r=glandium
MozReview-Commit-ID: LgnZAf1pAl1

--HG--
extra : rebase_source : 8ba7c4bfb331f70fd41c2ae1d428e4cb9058d069
2017-11-14 19:06:01 +11:00
Michal Novotny 39802915f7 Bug 1414046 - Skip copying mHashArray in CacheFileMetadata::WriteMetadata if it's empty. r=valentin 2017-11-03 03:17:00 -04:00
Tom Schuster b2bd1f0d80 Bug 1410620 - Change CacheInfo interfaces in network to use ACString. r=michal,froydnj 2017-10-29 12:19:48 +01:00
Sylvestre Ledru d60d69e2cb Bug 1411001 - Remove the +x permissions on cpp & h files r=froydnj
MozReview-Commit-ID: DjDkL20wRg0

--HG--
extra : rebase_source : a343d83d1f4e97e4ba56d0f57fec93079df0b5ea
2017-10-23 20:59:55 +02: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
Ho-Pang Hsu f56a0fb03f Bug 1395202 - Part 1: Create nsICacheEntry::CacheEntryId. r=michal, f=junior,mayhemer 2017-10-10 04:09:00 -04:00
Sebastian Hengst 99c7358944 Backed out changeset 0e5484914609 (bug 1395202) for build bustage at netwerk/protocol/http/HttpChannelParent.cpp:1523: 'class mozilla::net::HttpBaseChannel' has no member named 'GetCacheEntryId'. r=backout on a CLOSED TREE 2017-10-10 15:43:13 +02:00
Ho-Pang Hsu 432321ac7c Bug 1395202 - Part 1: Create nsICacheEntry::CacheEntryId. r=michal, f=junior,mayhemer 2017-10-10 04:09:00 -04:00
Michal Novotny a60970a6a1 Bug 1403010 - Crash due to race condition in CacheFileMetadata::SizeOfExcludingThis when reading or writing metadata, r=valentin 2017-10-03 16:49:39 +02:00
Michal Novotny d3a3055806 Bug 1401224 - Do not call aWriter with no data in CacheFileInputStream::ReadSegments, r=valentin 2017-10-03 16:48:16 +02:00
Shih-Chiang Chien 10b963a865 Bug 1372065 - fix cppcheck linter error in Necko. r=jduell
For netwerk/cache2/CacheFileInputStream.cpp:148 and netwerk/protocol/http/nsHttpHeaderArray.cpp:358,
missing "()" in the if statement.

For netwerk/base/rust-url-capi/test/test.cpp:29, netwerk/streamconv/converters/nsHTTPCompressConv.cpp:297,
and netwerk/streamconv/converters/nsHTTPCompressConv.cpp:300, null pointer will be returned but the
original memory buffer will not be freed if |realloc| fails.  We should remember the original memory
buffer and free it if error is detected.

MozReview-Commit-ID: 2ggXsL73jYV

--HG--
extra : rebase_source : e47e41f2b37f717207bd13990efead22a14db1c0
2017-06-12 11:51:26 +08: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
Tom Ritter d06bc69178 Bug 1392642 Remove unused variables in netwerk/ to silence warnings r=bagder,nwgh
MozReview-Commit-ID: LLTB5RJ4ZMz

--HG--
extra : rebase_source : 26a94bce6e9a3f22542d04e9930ff74eddd1f7ca
2017-08-24 12:03:19 -05:00