44 Commits

Author SHA1 Message Date
gordon%netscape.com
eeddb9caeb Fix bug 100216, top crash on shutdown. Added null pointer check to
nsCacheEntryDescriptor::RequestDataSizeChange(). r=gagan, sr=darin.


git-svn-id: svn://10.0.0.236/trunk@103250 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-20 01:09:01 +00:00
gordon%netscape.com
38ed8264eb Fix bug 97620 [r=rpotts, sr=brendan/ben] Added code to doom and clear
active cache entries when devices are shutdown.

Fix bug 88768 [a=nisheeth], fixing unary operator usage in nsCacheEntryDescriptor.cpp.


git-svn-id: svn://10.0.0.236/trunk@103015 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-17 20:47:09 +00:00
rpotts%netscape.com
fccb2d91f6 bug #82458 (r=jst, sr=darin, a=blizzard). THis patch causes STATE_TRANSFERRING notifications to fire when URLs are loaded out of the disk cache or memory cache...
git-svn-id: svn://10.0.0.236/trunk@97855 18797224-902f-48f8-a5cc-f745e15eee43
2001-06-25 06:22:44 +00:00
danm%netscape.com
f62f90cf24 nsCacheEntry now asks nsCacheService to release its data, and therefore no longer holds a strong ref to its event queue. bugscape bug 4890, bugzilla bug 84247 code=gordon,me r=beard,sfraser a=clayton,chofmann
git-svn-id: svn://10.0.0.236/trunk@96483 18797224-902f-48f8-a5cc-f745e15eee43
2001-06-06 02:30:07 +00:00
jst%netscape.com
535c86019d scc checking in from jst's account. bug #75220: sr=jst, rs=brendan. renaming |nsPromiseC?Concatenation| to |nsDependentC?Concatenation|; |nsPromiseC?Substring| to |nsDependentC?Substring|; |nsLiteralC?String| and |nsLocalC?String| to |nsDependentC?String|, as these new names better reflect clients obligations to instances.
git-svn-id: svn://10.0.0.236/trunk@95533 18797224-902f-48f8-a5cc-f745e15eee43
2001-05-19 11:27:30 +00:00
darin%netscape.com
b247c6b53d Http branch landing: changes to netwerk/ (bug 76866) r=gagan,sr=dougt,a=chofmann
git-svn-id: svn://10.0.0.236/trunk@94681 18797224-902f-48f8-a5cc-f745e15eee43
2001-05-11 21:04:09 +00:00
gordon%netscape.com
d4e7153e5d Fix for bug 74301 "New cache not properly updating object size" and bug 78849 "nsCacheEntryDescriptor needs to be threadsafe". sr=darin.
git-svn-id: svn://10.0.0.236/trunk@94170 18797224-902f-48f8-a5cc-f745e15eee43
2001-05-08 00:07:44 +00:00
gordon%netscape.com
a3fc07f496 Fix for bug 76661, "Recursive attempt to lock cache entry". r=dougt, sr=darin.
git-svn-id: svn://10.0.0.236/trunk@93760 18797224-902f-48f8-a5cc-f745e15eee43
2001-05-03 02:35:26 +00:00
gordon%netscape.com
e7690cb2a9 For bug 74668. Add cache device ID attribute to nsICacheEntryInfo interface,
and implementing classes.  r=beard, sr=darin.


git-svn-id: svn://10.0.0.236/trunk@93442 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-30 01:18:34 +00:00
gordon%netscape.com
1e0c0b4023 Landing DISKCACHE1_BRANCH (part Deux) which enables dynamic eviction and efficient cache miss detection for the disk cache (bug 72506) r=beard, sr=darin.
git-svn-id: svn://10.0.0.236/trunk@91234 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-04 03:30:45 +00:00
gordon%netscape.com
473ba08356 Land DISKCACHE1_BRANCH, implementing first draft of cache map file for more efficient eviction and cache miss detection. Fixed some problems with overeager setting of lastModified time stamp. Read cache enable prefs on startup. r=beard, sr=darin.
git-svn-id: svn://10.0.0.236/trunk@90752 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-29 05:54:58 +00:00
gordon%netscape.com
7b8581452d Landing MOZ_NEW_CACHE_20010314_BRANCH, incorporating feedback from recent test builds. New cache is still disabled by default.
git-svn-id: svn://10.0.0.236/trunk@89933 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-20 22:42:03 +00:00
darin%netscape.com
db46fd8e9e [not part of the build] Changes to make the new cache use PRUint32's for
time instead of PRTime's.  r=gordon


