Bug 182337 - Change SWServer::claim to set the iterator value as soon as possible
Summary: Change SWServer::claim to set the iterator value as soon as possible
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Service Workers (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: youenn fablet
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2018-01-31 09:18 PST by youenn fablet
Modified: 2018-01-31 14:40 PST (History)
5 users (show)

See Also:


Attachments
Patch (1.71 KB, patch)
2018-01-31 09:19 PST, youenn fablet
no flags Details | Formatted Diff | Diff
Patch for landing (1.67 KB, patch)
2018-01-31 09:23 PST, youenn fablet
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from ews104 for mac-sierra-wk2 (2.64 MB, application/zip)
2018-01-31 10:28 PST, EWS Watchlist
no flags Details
Patch for landing (2.04 KB, patch)
2018-01-31 13:43 PST, youenn fablet
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description youenn fablet 2018-01-31 09:18:01 PST
This will remove potential risks to have the iterator being invalidated when removing the client using registration.
Comment 1 youenn fablet 2018-01-31 09:19:52 PST
Created attachment 332765 [details]
Patch
Comment 2 Radar WebKit Bug Importer 2018-01-31 09:20:31 PST
<rdar://problem/37073164>
Comment 3 youenn fablet 2018-01-31 09:23:08 PST
Created attachment 332766 [details]
Patch for landing
Comment 4 EWS Watchlist 2018-01-31 10:28:41 PST
Comment on attachment 332766 [details]
Patch for landing

Attachment 332766 [details] did not pass mac-wk2-ews (mac-wk2):
Output: http://webkit-queues.webkit.org/results/6292891

New failing tests:
imported/w3c/web-platform-tests/service-workers/service-worker/claim-using-registration.https.html
imported/w3c/web-platform-tests/service-workers/service-worker/claim-affect-other-registration.https.html
Comment 5 EWS Watchlist 2018-01-31 10:28:43 PST
Created attachment 332778 [details]
Archive of layout-test-results from ews104 for mac-sierra-wk2

The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
Bot: ews104  Port: mac-sierra-wk2  Platform: Mac OS X 10.12.6
Comment 6 Chris Dumez 2018-01-31 10:35:34 PST
Comment on attachment 332766 [details]
Patch for landing

View in context: https://bugs.webkit.org/attachment.cgi?id=332766&action=review

> Source/WebCore/workers/service/server/SWServer.cpp:426
>              if (auto* controllingRegistration = registrationFromServiceWorkerIdentifier(result.iterator->value))

You're using result.iterator->value here after you've overwrote its value. this is wrong.
Comment 7 youenn fablet 2018-01-31 13:43:13 PST
Created attachment 332799 [details]
Patch for landing
Comment 8 WebKit Commit Bot 2018-01-31 14:40:14 PST
Comment on attachment 332799 [details]
Patch for landing

Clearing flags on attachment: 332799

Committed r227932: <https://trac.webkit.org/changeset/227932>
Comment 9 WebKit Commit Bot 2018-01-31 14:40:16 PST
All reviewed patches have been landed.  Closing bug.