WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
176202
Allow retrieving Cache Storage records for a given URL only
https://bugs.webkit.org/show_bug.cgi?id=176202
Summary
Allow retrieving Cache Storage records for a given URL only
youenn fablet
Reported
2017-08-31 17:23:43 PDT
For efficiency, allow retrieving Cache Storage records for a given URL only.
Attachments
Patch
(30.07 KB, patch)
2017-08-31 17:29 PDT
,
youenn fablet
no flags
Details
Formatted Diff
Diff
Patch
(30.09 KB, patch)
2017-09-01 08:49 PDT
,
youenn fablet
no flags
Details
Formatted Diff
Diff
Patch
(30.20 KB, patch)
2017-09-01 09:49 PDT
,
youenn fablet
no flags
Details
Formatted Diff
Diff
Patch
(30.20 KB, patch)
2017-09-01 10:18 PDT
,
youenn fablet
no flags
Details
Formatted Diff
Diff
Patch for landing
(30.60 KB, patch)
2017-09-05 09:34 PDT
,
youenn fablet
no flags
Details
Formatted Diff
Diff
Show Obsolete
(4)
View All
Add attachment
proposed patch, testcase, etc.
youenn fablet
Comment 1
2017-08-31 17:29:54 PDT
Created
attachment 319551
[details]
Patch
Build Bot
Comment 2
2017-08-31 17:30:52 PDT
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.
youenn fablet
Comment 3
2017-09-01 08:49:00 PDT
Created
attachment 319596
[details]
Patch
youenn fablet
Comment 4
2017-09-01 09:49:45 PDT
Created
attachment 319605
[details]
Patch
Build Bot
Comment 5
2017-09-01 09:51:07 PDT
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.
youenn fablet
Comment 6
2017-09-01 10:18:50 PDT
Created
attachment 319610
[details]
Patch
Build Bot
Comment 7
2017-09-01 10:19:59 PDT
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.
youenn fablet
Comment 8
2017-09-01 12:27:41 PDT
WPE bots error is unrelated.
Alex Christensen
Comment 9
2017-09-01 14:57:37 PDT
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) }
youenn fablet
Comment 10
2017-09-05 09:34:55 PDT
Created
attachment 319905
[details]
Patch for landing
Build Bot
Comment 11
2017-09-05 09:36:47 PDT
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.
youenn fablet
Comment 12
2017-09-05 09:40:59 PDT
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.
WebKit Commit Bot
Comment 13
2017-09-05 10:52:55 PDT
Comment on
attachment 319905
[details]
Patch for landing Clearing flags on attachment: 319905 Committed
r221624
: <
http://trac.webkit.org/changeset/221624
>
WebKit Commit Bot
Comment 14
2017-09-05 10:52:57 PDT
All reviewed patches have been landed. Closing bug.
Radar WebKit Bug Importer
Comment 15
2017-09-27 12:43:42 PDT
<
rdar://problem/34693839
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug