Commit Graph

108 Commits

Author SHA1 Message Date
Michal Novotny
3406185cbc Bug 1350256 - Handle null entry values more gracefully. r=mayhemer
--HG--
extra : rebase_source : 57b10e0a70829d511a816dd9f17ce000f872329f
2017-04-15 04:49:00 -04:00
Valentin Gosu
223b5464d4 Bug 1325341 - Query the cache index to get if the entry has alt data and its fileSize r=michal
MozReview-Commit-ID: 6wqsexqJq3u
2017-04-10 14:22:23 +03:00
Junior Hsu
6dc5f1d10e Bug 1325088 - Part 1: Add net-response-time-onstart/onstop to cache index. r=michal
--HG--
extra : rebase_source : 76b3365ffccc170287be04678dc29227a2fc88ca
2017-03-28 11:40:21 +08:00
Junior Hsu
8fc810c5c9 Bug 1325091 - Add flag indicating presence of alternative data in the cache entry to cache index. r=michal 2017-03-06 18:21:59 +08:00
Tom Tromey
5f8f360823 Bug 1060419 - make log_print use Printf.h, r=froydnj
MozReview-Commit-ID: BIZ1GQEZ1vs

--HG--
extra : rebase_source : 2f1f0aa12493c44f352d9a7e8683e7bb72d2d75b
2016-12-15 20:16:31 -07:00
Tim Huang
4af0ebd9ee Bug 1312954 - part 2: Add a new interface nsICacheStorageService.asyncVisitAllStorages() to allow visiting every cache entry. r=mayhemer 2017-02-02 22:15:00 -05:00
Andrew McCreight
fccb0645ed Bug 1323042 - forbid MOZ_COUNT_{CTOR,DTOR} for nsISupports classes; r=froydnj 2016-12-12 09:27:58 -05:00
Nathan Froyd
826598caba Backout aba6c73511a2 (bug 1307961) for massive test bustage resulting in a CLOSED TREE; r=alltheorange 2016-12-12 08:45:46 -05:00
Andrew McCreight
e31b5489da Bug 1307961 - require consistent bloatview reporting for nsISupports classes; r=froydnj 2016-12-12 07:58:33 -05:00
Michal Novotny
eeff8dadb0 Bug 1320894 - Fixed serialization of cache index, r=valentin 2016-12-02 16:21:35 +01:00
Michal Novotny
2b03d7b575 Bug 1201042 - Update HTTP cache index format to work with OriginAttributes' suffix, r=honzab 2016-11-08 21:11:30 +01:00
Carsten "Tomcat" Book
dbc8d15cba Backed out changeset bd16c2fde4bf (bug 1201042) for bc test failures 2016-11-07 12:58:23 +01:00
Michal Novotny
55b3501a07 Bug 1201042 - Update HTTP cache index format to work with OriginAttributes' suffix, r=honzab 2016-11-07 10:28:46 +01:00
Michal Novotny
9b2bf11843 Bug 1310205 - remove MOZ_ASSERT(entry->mRec->mFrecency == 0 || entry->mRec->mFrecency > mOldFrecency)), r=honzab 2016-10-17 15:39:57 +02:00
Michal Novotny
e700b41079 Bug 1249304 - Optimize sorting of CacheIndex::mFrecencyArray, r=honzab 2016-10-06 11:23:52 +02:00
Michal Novotny
dd304b5d16 Bug 1277826 - Crash in shutdownhang | mozilla::net::CacheIndex::WriteLogToDisk, r=honzab 2016-09-04 02:39:49 +02:00
Kan-Ru Chen
b6d880aca1 Bug 1297276 - Rename mfbt/unused.h to mfbt/Unused.h for consistency. r=froydnj
The patch is generated from following command:

  rgrep -l unused.h|xargs sed -i -e s,mozilla/unused.h,mozilla/Unused.h,

MozReview-Commit-ID: AtLcWApZfES


