Summary: | Implement getting ServiceWorker registrations for the WKWebsiteDataStore API | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Brady Eidson <beidson> | ||||||||||
Component: | WebKit Misc. | Assignee: | Brady Eidson <beidson> | ||||||||||
Status: | RESOLVED FIXED | ||||||||||||
Severity: | Normal | CC: | cdumez, commit-queue, webkit-bug-importer | ||||||||||
Priority: | P2 | Keywords: | InRadar | ||||||||||
Version: | Other | ||||||||||||
Hardware: | Unspecified | ||||||||||||
OS: | Unspecified | ||||||||||||
Attachments: |
|
Description
Brady Eidson
2017-12-15 14:55:23 PST
Created attachment 329525 [details]
Patch
Created attachment 329531 [details]
Patch
Comment on attachment 329525 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=329525&action=review r=me with comments. Also please fix GTK/WPE build. > Source/WebCore/workers/service/server/SWServer.cpp:796 > + while (!m_getOriginsWithRegistrationsCallbacks.isEmpty()) Why bother we the container mutations? How about we make m_getOriginsWithRegistrationsCallbacks a Vector and use: auto getOriginsWithRegistrationsCallbacks = WTFMove(m_getOriginsWithRegistrationsCallbacks); for (auto& callback : getOriginsWithRegistrationsCallbacks) callback(originsWithRegistrations); Seems like this would be more efficient. > Source/WebCore/workers/service/server/SWServer.h:238 > + Deque<WTF::Function<void(const HashSet<SecurityOriginData>&)>> m_getOriginsWithRegistrationsCallbacks; Seems like this could be a Vector. > Source/WebKit/StorageProcess/StorageProcess.cpp:273 > + for (auto& origin : *originsWithServiceWorkers) Why isn't this in the swServerForSession(sessionID).getOriginsWithRegistrations() lambda? Similarly to what is done for IndexedDB? Then we do not need originsWithServiceWorkers / rawOrigins either. Created attachment 329532 [details]
Patch
Created attachment 329535 [details]
Patch
Comment on attachment 329535 [details] Patch Clearing flags on attachment: 329535 Committed r226003: <https://trac.webkit.org/changeset/226003> All reviewed patches have been landed. Closing bug. The code landed in this patch begins to be tested over in https://bugs.webkit.org/show_bug.cgi?id=180911 \o/ |