Bug 195841 - Have smaller default quotas for third party frames
Summary: Have smaller default quotas for third party frames
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Service Workers (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: youenn fablet
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2019-03-15 20:18 PDT by youenn fablet
Modified: 2019-03-20 15:17 PDT (History)
7 users (show)

See Also:


Attachments
Patch (6.82 KB, patch)
2019-03-15 20:23 PDT, youenn fablet
no flags Details | Formatted Diff | Diff
Patch (6.90 KB, patch)
2019-03-15 22:08 PDT, youenn fablet
no flags Details | Formatted Diff | Diff
Patch for landing (8.44 KB, patch)
2019-03-20 14:48 PDT, youenn fablet
no flags Details | Formatted Diff | Diff
Patch for landing (8.44 KB, patch)
2019-03-20 14:57 PDT, youenn fablet
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description youenn fablet 2019-03-15 20:18:10 PDT
Have smaller default quotas for third party frames
Comment 1 youenn fablet 2019-03-15 20:23:27 PDT
Created attachment 364903 [details]
Patch
Comment 2 youenn fablet 2019-03-15 22:08:47 PDT
Created attachment 364916 [details]
Patch
Comment 3 Geoffrey Garen 2019-03-16 13:54:04 PDT
Comment on attachment 364916 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=364916&action=review

> Source/WebKit/NetworkProcess/NetworkProcess.cpp:2342
> +        auto quota = origin.topOrigin == origin.clientOrigin ? storageQuotaManagers.defaultQuota : storageQuotaManagers.defaultQuota / 10;

Rather than dividing by 10, I think we want a thirdPartyQuota() helper function to match the defaultQuota() helper function. That way, they’ll be next to each other, and we’ll remember to update them together. (Dividing by 10 might not be right in the future, if we reduce the default quota.)
Comment 4 youenn fablet 2019-03-20 14:48:14 PDT
Created attachment 365405 [details]
Patch for landing
Comment 5 EWS Watchlist 2019-03-20 14:51:32 PDT
Attachment 365405 [details] did not pass style-queue:


ERROR: Source/WebKit/NetworkProcess/NetworkProcess.cpp:2032:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
Total errors found: 1 in 9 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 6 youenn fablet 2019-03-20 14:57:08 PDT
Created attachment 365406 [details]
Patch for landing
Comment 7 WebKit Commit Bot 2019-03-20 15:15:09 PDT
Comment on attachment 365406 [details]
Patch for landing

Clearing flags on attachment: 365406

Committed r243247: <https://trac.webkit.org/changeset/243247>
Comment 8 WebKit Commit Bot 2019-03-20 15:15:10 PDT
All reviewed patches have been landed.  Closing bug.
Comment 9 Radar WebKit Bug Importer 2019-03-20 15:17:59 PDT
<rdar://problem/49081407>