--HG--
rename : mfbt/unused.h => mfbt/Unused.h
2016-08-24 14:47:04 +08:00
Andrew McCreight
3059107942 Bug 1287623, part 4 - Make CacheIndex::gInstance a StaticRefPtr. r=mayhemer 2016-07-21 09:54:17 -07:00
Wes Kocher
3bba9b339e Backed out 5 changesets (bug 1287623) for static build bustage CLOSED TREE
Backed out changeset a48daec87ec9 (bug 1287623)
Backed out changeset 248153344e15 (bug 1287623)
Backed out changeset 8aa409c9b1ce (bug 1287623)
Backed out changeset 602d4d88e806 (bug 1287623)
Backed out changeset 114da8bdc0b0 (bug 1287623)
2016-07-20 15:40:33 -07:00
Andrew McCreight
54bdb774ad Bug 1287623, part 4 - Make CacheIndex::gInstance a StaticRefPtr. r=mayhemer 2016-07-20 15:19:00 -07:00
Honza Bambas
85e6362a96 Bug 1274585 - Push HTTP cache index build when asked for disk cache size, r=michal 2016-05-30 04:48:00 +02:00
Honza Bambas
a8542b6e9c Bug 1267195 - Correctly update HTTP cache size in UI only after we actually clear the cache. r=michal 2016-05-12 07:57:00 -04:00
Michal Novotny
04256ec318 Bug 1253883 - Do not release mRWBuf until pending read/write operation finishes, r=honzab 2016-05-11 10:48:28 +02:00
Nathan Froyd
08c711b5df Bug 1263197 - part 1 - use temporary variables in CacheIndex logging; r=michal.novotny
Using temporary variables here makes the code a bit clearer by not
repeating the readUint32 call.  A temporary variable also avoids the
compiler complaining about not using the result of readUint32 (which is
a MOZ_MUST_USE function) for the upcoming logging disabling patch.
2016-05-06 09:11:17 -04:00
Kyle Huey
941ab1f522 Bug 1268313: Part 7 - Move NS_NewRunnableMethod and friends to mozilla::NewRunnableMethod. r=froydnj 2016-05-05 01:45:00 -07:00
Carsten "Tomcat" Book
ba3fe0975c Backed out changeset 85ce8cb0639a (bug 1268313)
--HG--
extra : rebase_source : 56d1cf41a2dc4959b67f834e07192a5c772176a8
2016-04-29 14:21:16 +02:00
Kyle Huey
48a594a09e Bug 1268313: Part 7 - Move NS_NewRunnableMethod and friends to mozilla::NewRunnableMethod. r=froydnj 2016-04-28 14:08:25 -07:00
Honza Bambas
de75162c69 Bug 1066970 - Show 'calculating' during HTTP cache cleaning process in preferences window, r=michal 2016-04-05 05:59:00 +02:00
J. Ryan Stinnett
2a55d065b7 Bug 1238160 - Rename OriginAttributes.mInBrowser and associated methods. r=bz,mayhemer
This change renames OriginAttributes.mInBrowser to mInIsolatedMozBrowser and
nsIPrincipal::GetIsInBrowserElement to GetIsInIsolatedMozBrowserElement.  Other
methods that pass these values around also have name changes.

Tokens such as "inBrowser" have previously been serialized into cache keys, used
as DB column names, stored in app registries, etc.  No changes are made to any
serialization formats.  Only runtime method and variable names are updated.

No behavior changes are made in this patch, so some renamed methods may have
nonsensical implementations.  These are corrected in subsequent patches
focused on behavior.

