Commit Graph

85 Commits

Author SHA1 Message Date
Julian Seward
848fd91f64 Bug 1278524 - TSan: data races netwerk/cache2/CacheEntry.{h,cpp} on CacheEntry::{mUseDisk, mSecurityInfoLoaded, mPreventCallbacks}. r=honzab.moz.
--HG--
extra : rebase_source : d9c32095f81622e70014be704406c277c28f887f
2016-06-30 12:24:54 +02:00
Honza Bambas
d9981dcb53 Bug 1271019 - Don't call on nsIURI on non-main threads from HTTP cache back end. r=michal 2016-05-12 06:38:00 -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
f6e228e9d3 Bug 1247644 - Don't do any I/O on doomed and unused HTTP cache entries, r=michal 2016-02-12 14:45:00 +01:00
Honza Bambas
68a7636bf1 Bug 1050613 - Make sure force-valid for HTTP cache entries is removed when entries are removed, r=michal 2016-02-19 11:56:00 +01:00
Honza Bambas
92816b2543 Bug 1154124 - Prevent recursion when calling HTTP cache entry's callbacks. r=michal 2016-01-14 21:16:06 +01: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
Nikhil Marathe
8dbf443150 Bug 1167809 - Add skip size check flag to cache for use with ServiceWorkers. r=mayhemer
For non-e10s Service Worker, we use Cache entries to achieve interception.
While this is a temporary measure, the fact that cache enforces size limits on
cache entries (which make sense for the purpose it was designed) prevents large
files from being served via a Service Worker. This patch adds a skip size check
flag to CacheStorage that is relayed to CacheEntry and CacheFile. It is set to
false by default leading to normal cache behaviour.
The patch also adds nsICacheStorageService.synthesizedCacheStorage() that
retrieves a cache storage with this flag set to true, which is used by
nsHttpChannel in case of possible interception.
2015-09-03 16:05:42 -07:00
Carsten "Tomcat" Book
9fcb673926 Backed out changeset fb2a27db76bc (bug 1032254) for OS X Static Build Bustage on a CLOSED TREE
--HG--
rename : netwerk/test/unit/test_cache2-29a-concurrent_read_resumable_entry_size_zero.js => netwerk/test/unit/test_cache2-28-concurrent_read_resumable_entry_size_zero.js
rename : netwerk/test/unit/test_cache2-29b-concurrent_read_non-resumable_entry_size_zero.js => netwerk/test/unit/test_cache2-29-concurrent_read_non-resumable_entry_size_zero.js
2015-07-31 07:57:50 +02:00
Valentin Gosu
30be843b5b Bug 1032254 - Provide a way to pin resources in the http cache r=honzab
--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-07-30 11:40:00 +02: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
Eric Rahm
518166f0c8 Bug 1165515 - Part 14: Undef PR_LOG macros when using mozilla/Logging.h. r=froydnj
Make it harder for users to accidentally reintroduce usage of the PR_LOG macros
when using 'mozilla/Logging.h'. This can still be worked around by directly
including 'prlog.h' (and not 'mozilla/Logging.h') if absolutely necessary.
2015-06-03 15:26:07 -07:00
Carsten "Tomcat" Book
5471309381 Backed out 14 changesets (bug 1165515) for linux x64 e10s m2 test failures
Backed out changeset d68dcf2ef372 (bug 1165515)
Backed out changeset 7c3b45a47811 (bug 1165515)
Backed out changeset b668b617bef2 (bug 1165515)
Backed out changeset d0916e1283a2 (bug 1165515)
Backed out changeset ac4dc7489942 (bug 1165515)
Backed out changeset e9632ce8bc65 (bug 1165515)
Backed out changeset c16d215cc7e4 (bug 1165515)
Backed out changeset e4d474f3c51a (bug 1165515)
Backed out changeset d87680bf9f7c (bug 1165515)
Backed out changeset b3c0a45ba99e (bug 1165515)
Backed out changeset 9370fa197674 (bug 1165515)
Backed out changeset 50970d668ca1 (bug 1165515)
Backed out changeset ffa4eb6d24b9 (bug 1165515)
Backed out changeset 5fcf1203cc1d (bug 1165515)

