608 Commits

Author SHA1 Message Date
beard%netscape.com
d92f6c8af4 [not part of build] Added simple enumeration mechanism to nsCacheEntryHashtable.
git-svn-id: svn://10.0.0.236/trunk@89172 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-10 00:43:20 +00:00
beard%netscape.com
ee5b3ba301 [not part of build] renamed DoomEntry_Internal to DoomEntry_Locked, made public for use by cache devices.
git-svn-id: svn://10.0.0.236/trunk@89170 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-10 00:42:19 +00:00
beard%netscape.com
06a9d85e0d [not part of build] Implemented more of cache visitor support.
git-svn-id: svn://10.0.0.236/trunk@89141 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-09 19:01:15 +00:00
beard%netscape.com
0a3b477585 [not part of build] Fix cache directory creation logic again.
git-svn-id: svn://10.0.0.236/trunk@89138 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-09 17:14:02 +00:00
beard%netscape.com
6b6ad31fa3 [not part of build] Initial implementation of cache visitor support.
git-svn-id: svn://10.0.0.236/trunk@89017 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-09 00:04:03 +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
beard%netscape.com
b5ecde3753 [not part of build] stub implementation of Visit().
Changed Cache directory creation logic in nsDiskCacheDevice.cpp.


git-svn-id: svn://10.0.0.236/trunk@88983 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-08 21:00:02 +00:00
beard%netscape.com
d2a908e357 [not part of build] implement VisitEntries.
git-svn-id: svn://10.0.0.236/trunk@88982 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-08 20:58:38 +00:00
beard%netscape.com
ff501a2d55 [not part of build] Added new interfaces nsICacheDeviceInfo, nsICacheEntryInfo.
git-svn-id: svn://10.0.0.236/trunk@88981 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-08 20:58:11 +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
gordon%netscape.com
e7a4e32b50 [not part of build]
Added readonly lastModified attribute to nsICacheEntryDescriptor.  Added PRBool attribute doomEntriesIfExpired to nsICacheSession.


git-svn-id: svn://10.0.0.236/trunk@88926 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-08 05:31:52 +00:00
gordon%netscape.com
9250bb844b [not part of build] Fix a couple bugs to get http working. Don't deallocate requests before listener has been notified, and don't re-add entries to active entry hashtable.
git-svn-id: svn://10.0.0.236/trunk@88874 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-08 01:02:27 +00:00
beard%netscape.com
53d0cb5b89 [not part of build] when DEBUG is true, always put cache directory next to current process.
git-svn-id: svn://10.0.0.236/trunk@88853 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-08 00:35:03 +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
aced59b313 [not part of build] don't overwrite a NULL pointer.
git-svn-id: svn://10.0.0.236/trunk@88787 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-07 04:05:36 +00:00
gordon%netscape.com
dbd8c256b9 [not part of build] Add security info attribute to nsICacheEntryDescriptor.
git-svn-id: svn://10.0.0.236/trunk@88766 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-07 02:47:08 +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
beard%netscape.com
1bed9bd372 [not part of build] Added file attribute to nsICacheEntryDescriptor, added STORE_ON_DISK_AS_FILE to nsICache.
git-svn-id: svn://10.0.0.236/trunk@88747 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-07 01:37:42 +00:00
darin%netscape.com
5bf29d7b78 [not part of the buid] Renamed onDescriptorAvailable to onCacheEntryAvailable.
git-svn-id: svn://10.0.0.236/trunk@88699 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-06 22:04:05 +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
bryner%uiuc.edu
ab5139c48f Bug 70595 - making nsIPrompt accessible to PSM. r=darin, sr=mscott.
git-svn-id: svn://10.0.0.236/trunk@88637 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-06 05:10:33 +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
057243bb88 [not part of build]
Fix race condition in nsCacheRequest WaitForValidation().

Force !streamBased to set storagePolicy to nsICache:STORE_IN_MEMORY when creating nsCacheSessions.

Fix ProcessRequest() to refrain from creating a descriptor for ACCESS_READ requests when no entry is found (found by pavlov).


git-svn-id: svn://10.0.0.236/trunk@88626 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-06 03:26:13 +00:00
darin%netscape.com
a3e03c5eaf [not part of the build] Prevent crash in error case.
git-svn-id: svn://10.0.0.236/trunk@88623 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-06 03:12:24 +00:00
beard%netscape.com
570f5ff2a8 [not part of build] create the cache directory if it doesn't exist already.
git-svn-id: svn://10.0.0.236/trunk@88609 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-06 02:10:18 +00:00
darin%netscape.com
2685a2a7cc [not part of the build] Fixes sync OpenCacheEntry bustage.
git-svn-id: svn://10.0.0.236/trunk@88601 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-06 01:40:20 +00:00
darin%netscape.com
c3e8536f42 [not part of the bulid] Fixes GCC 2.95 bustage.
git-svn-id: svn://10.0.0.236/trunk@88583 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-05 23:50:26 +00:00
gordon%netscape.com
94bca0664c [not part of build]
Added conditional deletion of mLock and mCondVar to nsCacheRequest destructor.