MozReview-Commit-ID: 66HfMlsXFLs
2016-03-02 10:35:56 -06:00
Michal Novotny
83b2b79f9d Bug 1248958 - CacheIndex mRWBuf ownership too fragile, read-after-free, r=honzab 2016-02-18 11:43:20 +01:00
Michal Novotny
5546f7149d Bug 1248389 - Cache index causing CPU loops, r=honzab 2016-02-17 11:47:47 +01:00
Chris Peterson
03f5630fd2 Bug 1235298 - Annotate intentional switch fallthroughs to suppress -Wimplicit-fallthrough warnings in netwerk/. r=mcmanus 2015-11-22 21:58:33 -08:00
Nicholas Nethercote
2e1080a108 Bug 1187134 (part 3) - Replace nsBaseHashtable::Enumerate() calls in netwerk/cache{,2}/ with iterators. r=valentin.
--HG--
extra : rebase_source : c7de2d58545b298f362a042788531fe9e13fc52a
2015-12-03 14:00:02 -08:00
Michal Novotny
4eff3a14a2 Bug 1190951 - TSan: data race netwerk/cache2/CacheIndex.cpp:1397 CacheIndex::IsUpToDate, r=valentin.gosu 2015-11-12 11:07:48 +01:00
Birunthan Mohanathas
9985829ecc Bug 1219392 - Capitalize mozilla::unused to avoid conflicts. r=froydnj 2015-11-02 07:53:26 +02:00
Honza Bambas
8f88fd6cdc Bug 1032254 - Generic way to pin reasource in the HTTP cache, r=michal
* * *
Bug NNNNNNN - message, r=reviewer

--HG--
rename : netwerk/test/unit/test_cache2-28-concurrent_read_resumable_entry_size_zero.js => netwerk/test/unit/test_cache2-29a-concurrent_read_resumable_entry_size_zero.js
rename : netwerk/test/unit/test_cache2-29-concurrent_read_non-resumable_entry_size_zero.js => netwerk/test/unit/test_cache2-29b-concurrent_read_non-resumable_entry_size_zero.js
2015-10-22 12:11:00 +02:00
Nathan Froyd
01583602a9 Bug 1207245 - part 6 - rename nsRefPtr<T> to RefPtr<T>; r=ehsan; a=Tomcat
The bulk of this commit was generated with a script, executed at the top
level of a typical source code checkout.  The only non-machine-generated
part was modifying MFBT's moz.build to reflect the new naming.

CLOSED TREE makes big refactorings like this a piece of cake.

 # The main substitution.
find . -name '*.cpp' -o -name '*.cc' -o -name '*.h' -o -name '*.mm' -o -name '*.idl'| \
    xargs perl -p -i -e '
 s/nsRefPtr\.h/RefPtr\.h/g; # handle includes
 s/nsRefPtr ?</RefPtr</g;   # handle declarations and variables
'

 # Handle a special friend declaration in gfx/layers/AtomicRefCountedWithFinalize.h.
perl -p -i -e 's/::nsRefPtr;/::RefPtr;/' gfx/layers/AtomicRefCountedWithFinalize.h

 # Handle nsRefPtr.h itself, a couple places that define constructors
 # from nsRefPtr, and code generators specially.  We do this here, rather
 # than indiscriminantly s/nsRefPtr/RefPtr/, because that would rename
 # things like nsRefPtrHashtable.
perl -p -i -e 's/nsRefPtr/RefPtr/g' \
     mfbt/nsRefPtr.h \
     xpcom/glue/nsCOMPtr.h \
     xpcom/base/OwningNonNull.h \
     ipc/ipdl/ipdl/lower.py \
     ipc/ipdl/ipdl/builtin.py \
     dom/bindings/Codegen.py \
     python/lldbutils/lldbutils/utils.py

 # In our indiscriminate substitution above, we renamed
 # nsRefPtrGetterAddRefs, the class behind getter_AddRefs.  Fix that up.
find . -name '*.cpp' -o -name '*.h' -o -name '*.idl' | \
    xargs perl -p -i -e 's/nsRefPtrGetterAddRefs/RefPtrGetterAddRefs/g'

if [ -d .git ]; then
    git mv mfbt/nsRefPtr.h mfbt/RefPtr.h
else
    hg mv mfbt/nsRefPtr.h mfbt/RefPtr.h
fi

