RESOLVED FIXED 166825
Move cache coders to WTF
https://bugs.webkit.org/show_bug.cgi?id=166825
Summary Move cache coders to WTF
Antti Koivisto
Reported 2017-01-08 13:52:08 PST
Make it possible to use robust serialization of WTF types on the lower levels of the stack.
Attachments
patch (107.00 KB, patch)
2017-01-08 14:35 PST, Antti Koivisto
no flags
patch (106.12 KB, patch)
2017-01-08 15:13 PST, Antti Koivisto
no flags
patch (106.80 KB, patch)
2017-01-08 15:18 PST, Antti Koivisto
no flags
patch (107.45 KB, patch)
2017-01-08 15:58 PST, Antti Koivisto
no flags
patch (107.99 KB, patch)
2017-01-08 16:34 PST, Antti Koivisto
sam: review+
Antti Koivisto
Comment 1 2017-01-08 14:35:11 PST
WebKit Commit Bot
Comment 2 2017-01-08 14:36:13 PST
Attachment 298317 [details] did not pass style-queue: ERROR: Source/WTF/wtf/persistence/Encoder.h:94: More than one command on the same line [whitespace/newline] [4] ERROR: Source/WTF/wtf/persistence/Encoder.h:95: More than one command on the same line [whitespace/newline] [4] ERROR: Source/WTF/wtf/persistence/Encoder.h:96: More than one command on the same line [whitespace/newline] [4] ERROR: Source/WTF/wtf/persistence/Encoder.h:97: More than one command on the same line [whitespace/newline] [4] ERROR: Source/WTF/wtf/persistence/Encoder.h:98: More than one command on the same line [whitespace/newline] [4] ERROR: Source/WTF/wtf/persistence/Encoder.h:99: More than one command on the same line [whitespace/newline] [4] ERROR: Source/WTF/wtf/persistence/Encoder.h:100: More than one command on the same line [whitespace/newline] [4] ERROR: Source/WTF/wtf/persistence/Encoder.h:101: More than one command on the same line [whitespace/newline] [4] ERROR: Source/WTF/wtf/persistence/Encoder.h:102: More than one command on the same line [whitespace/newline] [4] ERROR: Source/WTF/wtf/persistence/Encoder.h:103: More than one command on the same line [whitespace/newline] [4] Total errors found: 10 in 21 files If any of these errors are false positives, please file a bug against check-webkit-style.
Antti Koivisto
Comment 3 2017-01-08 15:13:45 PST
WebKit Commit Bot
Comment 4 2017-01-08 15:15:36 PST
Attachment 298318 [details] did not pass style-queue: ERROR: Source/WTF/wtf/persistence/Encoder.h:94: More than one command on the same line [whitespace/newline] [4] ERROR: Source/WTF/wtf/persistence/Encoder.h:95: More than one command on the same line [whitespace/newline] [4] ERROR: Source/WTF/wtf/persistence/Encoder.h:96: More than one command on the same line [whitespace/newline] [4] ERROR: Source/WTF/wtf/persistence/Encoder.h:97: More than one command on the same line [whitespace/newline] [4] ERROR: Source/WTF/wtf/persistence/Encoder.h:98: More than one command on the same line [whitespace/newline] [4] ERROR: Source/WTF/wtf/persistence/Encoder.h:99: More than one command on the same line [whitespace/newline] [4] ERROR: Source/WTF/wtf/persistence/Encoder.h:100: More than one command on the same line [whitespace/newline] [4] ERROR: Source/WTF/wtf/persistence/Encoder.h:101: More than one command on the same line [whitespace/newline] [4] ERROR: Source/WTF/wtf/persistence/Encoder.h:102: More than one command on the same line [whitespace/newline] [4] ERROR: Source/WTF/wtf/persistence/Encoder.h:103: More than one command on the same line [whitespace/newline] [4] Total errors found: 10 in 20 files If any of these errors are false positives, please file a bug against check-webkit-style.
Antti Koivisto
Comment 5 2017-01-08 15:18:59 PST
WebKit Commit Bot
Comment 6 2017-01-08 15:20:36 PST
Attachment 298319 [details] did not pass style-queue: ERROR: Source/WTF/wtf/persistence/Encoder.h:94: More than one command on the same line [whitespace/newline] [4] ERROR: Source/WTF/wtf/persistence/Encoder.h:95: More than one command on the same line [whitespace/newline] [4] ERROR: Source/WTF/wtf/persistence/Encoder.h:96: More than one command on the same line [whitespace/newline] [4] ERROR: Source/WTF/wtf/persistence/Encoder.h:97: More than one command on the same line [whitespace/newline] [4] ERROR: Source/WTF/wtf/persistence/Encoder.h:98: More than one command on the same line [whitespace/newline] [4] ERROR: Source/WTF/wtf/persistence/Encoder.h:99: More than one command on the same line [whitespace/newline] [4] ERROR: Source/WTF/wtf/persistence/Encoder.h:100: More than one command on the same line [whitespace/newline] [4] ERROR: Source/WTF/wtf/persistence/Encoder.h:101: More than one command on the same line [whitespace/newline] [4] ERROR: Source/WTF/wtf/persistence/Encoder.h:102: More than one command on the same line [whitespace/newline] [4] ERROR: Source/WTF/wtf/persistence/Encoder.h:103: More than one command on the same line [whitespace/newline] [4] Total errors found: 10 in 21 files If any of these errors are false positives, please file a bug against check-webkit-style.
Antti Koivisto
Comment 7 2017-01-08 15:58:12 PST
WebKit Commit Bot
Comment 8 2017-01-08 15:59:50 PST
Attachment 298322 [details] did not pass style-queue: ERROR: Source/WTF/wtf/persistence/Encoder.h:94: More than one command on the same line [whitespace/newline] [4] ERROR: Source/WTF/wtf/persistence/Encoder.h:95: More than one command on the same line [whitespace/newline] [4] ERROR: Source/WTF/wtf/persistence/Encoder.h:96: More than one command on the same line [whitespace/newline] [4] ERROR: Source/WTF/wtf/persistence/Encoder.h:97: More than one command on the same line [whitespace/newline] [4] ERROR: Source/WTF/wtf/persistence/Encoder.h:98: More than one command on the same line [whitespace/newline] [4] ERROR: Source/WTF/wtf/persistence/Encoder.h:99: More than one command on the same line [whitespace/newline] [4] ERROR: Source/WTF/wtf/persistence/Encoder.h:100: More than one command on the same line [whitespace/newline] [4] ERROR: Source/WTF/wtf/persistence/Encoder.h:101: More than one command on the same line [whitespace/newline] [4] ERROR: Source/WTF/wtf/persistence/Encoder.h:102: More than one command on the same line [whitespace/newline] [4] ERROR: Source/WTF/wtf/persistence/Encoder.h:103: More than one command on the same line [whitespace/newline] [4] Total errors found: 10 in 21 files If any of these errors are false positives, please file a bug against check-webkit-style.
Michael Catanzaro
Comment 9 2017-01-08 16:19:03 PST
Comment on attachment 298319 [details] patch View in context: https://bugs.webkit.org/attachment.cgi?id=298319&action=review > Source/WTF/wtf/persistence/Coders.cpp:35 > +#include "NetworkCacheCoders.h" > + > +#if ENABLE(NETWORK_CACHE) > + > +#include <wtf/text/CString.h> > +#include <wtf/text/WTFString.h> > + > +namespace WebKit { > +namespace NetworkCache { Are you planning to get rid of the ENABLE(NETWORK_CACHE) and namespace NetworkCache? > Source/WTF/wtf/persistence/Coders.cpp:160 > +// Store common HTTP headers as strings instead of using their value in the HTTPHeaderName enumeration > +// so that the headers stored in the cache stays valid even after HTTPHeaderName.in gets updated. > +void Coder<WebCore::HTTPHeaderMap>::encode(Encoder& encoder, const WebCore::HTTPHeaderMap& headers) Er, surely WTF cannot depend on WebCore.
Antti Koivisto
Comment 10 2017-01-08 16:31:21 PST
> Are you planning to get rid of the ENABLE(NETWORK_CACHE) and namespace > NetworkCache? > Er, surely WTF cannot depend on WebCore. If you look further in the patch you see them changed appropriately. This is just how move/edit patches end up looking like.
Antti Koivisto
Comment 11 2017-01-08 16:34:06 PST
WebKit Commit Bot
Comment 12 2017-01-08 16:35:14 PST
Attachment 298323 [details] did not pass style-queue: ERROR: Source/WTF/wtf/persistence/Encoder.h:94: More than one command on the same line [whitespace/newline] [4] ERROR: Source/WTF/wtf/persistence/Encoder.h:95: More than one command on the same line [whitespace/newline] [4] ERROR: Source/WTF/wtf/persistence/Encoder.h:96: More than one command on the same line [whitespace/newline] [4] ERROR: Source/WTF/wtf/persistence/Encoder.h:97: More than one command on the same line [whitespace/newline] [4] ERROR: Source/WTF/wtf/persistence/Encoder.h:98: More than one command on the same line [whitespace/newline] [4] ERROR: Source/WTF/wtf/persistence/Encoder.h:99: More than one command on the same line [whitespace/newline] [4] ERROR: Source/WTF/wtf/persistence/Encoder.h:100: More than one command on the same line [whitespace/newline] [4] ERROR: Source/WTF/wtf/persistence/Encoder.h:101: More than one command on the same line [whitespace/newline] [4] ERROR: Source/WTF/wtf/persistence/Encoder.h:102: More than one command on the same line [whitespace/newline] [4] ERROR: Source/WTF/wtf/persistence/Encoder.h:103: More than one command on the same line [whitespace/newline] [4] Total errors found: 10 in 22 files If any of these errors are false positives, please file a bug against check-webkit-style.
Sam Weinig
Comment 13 2017-01-08 18:05:13 PST
Comment on attachment 298323 [details] patch Looks good, rs=me. What do you plan on persisting now :) ?
Sam Weinig
Comment 14 2017-01-08 18:08:37 PST
Probably useful to move NetworkCache::Data, NetworkCache::IOChannel, and the helpers in NetworkCacheFileSystem.h at some point. (As well as WebKit::SharedMemory I guess).
Antti Koivisto
Comment 15 2017-01-09 04:21:09 PST
> Looks good, rs=me. What do you plan on persisting now :) ? JS related things!
Antti Koivisto
Comment 16 2017-01-09 04:45:20 PST
Konstantin Tokarev
Comment 17 2017-01-09 05:12:15 PST
Comment on attachment 298323 [details] patch View in context: https://bugs.webkit.org/attachment.cgi?id=298323&action=review > Source/WebKit2/NetworkProcess/cache/NetworkCacheCoders.h:43 > +namespace Persistence { It does not feel right to have code in namespace WTF inside WebKit2
Antti Koivisto
Comment 18 2017-01-09 05:42:15 PST
> It does not feel right to have code in namespace WTF inside WebKit2 Nevertheless it is a rather common pattern for traits-like templates (search for it in WebCore).
Note You need to log in before you can comment on or make changes to this bug.