WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
234366
Move WebIDBServers from NetworkProcess to NetworkSession class
https://bugs.webkit.org/show_bug.cgi?id=234366
Summary
Move WebIDBServers from NetworkProcess to NetworkSession class
Chris Dumez
Reported
2021-12-15 14:20:57 PST
Move WebIDBServers from NetworkProcess to NetworkSession class, since they are per session.
Attachments
Patch
(27.89 KB, patch)
2021-12-15 14:23 PST
,
Chris Dumez
ews-feeder
: commit-queue-
Details
Formatted Diff
Diff
Patch
(28.64 KB, patch)
2021-12-15 14:39 PST
,
Chris Dumez
no flags
Details
Formatted Diff
Diff
Patch
(28.90 KB, patch)
2021-12-15 15:10 PST
,
Chris Dumez
ews-feeder
: commit-queue-
Details
Formatted Diff
Diff
Patch
(28.90 KB, patch)
2021-12-15 15:34 PST
,
Chris Dumez
no flags
Details
Formatted Diff
Diff
Patch
(88.71 KB, patch)
2021-12-16 07:52 PST
,
Chris Dumez
no flags
Details
Formatted Diff
Diff
Patch
(104.72 KB, patch)
2021-12-16 11:42 PST
,
Chris Dumez
ews-feeder
: commit-queue-
Details
Formatted Diff
Diff
Patch
(105.25 KB, patch)
2021-12-16 11:53 PST
,
Chris Dumez
ews-feeder
: commit-queue-
Details
Formatted Diff
Diff
Patch
(105.28 KB, patch)
2021-12-16 11:59 PST
,
Chris Dumez
ews-feeder
: commit-queue-
Details
Formatted Diff
Diff
Patch
(105.83 KB, patch)
2021-12-16 12:10 PST
,
Chris Dumez
ews-feeder
: commit-queue-
Details
Formatted Diff
Diff
Patch
(112.58 KB, patch)
2021-12-16 12:28 PST
,
Chris Dumez
no flags
Details
Formatted Diff
Diff
Show Obsolete
(9)
View All
Add attachment
proposed patch, testcase, etc.
Chris Dumez
Comment 1
2021-12-15 14:23:19 PST
Created
attachment 447284
[details]
Patch
Chris Dumez
Comment 2
2021-12-15 14:39:42 PST
Created
attachment 447286
[details]
Patch
Chris Dumez
Comment 3
2021-12-15 15:10:47 PST
Created
attachment 447288
[details]
Patch
Chris Dumez
Comment 4
2021-12-15 15:34:32 PST
Created
attachment 447292
[details]
Patch
Darin Adler
Comment 5
2021-12-15 17:47:27 PST
Comment on
attachment 447292
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=447292&action=review
Looks like a good, relatively straightforward refactoring. I didn’t spot anything obviously missing.
> Source/WebKit/NetworkProcess/NetworkProcess.cpp:393 > + if (auto* networkSession = this->networkSession(sessionID)) > + networkSession->ensureWebIDBServer().addConnection(connection.connection(), identifier);
Tempting to just use "session" to avoid the need for "this->" and possibly make things even more readable. Other cases of that below.
> Source/WebKit/NetworkProcess/NetworkProcess.cpp:1847 > + auto* session = this->networkSession(sessionID);
Not sure we need the "this->" here since there is no name collision.
> Source/WebKit/NetworkProcess/NetworkSession.cpp:677 > + // ********* > + // IMPORTANT: Do not change the directory structure for indexed databases on disk without first consulting a reviewer from Apple (<
rdar://problem/17454712
>) > + // *********
This is clearly a valuable comment. But is this function the absolute best place for it?
> Source/WebKit/NetworkProcess/ios/NetworkProcessIOS.mm:120 > + forEachNetworkSession([](auto& networkSession) {
Formatting tweak: can’t remember if we use spaces here. Cod style tweak: Always love the single words when the scope is small enough, so just "session" would be nice.
Chris Dumez
Comment 6
2021-12-16 07:15:09 PST
(In reply to Darin Adler from
comment #5
)
> Comment on
attachment 447292
[details]
> Patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=447292&action=review
> > Looks like a good, relatively straightforward refactoring. I didn’t spot > anything obviously missing. > > > Source/WebKit/NetworkProcess/NetworkProcess.cpp:393 > > + if (auto* networkSession = this->networkSession(sessionID)) > > + networkSession->ensureWebIDBServer().addConnection(connection.connection(), identifier); > > Tempting to just use "session" to avoid the need for "this->" and possibly > make things even more readable. Other cases of that below.
Will fix.
> > Source/WebKit/NetworkProcess/NetworkProcess.cpp:1847 > > + auto* session = this->networkSession(sessionID); > > Not sure we need the "this->" here since there is no name collision.
I had to for this one because there is a networkSession variable outside the lambda and the compiler was complaining that it couldn't be called as a function and wasn't captured in the lambda.
> > Source/WebKit/NetworkProcess/NetworkSession.cpp:677 > > + // ********* > > + // IMPORTANT: Do not change the directory structure for indexed databases on disk without first consulting a reviewer from Apple (<
rdar://problem/17454712
>) > > + // ********* > > This is clearly a valuable comment. But is this function the absolute best > place for it? > > > Source/WebKit/NetworkProcess/ios/NetworkProcessIOS.mm:120 > > + forEachNetworkSession([](auto& networkSession) { > > Formatting tweak: can’t remember if we use spaces here. > Cod style tweak: Always love the single words when the scope is small > enough, so just "session" would be nice.
Ok.
Chris Dumez
Comment 7
2021-12-16 07:52:27 PST
Created
attachment 447354
[details]
Patch
Chris Dumez
Comment 8
2021-12-16 11:42:46 PST
Created
attachment 447376
[details]
Patch
Chris Dumez
Comment 9
2021-12-16 11:53:35 PST
Created
attachment 447377
[details]
Patch
Chris Dumez
Comment 10
2021-12-16 11:59:11 PST
Created
attachment 447379
[details]
Patch
Chris Dumez
Comment 11
2021-12-16 12:10:03 PST
Created
attachment 447381
[details]
Patch
Chris Dumez
Comment 12
2021-12-16 12:28:24 PST
Created
attachment 447384
[details]
Patch
EWS
Comment 13
2021-12-16 14:39:02 PST
Committed
r287159
(
245336@main
): <
https://commits.webkit.org/245336@main
> All reviewed patches have been landed. Closing bug and clearing flags on
attachment 447384
[details]
.
Radar WebKit Bug Importer
Comment 14
2021-12-16 15:09:59 PST
<
rdar://problem/86598786
>
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