Added nsCacheServide::NotifyListener() to called cache clients' OnDescriptorAvailable() method for AsyncOpenCacheEntry().

Added ProcessPendingRequests() to process requests on CloseDescriptor, ValidateEntry, and DoomEntry.

Rough cut of AsyncOpenCacheEntry is in place, but needs testing.


git-svn-id: svn://10.0.0.236/trunk@88539 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-05 10:45:33 +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
pavlov%netscape.com
395f385329 [NOT PART OF BUILD!@#!@#] changing line ending of makefile so it works on windows r=gordon
git-svn-id: svn://10.0.0.236/trunk@88514 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-04 20:57:33 +00:00
beard%netscape.com
357055f247 [not part of build] fix bustage (LL_ZERO is not compatible with PRUint32 type).
git-svn-id: svn://10.0.0.236/trunk@88507 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-04 19:27:39 +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
9618aa2ef4 [not part of build] Make MarkDoomed(), MarkActive(), MarkInactive() private, and check for entry before calling MarkInitialized() in nsCacheService::ActivateEntry().
git-svn-id: svn://10.0.0.236/trunk@88476 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-03 04:42:21 +00:00
beard%netscape.com
c433468142 [not part of build] dooming works during forced write, and explicitly, see TestDiskCache.js for example.
git-svn-id: svn://10.0.0.236/trunk@88470 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-03 03:41:38 +00:00
gordon%netscape.com
036ebd2234 [not part of build] Restructured nsCacheService:ActivateEntry() to properly handle a FORCE-WRITE. Cleaned up ownership of key between request and entry. Add deletion of request for synchronous open. Add deletion of unbound entries on deactivation.
git-svn-id: svn://10.0.0.236/trunk@88458 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-03 02:27:49 +00:00
darin%netscape.com
52ec0ead2f [not part of the build] updated the module file for the removal of nsMemoryCacheTransport
git-svn-id: svn://10.0.0.236/trunk@88457 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-03 02:27:18 +00:00
darin%netscape.com
1f2afac93b [not part of the build] Make mem cache use nsStorageTransport.
git-svn-id: svn://10.0.0.236/trunk@88444 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-03 01:59:03 +00:00
beard%netscape.com
b056176026 [not part of build] removed dirty flag from DiskCacheEntry, added key comparision to readDiskCacheEntry().
git-svn-id: svn://10.0.0.236/trunk@88425 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-03 00:35:33 +00:00
gordon%netscape.com
e67acee03a [not part of build] REALLY fix nsCacheEntryHashTable::RemoveEntry. This time for sure!
git-svn-id: svn://10.0.0.236/trunk@88419 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-03 00:00:29 +00:00
gordon%netscape.com
246e6753ae [not part of build] Fix nsCacheEntryHashTable::RemoveEntry(). r=beard.
git-svn-id: svn://10.0.0.236/trunk@88418 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-02 23:50:53 +00:00
darin%netscape.com
c2993ecc29 [not part of the build] Added implementation of nsMemoryCacheReadRequest::Available
git-svn-id: svn://10.0.0.236/trunk@88409 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-02 22:28:38 +00:00
beard%netscape.com
1684c3dc88 [not part of build] slight optimization, check for cache file existence before creating an entry and attempting to open a transport for it.
git-svn-id: svn://10.0.0.236/trunk@88408 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-02 20:14:41 +00:00
beard%netscape.com
933ebd7a67 [not part of build] need a way to transfer ownership of key from request to entry. for now just leak and dont' crash.
git-svn-id: svn://10.0.0.236/trunk@88407 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-02 20:04:08 +00:00
disttsc%bart.nl
d30c2be76b Preparation of removing nsCString::GetBuffer. Landing everything but the actual commenting out of nsCString::GetBuffer. bug=64016, r=timeless, sr=scc
git-svn-id: svn://10.0.0.236/trunk@88396 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-02 09:26:57 +00:00
beard%netscape.com
1c6cccf159 Now reading/writing all metadata into disk cache.
git-svn-id: svn://10.0.0.236/trunk@88384 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-02 04:57:09 +00:00
beard%netscape.com
94cfac8135 [not part of build] Added CalculateSize() to account for null termination of strings.
git-svn-id: svn://10.0.0.236/trunk@88382 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-02 04:54:27 +00:00
beard%netscape.com
9091fd41d7 [not part of build] Added FlattenMetaData()/UnflattenMetaData().
git-svn-id: svn://10.0.0.236/trunk@88378 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-02 04:09:01 +00:00
gordon%netscape.com
8403d04279 Fix casing of SetMetaDataElement method.
git-svn-id: svn://10.0.0.236/trunk@88365 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-02 01:52:29 +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