WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
178350
Cache API implementation should be able to compute storage size for WebKit client applications.
https://bugs.webkit.org/show_bug.cgi?id=178350
Summary
Cache API implementation should be able to compute storage size for WebKit cl...
youenn fablet
Reported
2017-10-16 10:55:25 PDT
Cache API implementation should be able to compute storage size for WebKit client applications.
Attachments
Patch
(19.02 KB, patch)
2017-10-16 14:10 PDT
,
youenn fablet
no flags
Details
Formatted Diff
Diff
Patch
(18.52 KB, patch)
2017-10-17 10:23 PDT
,
youenn fablet
no flags
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2017-10-16 14:08:51 PDT
<
rdar://problem/35014434
>
youenn fablet
Comment 2
2017-10-16 14:10:00 PDT
Created
attachment 323939
[details]
Patch
Chris Dumez
Comment 3
2017-10-16 19:15:27 PDT
Comment on
attachment 323939
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=323939&action=review
r=me with changes.
> Source/WebKit/ChangeLog:8 > + When gathering data from DOM Cache, we compute the size as follow:
as follows:
> Source/WebKit/ChangeLog:9 > + - If caches is not persistent, size is zero
caches (plural) vs is (singular)
> Source/WebKit/ChangeLog:10 > + - If caches is persistent, we use the size computed by NetworkCache::Storage.
caches (plural) vs is (singular)
> Source/WebCore/page/SecurityOriginData.h:70 > + bool equals(const SecurityOriginData& data) const
There is already an operator==() on this class.
> Source/WebKit/NetworkProcess/cache/CacheStorageEngine.cpp:402 > + taskCounter->addOrigin(WTFMove(origin), result.value().get().storageSize());
Can .get(). be replace by -> ?
> Source/WebKit/UIProcess/API/C/WKWebsiteDataStoreRef.cpp:379 > + for (const auto& dataRecord : dataRecords) {
We usually omit the const.
> Source/WebKit/UIProcess/API/C/WKWebsiteDataStoreRef.cpp:380 > + for (const auto& recordOrigin : dataRecord.origins) {
We usually omit the const.
> Source/WebKit/UIProcess/API/C/WKWebsiteDataStoreRef.cpp:381 > + if (WebKit::toImpl(origin)->string() == recordOrigin.securityOrigin()->toString()) {
Seems inefficient to Stringify just to compare. Assuming recordOrigin is a SecurityOriginData, we could do: SecurityOriginData::fromSecurityOrigin(origin) == recordOrigin. Also, we could cache SecurityOriginData::fromSecurityOrigin(origin) before the loops.
youenn fablet
Comment 4
2017-10-17 10:23:29 PDT
Created
attachment 324025
[details]
Patch
WebKit Commit Bot
Comment 5
2017-10-17 11:21:41 PDT
Comment on
attachment 324025
[details]
Patch Clearing flags on attachment: 324025 Committed
r223558
: <
https://trac.webkit.org/changeset/223558
>
WebKit Commit Bot
Comment 6
2017-10-17 11:21:42 PDT
All reviewed patches have been landed. Closing bug.
Alex Christensen
Comment 7
2017-10-19 18:32:08 PDT
Youenn, please stop adding C SPI without corresponding ObjC SPI. It takes my project a step in the wrong direction. Chris, please r- any patches that add C SPI without adding corresponding ObjC SPI.
Chris Dumez
Comment 8
2017-10-19 18:40:29 PDT
(In reply to Alex Christensen from
comment #7
)
> Youenn, please stop adding C SPI without corresponding ObjC SPI. It takes > my project a step in the wrong direction. > Chris, please r- any patches that add C SPI without adding corresponding > ObjC SPI.
Ok.
youenn fablet
Comment 9
2017-10-19 18:46:06 PDT
(In reply to Alex Christensen from
comment #7
)
> Youenn, please stop adding C SPI without corresponding ObjC SPI. It takes > my project a step in the wrong direction. > Chris, please r- any patches that add C SPI without adding corresponding > ObjC SPI.
There is no plan to make use of this SPI outside WebKitTestRunner. I do not plan to add a corresponding ObjC SPI. Maybe we can move it elsewhere to ensure it never gets used outside WebKitTestRunner.
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