Summary: | Allow retrieving Cache Storage records for a given URL only | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | youenn fablet <youennf> | ||||||||||||
Component: | WebCore Misc. | Assignee: | youenn fablet <youennf> | ||||||||||||
Status: | RESOLVED FIXED | ||||||||||||||
Severity: | Normal | CC: | achristensen, buildbot, cdumez, cgarcia, commit-queue, webkit-bug-importer | ||||||||||||
Priority: | P2 | Keywords: | InRadar | ||||||||||||
Version: | WebKit Nightly Build | ||||||||||||||
Hardware: | Unspecified | ||||||||||||||
OS: | Unspecified | ||||||||||||||
Attachments: |
|
Description
youenn fablet
2017-08-31 17:23:43 PDT
Created attachment 319551 [details]
Patch
Attachment 319551 [details] did not pass style-queue:
ERROR: Source/WebKit/NetworkProcess/cache/CacheStorageEngineCache.cpp:159: More than one command on the same line [whitespace/newline] [4]
ERROR: Source/WebKit/NetworkProcess/cache/CacheStorageEngineCache.cpp:197: More than one command on the same line [whitespace/newline] [4]
Total errors found: 2 in 18 files
If any of these errors are false positives, please file a bug against check-webkit-style.
Created attachment 319596 [details]
Patch
Created attachment 319605 [details]
Patch
Attachment 319605 [details] did not pass style-queue:
ERROR: Source/WebKit/NetworkProcess/cache/CacheStorageEngineCache.cpp:159: More than one command on the same line [whitespace/newline] [4]
ERROR: Source/WebKit/NetworkProcess/cache/CacheStorageEngineCache.cpp:197: More than one command on the same line [whitespace/newline] [4]
Total errors found: 2 in 18 files
If any of these errors are false positives, please file a bug against check-webkit-style.
Created attachment 319610 [details]
Patch
Attachment 319610 [details] did not pass style-queue:
ERROR: Source/WebKit/NetworkProcess/cache/CacheStorageEngineCache.cpp:159: More than one command on the same line [whitespace/newline] [4]
ERROR: Source/WebKit/NetworkProcess/cache/CacheStorageEngineCache.cpp:197: More than one command on the same line [whitespace/newline] [4]
Total errors found: 2 in 18 files
If any of these errors are false positives, please file a bug against check-webkit-style.
WPE bots error is unrelated. Comment on attachment 319610 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=319610&action=review > Source/WebCore/Modules/cache/Cache.cpp:388 > + retrieveURL.setQuery({ }); Do we want to remove the fragment here, too? > Source/WebKit/NetworkProcess/cache/CacheStorageEngineCache.cpp:104 > + if (keyURL.hasQuery()) > + keyURL.setQuery({ }); > + keyURL.removeFragmentIdentifier(); Maybe we should make a method to do both of these at the same time. That would avoid an unnecessary string allocation and copy. > Source/WebKit/NetworkProcess/cache/CacheStorageEngineCache.cpp:116 > + Vector<Record> newRecords; > + newRecords.reserveInitialCapacity(1); > + newRecords.uncheckedAppend(WTFMove(record)); > + return m_records.set(key, WTFMove(newRecords)).iterator->value.last(); { WTFMove(record) } Created attachment 319905 [details]
Patch for landing
Attachment 319905 [details] did not pass style-queue:
ERROR: Source/WebKit/NetworkProcess/cache/CacheStorageEngineCache.cpp:159: More than one command on the same line [whitespace/newline] [4]
ERROR: Source/WebKit/NetworkProcess/cache/CacheStorageEngineCache.cpp:197: More than one command on the same line [whitespace/newline] [4]
Total errors found: 2 in 18 files
If any of these errors are false positives, please file a bug against check-webkit-style.
Thanks for the review. (In reply to Alex Christensen from comment #9) > Comment on attachment 319610 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=319610&action=review > > > Source/WebCore/Modules/cache/Cache.cpp:388 > > + retrieveURL.setQuery({ }); > > Do we want to remove the fragment here, too? OK > > Source/WebKit/NetworkProcess/cache/CacheStorageEngineCache.cpp:104 > > + if (keyURL.hasQuery()) > > + keyURL.setQuery({ }); > > + keyURL.removeFragmentIdentifier(); > > Maybe we should make a method to do both of these at the same time. That > would avoid an unnecessary string allocation and copy. Will do in a follow-up > > Source/WebKit/NetworkProcess/cache/CacheStorageEngineCache.cpp:116 > > + Vector<Record> newRecords; > > + newRecords.reserveInitialCapacity(1); > > + newRecords.uncheckedAppend(WTFMove(record)); > > + return m_records.set(key, WTFMove(newRecords)).iterator->value.last(); > > { WTFMove(record) } That is not working. Probably need a tweak in Vector.h. I'll try to fix that in a follow-up. Comment on attachment 319905 [details] Patch for landing Clearing flags on attachment: 319905 Committed r221624: <http://trac.webkit.org/changeset/221624> All reviewed patches have been landed. Closing bug. |