RESOLVED FIXED 142215
Include key to NetworkCacheStorage::Entry
https://bugs.webkit.org/show_bug.cgi?id=142215
Summary Include key to NetworkCacheStorage::Entry
Antti Koivisto
Reported 2015-03-03 06:28:43 PST
This simplified code. The key is saved as part of the entry so it makes logical sense too.
Attachments
patch (21.21 KB, patch)
2015-03-03 06:51 PST, Antti Koivisto
no flags
Antti Koivisto
Comment 1 2015-03-03 06:51:51 PST
WebKit Commit Bot
Comment 2 2015-03-03 06:54:03 PST
Attachment 247757 [details] did not pass style-queue: ERROR: Source/WebKit2/NetworkProcess/cache/NetworkCacheStorage.h:153: Extra space before ( in function call [whitespace/parens] [4] ERROR: Source/WebKit2/NetworkProcess/cache/NetworkCacheStorageCocoa.mm:496: Extra space before ( in function call [whitespace/parens] [4] Total errors found: 2 in 6 files If any of these errors are false positives, please file a bug against check-webkit-style.
Chris Dumez
Comment 3 2015-03-03 09:39:38 PST
Comment on attachment 247757 [details] patch View in context: https://bugs.webkit.org/attachment.cgi?id=247757&action=review r=me with a question. > Source/WebKit2/NetworkProcess/cache/NetworkCacheStorageCocoa.mm:304 > + return std::unique_ptr<NetworkCacheStorage::Entry>(new NetworkCacheStorage::Entry { Why are you moving away from std::make_unique<>() in this patch? I personally prefer std::make_unique<>() than explicitly calling new. > Source/WebKit2/NetworkProcess/cache/NetworkCacheStorageCocoa.mm:458 > + m_pendingReadOperationsByPriority[priority].append(new ReadOperation { key, WTF::move(completionHandler) }); ditto here and a couple of other places.
Antti Koivisto
Comment 4 2015-03-03 11:28:18 PST
(In reply to comment #3) > Why are you moving away from std::make_unique<>() in this patch? I > personally prefer std::make_unique<>() than explicitly calling new. It seemed cleaner to do regular initialisation in cases where make_unique doesn't actually make code more compact.
WebKit Commit Bot
Comment 5 2015-03-03 12:13:40 PST
Comment on attachment 247757 [details] patch Clearing flags on attachment: 247757 Committed r180949: <http://trac.webkit.org/changeset/180949>
WebKit Commit Bot
Comment 6 2015-03-03 12:13:43 PST
All reviewed patches have been landed. Closing bug.
Andreas Kling
Comment 7 2015-03-03 13:58:04 PST
(In reply to comment #4) > (In reply to comment #3) > > Why are you moving away from std::make_unique<>() in this patch? I > > personally prefer std::make_unique<>() than explicitly calling new. > > It seemed cleaner to do regular initialisation in cases where make_unique > doesn't actually make code more compact. Gross. I'd prefer if we didn't introduce more naked news outside of construction helpers.
Note You need to log in before you can comment on or make changes to this bug.