WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED DUPLICATE of
bug 230750
210313
Use NetworkSessionCocoa::isolatedSession for all loads
https://bugs.webkit.org/show_bug.cgi?id=210313
Summary
Use NetworkSessionCocoa::isolatedSession for all loads
Alex Christensen
Reported
2020-04-09 18:52:22 PDT
Use NetworkSessionCocoa::isolatedSession for all loads
Attachments
Patch
(20.35 KB, patch)
2020-04-09 18:55 PDT
,
Alex Christensen
no flags
Details
Formatted Diff
Diff
Patch
(20.47 KB, patch)
2020-04-17 13:49 PDT
,
Alex Christensen
no flags
Details
Formatted Diff
Diff
Patch
(49.66 KB, patch)
2020-04-21 17:37 PDT
,
Alex Christensen
no flags
Details
Formatted Diff
Diff
Patch
(40.05 KB, patch)
2020-04-22 12:30 PDT
,
Alex Christensen
no flags
Details
Formatted Diff
Diff
Show Obsolete
(3)
View All
Add attachment
proposed patch, testcase, etc.
Alex Christensen
Comment 1
2020-04-09 18:55:28 PDT
Created
attachment 396031
[details]
Patch
Alex Christensen
Comment 2
2020-04-09 18:55:30 PDT
<
rdar://problem/59854450
>
Alex Christensen
Comment 3
2020-04-17 13:49:27 PDT
Created
attachment 396791
[details]
Patch
John Wilander
Comment 4
2020-04-17 15:08:27 PDT
Comment on
attachment 396791
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=396791&action=review
> Source/WebKit/NetworkProcess/NetworkProcess.cpp:2663 > + completionHandler(true);
Is this something we can get rid of all together?
> Source/WebKit/NetworkProcess/Downloads/cocoa/DownloadCocoa.mm:79 > + // ALSO: We should double check that removing an isolated session in NetworkSessionCocoa::isolatedSession with an active download doesn't stop that download.
Could isolatedSessions be told that they're being used for a download? If so, we need to think about abuse cases: 1. A website deliberately starts an infinite download only to keep its isolated session. 2. A website makes a set of redirects to start infinite downloads for isolated sessions in order to consume resources, potentially exhausting the available isolated sessions.
> Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.mm:1198 > + auto firstParty = WebCore::RegistrableDomain(request.firstPartyForCookies());
We really should make request.firstPartyForCookies() return a RegistrableDomain. I believe that's the only way it's used. If not, we should have a lazy function to get the RegistrableDomain. This conversion is done too often.
> Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.mm:1204 > + return isolatedSession(WebCore::StoredCredentialsPolicy::Use, WebCore::RegistrableDomain(url), NavigatingToAppBoundDomain::No);
Could this be the place to pass on info about being used for a download? I assume we need to consider scenarios where more than one download is ongoing and all of them must be completed before we discard the isolated session.
Alex Christensen
Comment 5
2020-04-20 16:05:39 PDT
(In reply to John Wilander from
comment #4
)
> Comment on
attachment 396791
[details]
> Patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=396791&action=review
> > > Source/WebKit/NetworkProcess/NetworkProcess.cpp:2663 > > + completionHandler(true); > > Is this something we can get rid of all together?
Yes. I was just seeing what tests I need to work on with this last patch.
> > Source/WebKit/NetworkProcess/Downloads/cocoa/DownloadCocoa.mm:79 > > + // ALSO: We should double check that removing an isolated session in NetworkSessionCocoa::isolatedSession with an active download doesn't stop that download. > > Could isolatedSessions be told that they're being used for a download? If > so, we need to think about abuse cases: > 1. A website deliberately starts an infinite download only to keep its > isolated session. > 2. A website makes a set of redirects to start infinite downloads for > isolated sessions in order to consume resources, potentially exhausting the > available isolated sessions.
A download would only keep the NSURLSession alive, not the isolatedSession. I don't think this is an issue.
Geoffrey Garen
Comment 6
2020-04-21 14:37:50 PDT
Are the EWS failures real?
Alex Christensen
Comment 7
2020-04-21 14:38:16 PDT
yes, I'm working on fixing them and finishing this right now.
Geoffrey Garen
Comment 8
2020-04-21 14:39:15 PDT
Also: Can you submit a PLT A/B test with this change?
Alex Christensen
Comment 9
2020-04-21 14:39:49 PDT
Yes, it will definitely need such perf analysis.
Alex Christensen
Comment 10
2020-04-21 17:37:28 PDT
Created
attachment 397148
[details]
Patch
Alex Christensen
Comment 11
2020-04-21 17:37:49 PDT
Comment on
attachment 397148
[details]
Patch closer but still not there.
Alex Christensen
Comment 12
2020-04-22 12:30:36 PDT
Created
attachment 397235
[details]
Patch
Alex Christensen
Comment 13
2021-09-28 16:45:29 PDT
*** This bug has been marked as a duplicate of
bug 230750
***
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