WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
180669
Merge ServiceWorkerClientIdentifier into ServiceWorkerClientData
https://bugs.webkit.org/show_bug.cgi?id=180669
Summary
Merge ServiceWorkerClientIdentifier into ServiceWorkerClientData
Chris Dumez
Reported
2017-12-11 13:49:33 PST
Merge ServiceWorkerClientIdentifier into ServiceWorkerCientData, for consistency with ServiceWorkerIdentifier / ServiceWorkerData, and start simplifying the postMessage() code.
Attachments
Patch
(69.36 KB, patch)
2017-12-11 13:58 PST
,
Chris Dumez
no flags
Details
Formatted Diff
Diff
Patch
(69.37 KB, patch)
2017-12-11 14:00 PST
,
Chris Dumez
no flags
Details
Formatted Diff
Diff
Patch
(68.52 KB, patch)
2017-12-11 15:08 PST
,
Chris Dumez
no flags
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
Chris Dumez
Comment 1
2017-12-11 13:58:57 PST
Created
attachment 329030
[details]
Patch
Chris Dumez
Comment 2
2017-12-11 14:00:25 PST
Created
attachment 329031
[details]
Patch
youenn fablet
Comment 3
2017-12-11 14:56:22 PST
Comment on
attachment 329031
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=329031&action=review
> Source/WebCore/dom/Document.cpp:7630 > + m_serviceWorkerConnection->unregisterServiceWorkerClient({ m_serviceWorkerConnection->serverConnectionIdentifier(), identifier() });
I wonder whether we should not have made SWClientConnection only take DocumentIdentifier and do the translation to ServiceWorkerClientIdentifier on its own. Maybe this is too late for that. If not we could stick with passing a DocumentIdentifier to unregisterServieWorkerClient.
> Source/WebCore/workers/service/ServiceWorkerClientData.cpp:65 > + RELEASE_ASSERT(isDocument); // We do not support dedicated workers as clients yet.
Isn't the downcast<Document> doing this release assert already?
> Source/WebCore/workers/service/context/ServiceWorkerThread.cpp:121 > + auto sourceClient = ServiceWorkerClient::getOrCreate(serviceWorkerGlobalScope, WTFMove(WTF::get<ServiceWorkerClientData>(sourceData)));
Maybe use RefPtr<ServiceWorkerClient> here instead of auto so that there is not the need for it below for source =...?
> Source/WebKit/StorageProcess/ServiceWorker/WebSWServerConnection.h:93 > + void unregisterServiceWorkerClient(const WebCore::ServiceWorkerClientIdentifier&);
Sometimes we are using const ServiceWorkerClientIdentifier&, sometimes ServiceWorkerClientIdentifier directly.
Chris Dumez
Comment 4
2017-12-11 15:02:20 PST
Comment on
attachment 329031
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=329031&action=review
>> Source/WebCore/workers/service/ServiceWorkerClientData.cpp:65 >> + RELEASE_ASSERT(isDocument); // We do not support dedicated workers as clients yet. > > Isn't the downcast<Document> doing this release assert already?
Nah, only a ASSERT_WITH_SECURITY_IMPLICATION() (i.e. debug only)
Chris Dumez
Comment 5
2017-12-11 15:08:45 PST
Created
attachment 329042
[details]
Patch
Chris Dumez
Comment 6
2017-12-11 15:24:57 PST
Comment on
attachment 329042
[details]
Patch Clearing flags on attachment: 329042 Committed
r225760
: <
https://trac.webkit.org/changeset/225760
>
Chris Dumez
Comment 7
2017-12-11 15:24:58 PST
All reviewed patches have been landed. Closing bug.
Radar WebKit Bug Importer
Comment 8
2017-12-11 15:25:25 PST
<
rdar://problem/35980151
>
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