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 231771
Add a callback to know when the service worker loads via -[WKWebView _loadServiceWorker:]
https://bugs.webkit.org/show_bug.cgi?id=231771
Summary
Add a callback to know when the service worker loads via -[WKWebView _loadSer...
Timothy Hatcher
Reported
2021-10-14 14:17:51 PDT
Currently there is no way to know the service worker has loaded. Currently `webView:didFinishNavigation:` fires early and the service worker loads after this. A new delegate or a completion handler on _loadServiceWorker: would be great. The completion handler should likely pass an `NSError`, or `bool` for success or failure reporting.
Attachments
Patch
(21.25 KB, patch)
2021-10-18 09:44 PDT
,
Chris Dumez
no flags
Details
Formatted Diff
Diff
Patch
(21.54 KB, patch)
2021-10-18 11:16 PDT
,
Chris Dumez
no flags
Details
Formatted Diff
Diff
Patch
(24.01 KB, patch)
2021-10-18 12:37 PDT
,
Chris Dumez
no flags
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2021-10-14 14:26:23 PDT
<
rdar://problem/84274364
>
Chris Dumez
Comment 2
2021-10-18 09:44:33 PDT
Created
attachment 441618
[details]
Patch
Chris Dumez
Comment 3
2021-10-18 11:16:58 PDT
Created
attachment 441624
[details]
Patch
Alex Christensen
Comment 4
2021-10-18 12:08:02 PDT
Comment on
attachment 441624
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=441624&action=review
> Source/WebKit/UIProcess/WebPageProxy.cpp:4812 > + m_serviceWorkerLaunchCompletionHandler(false);
I think you need this in the destructor too.
Chris Dumez
Comment 5
2021-10-18 12:09:33 PDT
(In reply to Alex Christensen from
comment #4
)
> Comment on
attachment 441624
[details]
> Patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=441624&action=review
> > > Source/WebKit/UIProcess/WebPageProxy.cpp:4812 > > + m_serviceWorkerLaunchCompletionHandler(false); > > I think you need this in the destructor too.
Good point, will fix.
Chris Dumez
Comment 6
2021-10-18 12:37:34 PDT
Created
attachment 441631
[details]
Patch
EWS
Comment 7
2021-10-18 15:21:48 PDT
Committed
r284406
(
243179@main
): <
https://commits.webkit.org/243179@main
> All reviewed patches have been landed. Closing bug and clearing flags on
attachment 441631
[details]
.
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