git-svn-id: svn://10.0.0.236/trunk@89597 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-14 03:54:05 +00:00
darin%netscape.com
ed9b1f24cd [not part of the build] Make nsICacheEntryDescriptor inherit from nsICacheEntryInfo
git-svn-id: svn://10.0.0.236/trunk@89561 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-14 01:11:14 +00:00
beard%netscape.com
1c5610f321 [not part of build] Implemented nsCacheEntryDescriptor::GetFile().
git-svn-id: svn://10.0.0.236/trunk@88984 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-08 21:22:18 +00:00
gordon%netscape.com
95787ca5fb [not part of build]
Removed return codes for nsCacheEntryHashtable::RemoveEntry() and nsCacheDevice::DoomEntry().

Added doomEntriesIfExpired flag to nsCacheSession and nsCacheRequest, and check the flag in nsCacheService::ActivateEntry()

Added lastModified attribute to nsCacheEntryDescriptor and mLastModified data member to nsCacheEntry.  mLastModified is updated when data or meta data is changed.

Deque requests if descriptor allocation fails.  Delete requests after calling proxy in async open cache entry path.

Cleaned up the logic of doom.


git-svn-id: svn://10.0.0.236/trunk@88929 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-08 05:37:00 +00:00
darin%netscape.com
af8b11010a [not part of the build] Fixes some bustage under GCC 2.96
git-svn-id: svn://10.0.0.236/trunk@88818 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-07 09:55:54 +00:00
gordon%netscape.com
bf68e87589 [not part of build]
Added rough cut of pref code for memory cache device to get cache size, and implemented simple eviction method.

Restructured nsCacheEntryDescriptor to add SecurityInfo attribute.  Created nsTransportWrapper as nested class (and member) that addrefs the descriptor instead of itself (like nsPipe).  Also rename nsCacheOutputStream to nsOutputStreamWrapper and made it a nested class as well.


git-svn-id: svn://10.0.0.236/trunk@88816 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-07 09:27:36 +00:00
beard%netscape.com
503b4b32f7 [not part of build] Added GetFile() to implement the file attribute.
git-svn-id: svn://10.0.0.236/trunk@88748 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-07 01:40:41 +00:00
darin%netscape.com
90d3d3ddaf [not part of the build] Fixes bustage resulting from bryner's nsITransport changes.
git-svn-id: svn://10.0.0.236/trunk@88648 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-06 07:35:54 +00:00
gordon%netscape.com
3764094d6d [not part of build...and a good thing too] Fixed a couple of really stupid mistakes. Thanks to Patrick for finding them. Go back to your homes. Nothing to see here.
git-svn-id: svn://10.0.0.236/trunk@88632 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-06 04:01:00 +00:00
gordon%netscape.com
0ea21fde31 [not part of build]
Restructured open cache entry code in preparation for async implementation, to better share code with synchronous version.

Changed nsCacheRequest, nsCacheEntry, nsCacheEntryDescriptor to inherit from PRCList rather than include mListLink member, and removed extraneous GetListNode/GetInstance methods.

Consolidated mAccessRequested, mStreamBased, and mStoragePolicy into a single PRUint32 in nsCacheRequest.  Added PRLock, PRCondVar, and a 'wait for validation' flag, used for synchronously opening cache entries.  Added accessor functions for these "attributes".

Record current event queue for asychronous requests to be used with GetProxyForObject().  Removed mRequestThread.


git-svn-id: svn://10.0.0.236/trunk@88535 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-05 07:17:58 +00:00
gordon%netscape.com
3631c00985 [not part of build] Changed nsCacheEntry data members from PRTime to PRUint32. Changed //** comments to // XXX to make it easier to search for 'to do' items. Added dooming of expired entries.
git-svn-id: svn://10.0.0.236/trunk@88499 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-04 00:11:30 +00:00
gordon%netscape.com
383d3db210 [not part of build]
Fixed cache meta data. Implemented eviction list for memory cache device. Worked on entry deactivation, validation, and doom.


git-svn-id: svn://10.0.0.236/trunk@88364 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-02 01:51:41 +00:00
gordon%netscape.com
5105be9508 [not part of build]
Add utility method to nsCacheEntryDescriptor to change the data size for the associated cache entry.


git-svn-id: svn://10.0.0.236/trunk@88309 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-01 19:52:06 +00:00
beard%netscape.com
b77ee33765 [not part of build] When OpenOutputStream() is called for a descriptor with nsICache::ACCESS_WRITE, set initial cache entry size to 0.
git-svn-id: svn://10.0.0.236/trunk@88303 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-01 19:24:10 +00:00
beard%netscape.com
27f7e2d911 [not part of build] Make ~nsCacheOutputStream() virtual
git-svn-id: svn://10.0.0.236/trunk@88292 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-01 09:51:22 +00:00
beard%netscape.com
8c8ca7ce95 [not part of build] First cut at wrapper nsIOutputStream for tallying total bytes written to a cache entry.
git-svn-id: svn://10.0.0.236/trunk@88290 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-01 08:29:43 +00:00
gordon%netscape.com
9bbc213f93 [not part of build]
Changed OnDataSizeChanged() to OnDataSizeChange() and added a deltaSize parameter.  Added OnDataSizeChange() method on nsCacheService so we can grab the service lock and bind the entry if necessary.

