Changeset 225483 in webkit
- Timestamp:
- Dec 4, 2017 10:55:07 AM (6 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r225482 r225483 1 2017-12-04 Youenn Fablet <youenn@apple.com> 2 3 Add support https://w3c.github.io/ServiceWorker/#on-client-unload-algorithm 4 https://bugs.webkit.org/show_bug.cgi?id=180359 5 6 Reviewed by Chris Dumez. 7 8 This algorithm is needed for implementation of claim. 9 As per specification, it is run for every client unload, hence why this is put in removeClientUsingRegistration. 10 11 * workers/service/server/SWServerRegistration.cpp: 12 (WebCore::SWServerRegistration::removeClientUsingRegistration): 13 (WebCore::SWServerRegistration::handleClientUnload): 14 * workers/service/server/SWServerRegistration.h: 15 1 16 2017-12-04 Antti Koivisto <antti@apple.com> 2 17 -
trunk/Source/WebCore/workers/service/server/SWServerRegistration.cpp
r225460 r225483 162 162 if (iterator->value.isEmpty()) 163 163 m_clientsUsingRegistration.remove(iterator); 164 165 handleClientUnload(); 164 166 } 165 167 … … 282 284 } 283 285 286 // https://w3c.github.io/ServiceWorker/#on-client-unload-algorithm 287 void SWServerRegistration::handleClientUnload() 288 { 289 if (hasClientsUsingRegistration()) 290 return; 291 if (isUninstalling() && tryClear()) 292 return; 293 tryActivate(); 294 } 295 284 296 } // namespace WebCore 285 297 -
trunk/Source/WebCore/workers/service/server/SWServerRegistration.h
r225457 r225483 91 91 92 92 void activate(); 93 void handleClientUnload(); 93 94 94 95 ServiceWorkerRegistrationIdentifier m_identifier;
Note: See TracChangeset
for help on using the changeset viewer.