WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
180383
Add support for ServiceWorkerContainer.prototype.ready
https://bugs.webkit.org/show_bug.cgi?id=180383
Summary
Add support for ServiceWorkerContainer.prototype.ready
Chris Dumez
Reported
2017-12-04 16:19:45 PST
Add support for ServiceWorkerContainer.prototype.ready: -
https://w3c.github.io/ServiceWorker/#navigator-service-worker-ready
Attachments
WIP Patch
(21.24 KB, patch)
2017-12-05 10:53 PST
,
Chris Dumez
no flags
Details
Formatted Diff
Diff
Patch
(25.69 KB, patch)
2017-12-05 10:57 PST
,
Chris Dumez
no flags
Details
Formatted Diff
Diff
Patch
(25.81 KB, patch)
2017-12-05 11:00 PST
,
Chris Dumez
no flags
Details
Formatted Diff
Diff
Patch
(26.56 KB, patch)
2017-12-05 12:09 PST
,
Chris Dumez
no flags
Details
Formatted Diff
Diff
Patch
(26.56 KB, patch)
2017-12-05 12:24 PST
,
Chris Dumez
no flags
Details
Formatted Diff
Diff
Show Obsolete
(4)
View All
Add attachment
proposed patch, testcase, etc.
Chris Dumez
Comment 1
2017-12-05 10:53:54 PST
Created
attachment 328468
[details]
WIP Patch
Chris Dumez
Comment 2
2017-12-05 10:57:15 PST
Created
attachment 328469
[details]
Patch
Chris Dumez
Comment 3
2017-12-05 11:00:48 PST
Created
attachment 328472
[details]
Patch
youenn fablet
Comment 4
2017-12-05 11:39:14 PST
Comment on
attachment 328472
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=328472&action=review
> Source/WebCore/workers/service/SWClientConnection.h:65 > + using WhenRegistrationReadyCallback = WTF::Function<void(ServiceWorkerRegistrationData&&)>;
If this cannot be a CompletionHandler, probably the other callbacks cannot be either.
> Source/WebCore/workers/service/ServiceWorkerContainer.cpp:93 > + return;
I wonder whether ScriptExecutionContext::postTaskTo would be able to prevent these kind of checks in the future.
> Source/WebCore/workers/service/server/SWServer.cpp:650 > + connection->resolveRegistrationReadyRequests(registration);
Since we already expose Connection through getConnection, maybe it is fine to allow iterating in some ways inside SWServerRegistration directly.
> Source/WebKit/StorageProcess/ServiceWorker/WebSWServerConnection.cpp:212 > + m_registrationReadyRequests.append({ topOrigin, clientURL, WTFMove(callback) });
If we want to keep good WK2/WebCore layering, we should probably add this vector somewhere else, maybe at SWServerConnection level. WebSWServerConnection::resolveRegistrationReadyRequests would also move up there. In preexisting code, we should probably add an SWServerConnection::matchRegistration that would return an optional so that we would do less WebCore stuff in WebSWServerConnection::matchRegistration. The same could apply there as well maybe.
> Source/WebKit/WebProcess/Storage/WebSWClientConnection.cpp:158 > +void WebSWClientConnection::whenRegistrationReady(Ref<SecurityOrigin>&& topOrigin, const URL& clientURL, WhenRegistrationReadyCallback&& callback)
Could probably take a const SecurityOrigin&.
Chris Dumez
Comment 5
2017-12-05 12:09:50 PST
Created
attachment 328480
[details]
Patch
WebKit Commit Bot
Comment 6
2017-12-05 12:12:28 PST
Comment on
attachment 328480
[details]
Patch Rejecting
attachment 328480
[details]
from commit-queue. Failed to run "['/Volumes/Data/EWS/WebKit/Tools/Scripts/webkit-patch', '--status-host=webkit-queues.webkit.org', '--bot-id=webkit-cq-02', 'validate-changelog', '--check-oops', '--non-interactive', 328480, '--port=mac']" exit_code: 1 cwd: /Volumes/Data/EWS/WebKit ChangeLog entry in LayoutTests/imported/w3c/ChangeLog contains OOPS!. Full output:
http://webkit-queues.webkit.org/results/5504306
Chris Dumez
Comment 7
2017-12-05 12:24:16 PST
Created
attachment 328483
[details]
Patch
WebKit Commit Bot
Comment 8
2017-12-05 12:56:17 PST
Comment on
attachment 328483
[details]
Patch Clearing flags on attachment: 328483 Committed
r225531
: <
https://trac.webkit.org/changeset/225531
>
WebKit Commit Bot
Comment 9
2017-12-05 12:56:19 PST
All reviewed patches have been landed. Closing bug.
Radar WebKit Bug Importer
Comment 10
2017-12-06 16:48:24 PST
<
rdar://problem/35896620
>
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