WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
Bug 203410
WebProcess should unregister its interest for a SWServerRegistration when all its corresponding ServiceWorkerRegistrations are destroyed
https://bugs.webkit.org/show_bug.cgi?id=203410
Summary
WebProcess should unregister its interest for a SWServerRegistration when all...
youenn fablet
Reported
2019-10-25 07:22:42 PDT
WebProcess should unregister its interest for a SWServerRegistration when all its corresponding ServiceWorkerRegistrations are destroyed
Attachments
Patch
(8.40 KB, patch)
2019-10-25 07:28 PDT
,
youenn fablet
no flags
Details
Formatted Diff
Diff
Patch
(8.39 KB, patch)
2019-10-25 07:35 PDT
,
youenn fablet
no flags
Details
Formatted Diff
Diff
Patch
(8.50 KB, patch)
2019-10-25 08:06 PDT
,
youenn fablet
no flags
Details
Formatted Diff
Diff
Patch
(8.48 KB, patch)
2019-10-25 08:51 PDT
,
youenn fablet
no flags
Details
Formatted Diff
Diff
Show Obsolete
(3)
View All
Add attachment
proposed patch, testcase, etc.
youenn fablet
Comment 1
2019-10-25 07:28:07 PDT
Created
attachment 381913
[details]
Patch
youenn fablet
Comment 2
2019-10-25 07:30:02 PDT
***
Bug 203218
has been marked as a duplicate of this bug. ***
youenn fablet
Comment 3
2019-10-25 07:30:38 PDT
<
rdar://problem/56480245
>
youenn fablet
Comment 4
2019-10-25 07:35:08 PDT
Created
attachment 381914
[details]
Patch
youenn fablet
Comment 5
2019-10-25 08:06:55 PDT
Created
attachment 381923
[details]
Patch
Chris Dumez
Comment 6
2019-10-25 08:14:37 PDT
Comment on
attachment 381923
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=381923&action=review
> Source/WebKit/WebProcess/Storage/WebSWClientConnection.cpp:89 > send(Messages::WebSWServerConnection::AddServiceWorkerRegistrationInServer { identifier });
Why do we send unconditionally and and not when going from 0 to 1?
> Source/WebKit/WebProcess/WebProcess.cpp:1765 > +bool WebProcess::decrementServiceWorkerRegistrationCount(WebCore::ServiceWorkerRegistrationIdentifier identifier)
It is unclear from the name what the returned boolean means. I think it should be factored differently.
> Source/WebKit/WebProcess/WebProcess.h:585 > + HashMap<WebCore::ServiceWorkerRegistrationIdentifier, size_t> m_swRegistrationCounts;
Seems like a perfect use case for a HashCountedSet?
youenn fablet
Comment 7
2019-10-25 08:37:13 PDT
> > Source/WebKit/WebProcess/Storage/WebSWClientConnection.cpp:89 > > send(Messages::WebSWServerConnection::AddServiceWorkerRegistrationInServer { identifier }); > > Why do we send unconditionally and and not when going from 0 to 1?
I preferred not doing that because we probably have an issue in case of network process crash where we should reregister them. Currently, we keep the status quo which gives a chance for a reload to fix the issue. Once we update the code to handle network process crash, we should indeed do that.
> > Source/WebKit/WebProcess/WebProcess.h:585 > > + HashMap<WebCore::ServiceWorkerRegistrationIdentifier, size_t> m_swRegistrationCounts; > > Seems like a perfect use case for a HashCountedSet?
OK, will do.
youenn fablet
Comment 8
2019-10-25 08:51:46 PDT
Created
attachment 381927
[details]
Patch
Chris Dumez
Comment 9
2019-10-25 08:56:31 PDT
Comment on
attachment 381927
[details]
Patch r=me.
WebKit Commit Bot
Comment 10
2019-10-25 12:04:35 PDT
Comment on
attachment 381927
[details]
Patch Clearing flags on attachment: 381927 Committed
r251598
: <
https://trac.webkit.org/changeset/251598
>
WebKit Commit Bot
Comment 11
2019-10-25 12:04:36 PDT
All reviewed patches have been landed. Closing bug.
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