[Webkit-unassigned] [Bug 30322] WebKit level persistent caching
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Mon Nov 10 23:36:50 PST 2014
https://bugs.webkit.org/show_bug.cgi?id=30322
--- Comment #44 from Carlos Garcia Campos <cgarcia at igalia.com> ---
Comment on attachment 241303
--> https://bugs.webkit.org/attachment.cgi?id=241303
now with tests included
View in context: https://bugs.webkit.org/attachment.cgi?id=241303&action=review
> Source/WebKit2/NetworkProcess/NetworkResourceLoader.cpp:543
> + if (!entry->memoryMapHandle.isNull())
> + send(Messages::WebResourceLoader::DidReceiveResource(entry->memoryMapHandle, currentTime()));
> + else {
Could you use #if ENABLE(SHAREABLE_RESOURCE) for this?
> Source/WebKit2/NetworkProcess/cache/NetworkCache.cpp:98
> + NetworkCacheStorage::Data header(encoder.buffer(), encoder.bufferSize());
Are we copying the data here? The encoder object won't be used anymore after this, could we add a method to take the buffer instead? or use a refcounted bufffer?
> Source/WebKit2/NetworkProcess/cache/NetworkCache.cpp:186
> + RefPtr<SharedMemory> sharedMemory = storageEntry.body.size() ? SharedMemory::createFromVMBuffer((void*)storageEntry.body.data(), storageEntry.body.size()) : nullptr;
> + RefPtr<ShareableResource> memoryMap = sharedMemory ? ShareableResource::create(sharedMemory.release(), 0, storageEntry.body.size()) : nullptr;
> +
> + if (memoryMap && memoryMap->createHandle(entry->memoryMapHandle))
> + entry->buffer = entry->memoryMapHandle.tryWrapInSharedBuffer();
> + else
#if ENABLE(SHAREABLE_RESOURCE)
> Source/WebKit2/NetworkProcess/cache/NetworkCache.cpp:213
> + String partition = request.cachePartition();
> + if (partition.isEmpty())
> + partition = ASCIILiteral("No partition");
> + return NetworkCacheKey(request.httpMethod(), partition, request.url().string());
Cache partition is also mac only, we should use #if ENABLE(CACHE_PARTITIONING) here. For non mac ports I guess we could use an emptyString instead of "No partition" and handle it as a special case to not create another directory level. But we could do that as a follow up patch when we implement the cache for other ports.
> Source/WebKit2/NetworkProcess/cache/NetworkCache.h:62
> + ShareableResource::Handle memoryMapHandle;
#if ENABLE(SHAREABLE_RESOURCE)
> Source/WebKit2/NetworkProcess/cache/NetworkCacheStorage.h:35
> +#include <wtf/OSObjectPtr.h>
#if PLATFORM(COCOA)
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20141111/222c30de/attachment-0002.html>
More information about the webkit-unassigned
mailing list