--HG--
extra : rebase_source : 6fb850d063cbabe738f97f0380302153e3eae97a
2015-06-02 13:05:56 +02:00
Eric Rahm
38901afce4 Bug 1165515 - Part 14: Undef PR_LOG macros when using mozilla/Logging.h. r=froydnj
Make it harder for users to accidentally reintroduce usage of the PR_LOG macros
when using 'mozilla/Logging.h'. This can still be worked around by directly
including 'prlog.h' (and not 'mozilla/Logging.h') if absolutely necessary.
2015-06-01 22:17:34 -07:00
Wes Kocher
4e9f80ed2e Backed out 14 changesets (bug 1165515) for b2g mochitest-6 permafail CLOSED TREE
Backed out changeset 9b97e2aa2ed9 (bug 1165515)
Backed out changeset 150606c022a2 (bug 1165515)
Backed out changeset 4e875a488349 (bug 1165515)
Backed out changeset 467e7feeb546 (bug 1165515)
Backed out changeset d6b6cc373197 (bug 1165515)
Backed out changeset 0615265b593c (bug 1165515)
Backed out changeset fafd1dce9f08 (bug 1165515)
Backed out changeset d1df869245f9 (bug 1165515)
Backed out changeset 6876a7c63611 (bug 1165515)
Backed out changeset b7841c94a9a3 (bug 1165515)
Backed out changeset e5e3617f7c73 (bug 1165515)
Backed out changeset 39be3db95978 (bug 1165515)
Backed out changeset 0ec74176f8de (bug 1165515)
Backed out changeset 5b928dd10d71 (bug 1165515)
2015-06-01 17:57:58 -07:00
Eric Rahm
e8a5eb8d6e Bug 1165515 - Part 14: Undef PR_LOG macros when using mozilla/Logging.h. r=froydnj
Make it harder for users to accidentally reintroduce usage of the PR_LOG macros
when using 'mozilla/Logging.h'. This can still be worked around by directly
including 'prlog.h' (and not 'mozilla/Logging.h') if absolutely necessary.
2015-06-01 14:31:01 -07:00
Michal Novotny
45032afa61 Bug 1147973 - Detailed disk cache hit rate telemetry is wrong, r=honzab 2015-03-30 21:08:52 +02:00
Honza Bambas
f1317d5138 Bug 1132172 - Don't access CacheEntry::mFrecency on non-cache threads. r=michal 2015-03-25 14:55:00 -04:00
Honza Bambas
b14a828424 Bug 1139924 - Dooming an unloaded HTTP cache entry by its URL may fail. r=michal 2015-03-05 08:42:00 -05:00
Honza Bambas
8b7f6eed90 Bug 1076366 - HTTP cache v2: Hand out CacheEntry to read-only callback demanding re-validation, r=michal
--HG--
extra : rebase_source : 1b12e0522e4cd5d97d165e8f629894a7221a4bb2
2015-02-20 12:50:00 +01:00
Michal Novotny
e0f89ef3f6 Bug 1131600 - Add telemetry probes to get detailed disk cache hit rate, r=mcmanus 2015-02-23 12:26:06 +01:00
Honza Bambas
549f163c2c Bug 1131092 - Place mFileStatus=NS_OK after CacheFile.Init() call in CacheEntry::Load(). r=michal 2015-02-13 07:58:00 -05:00
Honza Bambas
1bb150c179 Bug 1123840 - "crash in libsystem_platform.dylib@0x51e0". r=honzab.moz 2015-01-22 13:51:00 +01:00
Honza Bambas
ba0ee1543e Bug 1029782 - Have OPEN_SECRETLY flag for opening cache entries, r=michal 2014-09-16 15:51:50 +02:00
Honza Bambas
1c22ca20d6 Bug 1000338 - nsICacheEntry.lastModified not properly implemented, r=michal 2014-09-16 15:51:50 +02:00
Carsten "Tomcat" Book
f61f2f49c9 Backed out changeset ce8f00cca9dd (bug 1000338) for XPC-2 test failures 2014-09-11 14:31:54 +02:00
Carsten "Tomcat" Book
f71aba39f2 Backed out changeset 25c721fd5dc6 (bug 1029782) for XPCshell bustage on a CLOSED TREE 2014-09-11 13:07:41 +02:00
Honza Bambas
83582708a5 Bug 1029782 - Have OPEN_SECRETLY flag for opening cache entries, r=michal 2014-09-11 11:44:31 +02:00
Honza Bambas
e73517351a Bug 1000338 - nsICacheEntry.lastModified not properly implemented, r=michal 2014-09-11 11:44:31 +02:00
Jeremy Poulin
890b61b742 Bug 1020416 - Added forceValidFor() and isForcedValid attribute to nsICacheEntry. r=honzab, michal 2014-07-21 11:34:17 -07:00
Brad Lassey
d801604520 back out bug 1020416 for causing hangs on Firefox for Android 2014-07-25 13:21:42 -04:00
Jeremy Poulin
0cce7ce188 Bug 1020416 - Added forceValidFor() and isForcedValid attribute to nsICacheEntry. r=honzab, michal 2014-07-21 11:34:17 -07:00
Carsten "Tomcat" Book
82d02bf40a Backed out changeset a232fd36c827 (bug 1020416) for nightly startup crashed - bug 1041492 a=sheriffduty 2014-07-21 14:57:09 +02:00
Jeremy Poulin
21a95c5876 Bug 1020416 - Add forceValidFor() and isForcedValid attribute to nsICacheEntry. r=honzab, r=michal 2014-07-18 18:11:34 -07:00
Honza Bambas
3c2b1bc263 Bug 920606 - HTTP cache v2: add telemetry for the intermediate memory cache purging, r=michal 2014-07-08 16:48:00 +02:00
Honza Bambas
a5fa5f1298 Bug 1032992 - Set mHasData in CacheEntry when metadata are filled but no data are written, r=michal 2014-07-07 20:58:26 +02:00
Honza Bambas
74a506daf6 Backing out 6c5c6cbad330 (bug 1032992) for Adnroid failures - GC doesn't work there as on other platforms..., r=backout 2014-07-02 19:53:00 +02:00
Honza Bambas
be993c90a5 Bug 1032992 - Set mHasData in CacheEntry when metadata are filled but no data are written, r=michal 2014-07-02 18:16:22 +02:00
Honza Bambas
e679f32ee4 Bug 1027789 - CacheEntry::RememberCallback should unlock before call to InvokeAvailableCallback, r=michal 2014-07-02 18:16:21 +02:00
Honza Bambas
d01da37296 Bug 1025913 - Let memory-only HTTP cache entries doom disk entries, CacheEntry.mUseDisk immutable, r=michal 2014-06-25 18:42:50 +02:00
Honza Bambas
1d6c3f7bc3 Bug 1024989 - Crash MOZ_ASSERT(mMetadata) in SetFrecency, r=michal 2014-06-24 18:08:36 +02:00
Honza Bambas
199c07ce97 Bug 956801 - save some locking in CacheEntry::BackgroundOp, r=michal 2014-06-23 17:48:52 +02:00
Carsten "Tomcat" Book
60f254fd99 Backed out changeset 374f71301703 (bug 956801) for causing Android 2.2 Armv6 Opt XPCShell Test failures on a CLOSED TREE 2014-06-23 13:07:18 +02:00
Honza Bambas
7abf6a38ec Bug 956801 - save some locking in CacheEntry::BackgroundOp, r=michal 2014-06-21 21:41:01 +02:00
Ryan VanderMeulen
006487470f Backed out changeset d405928cb934 (bug 999577) and changeset 940d041073c7 (bug 938186) for xpcshell failures.
CLOSED TREE
2014-06-05 13:32:04 -04:00
Honza Bambas
0219d2b402 Bug 938186 - introduce FORCE_ASYNC_CALLBACK for opening cache entries, r=michal 2014-06-05 18:27:38 +02:00