Commented out the implementation of nsCacheEntryDescriptor::AsyncWrite(), since we are not planning to provide it.


git-svn-id: svn://10.0.0.236/trunk@88275 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-01 05:01:43 +00:00
beard%netscape.com
7ca128866f [not part of build] needed to add nsITransport to QueryInterface.
git-svn-id: svn://10.0.0.236/trunk@88266 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-01 02:51:07 +00:00
gordon%netscape.com
e925522cc0 [not part of build]
Changed nsCacheEntryDescriptor to implement nsITransport as a wrapper that checks access priviledges for the underlying transport provided by the device.

Added code to lazily allocate the underlying transport for the cache descriptor.

Added NS_ENSURE_ARG_POINTER() to all necessary interface methods. r=beard.


git-svn-id: svn://10.0.0.236/trunk@88261 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-01 02:25:07 +00:00
beard%netscape.com
ff1dfa18a0 [not part of build] enforce nsCacheAccessMode when creating transports.
git-svn-id: svn://10.0.0.236/trunk@88183 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-28 10:04:27 +00:00
beard%netscape.com
8e20116d8b [not part of build] really delegate GetTransport() to the cache service.
git-svn-id: svn://10.0.0.236/trunk@88168 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-28 04:17:24 +00:00
gordon%netscape.com
19a0033de2 Added GetTransportForEntry(), DoomEntry() to public methods, and BindEntry() and DoomEntry_Internal() to private methods.
git-svn-id: svn://10.0.0.236/trunk@88167 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-28 04:10:43 +00:00
beard%netscape.com
6a7b1a85f9 [not part of build] removed redundant NULL check in MarkValid().
git-svn-id: svn://10.0.0.236/trunk@88164 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-28 03:59:02 +00:00
darin%netscape.com
b51b0ef672 [not part of the build] Added code to the descriptor to call GetTransportForEntry()
git-svn-id: svn://10.0.0.236/trunk@88157 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-28 02:19:14 +00:00
gordon%netscape.com
b99a60e359 Changed 'getters' on nsCacheEntry to simply return values, rather than require out parameters.
Added a PRCList member and accessors for linking entries on eviction and doom lists.

Moved check for IsStreamBased() from nsCacheEntry::GetData() to nsCacheEntryDescriptor::GetData(), to allow cache devices to set the mData member.

Added checks to nsCacheEntryDescriptor methods to return NS_ERROR_NOT_AVAILABLE if the descriptor is already closed.


git-svn-id: svn://10.0.0.236/trunk@88133 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-28 00:06:13 +00:00
beard%netscape.com
932c8a19cf Gordon has much more to say about the last few checkins... But we forgot to wire up nsCacheEntryDescriptor::MarkValid() to nsCacheEntry::MarkValid(). Enjoy the ride.
git-svn-id: svn://10.0.0.236/trunk@88064 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-27 05:43:16 +00:00
gordon%netscape.com
8b61a442bc Changed GetKey() to return key as return value, rather than out parameter. Added flag predicates for storage policy.
git-svn-id: svn://10.0.0.236/trunk@88063 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-27 05:35:53 +00:00
gordon%netscape.com
314bc3bb0a Add stub methods for getting/setting data size, and getting the transport for a cache entry descriptor. Update for change to Substring parameters.
git-svn-id: svn://10.0.0.236/trunk@87981 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-26 14:45:45 +00:00
dougt%netscape.com
f8929b57e1 Fixing return type:
git-svn-id: svn://10.0.0.236/trunk@87936 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-25 07:31:13 +00:00
darin%netscape.com
a97777c89d Made accessGranted be of type nsCacheAccessMode. This is not part of the mozilla build.
git-svn-id: svn://10.0.0.236/trunk@87865 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-24 01:36:11 +00:00
gordon%netscape.com
c1cbcd4c4c Updated new cache source to build with recent changes to interface files. These files are not part of the build. r=beard, darin.
git-svn-id: svn://10.0.0.236/trunk@87862 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-24 01:02:37 +00:00
gordon%netscape.com
cfbd099fb3 Rough first cut of cache service and memory object cache. It currently builds on linux.
git-svn-id: svn://10.0.0.236/trunk@87809 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-23 13:18:01 +00:00