WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
180143
ServiceWorkerClient objects should be reused if there is already one existing with the same identifier
https://bugs.webkit.org/show_bug.cgi?id=180143
Summary
ServiceWorkerClient objects should be reused if there is already one existing...
youenn fablet
Reported
2017-11-29 08:42:16 PST
ServiceWorkerClient objects should be reused if there is already one existing with the same identifier.
Attachments
Patch
(16.79 KB, patch)
2017-11-29 11:19 PST
,
youenn fablet
no flags
Details
Formatted Diff
Diff
Patch
(17.27 KB, patch)
2017-11-29 13:51 PST
,
youenn fablet
no flags
Details
Formatted Diff
Diff
Patch for landing
(17.33 KB, patch)
2017-11-29 16:31 PST
,
youenn fablet
no flags
Details
Formatted Diff
Diff
Rebasing
(17.33 KB, patch)
2017-11-29 16:46 PST
,
youenn fablet
no flags
Details
Formatted Diff
Diff
Show Obsolete
(3)
View All
Add attachment
proposed patch, testcase, etc.
youenn fablet
Comment 1
2017-11-29 11:19:16 PST
Created
attachment 327879
[details]
Patch
Chris Dumez
Comment 2
2017-11-29 11:56:03 PST
Comment on
attachment 327879
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=327879&action=review
> Source/WebCore/workers/service/ServiceWorkerClientIdentifier.h:97 > + static bool isDeletedValue(const WebCore::ServiceWorkerClientIdentifier& slot) { return slot == WebCore::ServiceWorkerClientIdentifier { }; }
How does it differentiate empty from deleted values? It seems they are both { }, which seems wrong, no?
> Source/WebCore/workers/service/ServiceWorkerGlobalScope.cpp:67 > +Ref<ServiceWorkerClient> ServiceWorkerGlobalScope::getOrCreateServiceWorkerClient(ServiceWorkerClientIdentifier identifier, ServiceWorkerClientData&& data)
For ServiceWorker / ServiceWorkerRegistration, we put the getOrCreate() method on the ServiceWorker / ServiceWorkerRegistration class. Could we follow the same pattern here for consistency?
Chris Dumez
Comment 3
2017-11-29 11:59:14 PST
(In reply to Chris Dumez from
comment #2
)
> Comment on
attachment 327879
[details]
> Patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=327879&action=review
> > > Source/WebCore/workers/service/ServiceWorkerClientIdentifier.h:97 > > + static bool isDeletedValue(const WebCore::ServiceWorkerClientIdentifier& slot) { return slot == WebCore::ServiceWorkerClientIdentifier { }; } > > How does it differentiate empty from deleted values? It seems they are both > { }, which seems wrong, no? > > > Source/WebCore/workers/service/ServiceWorkerGlobalScope.cpp:67 > > +Ref<ServiceWorkerClient> ServiceWorkerGlobalScope::getOrCreateServiceWorkerClient(ServiceWorkerClientIdentifier identifier, ServiceWorkerClientData&& data) > > For ServiceWorker / ServiceWorkerRegistration, we put the getOrCreate() > method on the ServiceWorker / ServiceWorkerRegistration class. Could we > follow the same pattern here for consistency?
And we should probably drop ServiceWorkerClient::create().
youenn fablet
Comment 4
2017-11-29 13:51:45 PST
Created
attachment 327897
[details]
Patch
youenn fablet
Comment 5
2017-11-29 15:00:15 PST
(In reply to youenn fablet from
comment #4
)
> Created
attachment 327897
[details]
> Patch
gtk failure is unrelated, patch updated according Chris comments.
Chris Dumez
Comment 6
2017-11-29 15:18:31 PST
Comment on
attachment 327897
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=327897&action=review
r=me with comment.
> Source/WebCore/workers/service/ServiceWorkerGlobalScope.cpp:67 > +ServiceWorkerClient* ServiceWorkerGlobalScope::getServiceWorkerClient(ServiceWorkerClientIdentifier identifier)
We normally avoid "get" prefix. I think this should be serviceWorkerClient(identifier).
youenn fablet
Comment 7
2017-11-29 16:31:52 PST
Created
attachment 327923
[details]
Patch for landing
WebKit Commit Bot
Comment 8
2017-11-29 16:33:12 PST
Comment on
attachment 327923
[details]
Patch for landing Rejecting
attachment 327923
[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-01', 'apply-attachment', '--no-update', '--non-interactive', 327923, '--port=mac']" exit_code: 2 cwd: /Volumes/Data/EWS/WebKit Last 500 characters of output: Source/WebCore/workers/service/ServiceWorkerWindowClient.h patching file Source/WebCore/workers/service/context/ServiceWorkerThread.cpp patching file LayoutTests/ChangeLog patching file LayoutTests/http/tests/workers/service/resources/basic-ServiceWorker-postMessage-worker.js patching file LayoutTests/http/tests/workers/service/resources/basic-ServiceWorker-postMessage.js Failed to run "[u'/Volumes/Data/EWS/WebKit/Tools/Scripts/svn-apply', '--force']" exit_code: 1 cwd: /Volumes/Data/EWS/WebKit Full output:
http://webkit-queues.webkit.org/results/5410834
youenn fablet
Comment 9
2017-11-29 16:46:41 PST
Created
attachment 327926
[details]
Rebasing
WebKit Commit Bot
Comment 10
2017-11-29 17:19:29 PST
Comment on
attachment 327926
[details]
Rebasing Clearing flags on attachment: 327926 Committed
r225308
: <
https://trac.webkit.org/changeset/225308
>
WebKit Commit Bot
Comment 11
2017-11-29 17:19:30 PST
All reviewed patches have been landed. Closing bug.
Radar WebKit Bug Importer
Comment 12
2017-11-29 17:20:53 PST
<
rdar://problem/35762146
>
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