--HG--
rename : mfbt/nsRefPtr.h => mfbt/RefPtr.h
2015-10-18 01:24:48 -04:00
Honza Bambas
4bd41740d0 Bug 1165269 - Use OriginAttributes in nsILoadContextInfo, r=michal+allstars 2015-10-11 18:13:09 +02:00
Nicholas Nethercote
3c75804211 Bug 1209351 (part 4) - Optimize nsTHashTable::RemoveEntry() usage in netwerk/. r=michal.novotny.
--HG--
extra : rebase_source : f8016c5411f428b60c7bee892eceee33b8951149
2015-09-24 19:10:37 -07:00
Honza Bambas
5ae69d4a1a Bug 1082735 - Don't use InsertElementSorted in HTTP cache, r=michal 2015-08-17 15:18:59 -07:00
Nicholas Nethercote
fd1fcf1481 Bug 1182961 (part 2, attempt 2) - Use nsTHashtable::Iterator in CacheIndex. r=michal.
--HG--
extra : rebase_source : f1e111eee99e570c4766a55aefb2906dd12362d6
2015-07-26 20:15:36 -07:00
Nicholas Nethercote
bf4d4d1817 Bug 1182961 (part 1, attempt 2) - Use nsTHashtable::Iterator in CacheIndex. r=michal. 2015-07-28 21:14:39 -07:00
Nicholas Nethercote
cf3a9d61c8 Bug 1182961 (part 3, attempt 2) - Use nsTHashtable::Iterator in CacheIndex. r=michal.
--HG--
extra : rebase_source : 2cb02728091d14c08092325eb7c6da031676e1d7
2015-07-26 20:35:31 -07:00
Nicholas Nethercote
daab3fdaf7 Backout bff74cecc67c, ffe0edb2aae7, b60b7c267cef, 6da154b43265, bcf6fd3ab9bb (bug 1182961 parts 1--5) for possible intermittent failures and performance problems.
--HG--
extra : rebase_source : 97ab1452e462b1ff24cc77bdadf2a6e82800690d
2015-08-06 16:30:47 -07:00
Nicholas Nethercote
c9f9c763d3 Bug 1182961 (part 3) - Use nsTHashtable::Iterator in CacheIndex. r=michal.
--HG--
extra : rebase_source : b0011c4c261846bf314c867790b1315b6c2ca6d7
2015-07-26 20:35:31 -07:00
Nicholas Nethercote
68e8f70a14 Bug 1182961 (part 2) - Use nsTHashtable::Iterator in CacheIndex. r=michal.
--HG--
extra : rebase_source : d3f035201da0c526da3003f30f8719a2635a9a09
2015-07-26 20:15:36 -07:00
Nicholas Nethercote
4535e7d710 Bug 1182961 (part 1) - Use nsTHashtable::Iterator in CacheIndex. r=michal.
--HG--
extra : rebase_source : cc650176cc87916c6683705ca9aa1954d30d1c0d
2015-07-28 21:14:39 -07:00
Nicholas Nethercote
87b80f8c66 Bug 1188745 - Rename nsTArray::SizeOfExcludingThis() as ShallowSizeOfExcludingThis(). r=froydnj.
This makes it clearer that, unlike how SizeOf*() functions usually work, this
doesn't measure any children hanging off the array.

And do likewise for nsTObserverArray.

--HG--
extra : rebase_source : 6a8c8d8ffb53ad51b5773afea77126cdd767f149
2015-07-28 23:24:24 -07:00
Birunthan Mohanathas
a8939590de Bug 1182996 - Fix and add missing namespace comments. rs=ehsan
The bulk of this commit was generated by running:

  run-clang-tidy.py \
    -checks='-*,llvm-namespace-comment' \
    -header-filter=^/.../mozilla-central/.* \
    -fix
2015-07-13 08:25:42 -07:00
Michael Layzell
dbe075d5b8 Bug 1180993 - Part 3: Correct use sites of functions which return already_AddRefed. r=ehsan 2015-07-10 08:36:00 -04:00