Bug 239657 - service worker update should refresh imported scripts in addition to the main script
Summary: service worker update should refresh imported scripts in addition to the main...
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: 2022-04-22 09:41 PDT by youenn fablet
Modified: 2022-08-01 10:27 PDT (History)
4 users (show)

See Also:


Attachments
Patch (26.51 KB, patch)
2022-04-22 10:09 PDT, youenn fablet
no flags Details | Formatted Diff | Diff
Patch (44.30 KB, patch)
2022-04-25 05:12 PDT, youenn fablet
no flags Details | Formatted Diff | Diff
Patch (44.28 KB, patch)
2022-04-25 05:38 PDT, youenn fablet
no flags Details | Formatted Diff | Diff
Patch (44.19 KB, patch)
2022-04-27 00:45 PDT, 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 2022-04-22 09:41:13 PDT
service worker update should refresh imported scripts in addition to the main script
Comment 1 youenn fablet 2022-04-22 10:09:36 PDT
Created attachment 458156 [details]
Patch
Comment 2 youenn fablet 2022-04-25 05:12:56 PDT
Created attachment 458260 [details]
Patch
Comment 3 youenn fablet 2022-04-25 05:38:17 PDT
Created attachment 458263 [details]
Patch
Comment 4 Chris Dumez 2022-04-26 08:01:17 PDT
Comment on attachment 458263 [details]
Patch

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

r=me

> Source/WebCore/workers/service/server/SWServer.cpp:567
> +            m_scripts.append(std::make_pair(url, WTFMove(result.script)));

Can probably just:
m_scripts.append({ url, WTFMove(result.script) });

> Source/WebCore/workers/service/server/SWServerJobQueue.cpp:114
> +        RELEASE_LOG(ServiceWorker, "%p - SWServerJobQueue::scriptFetchFinished, script, certificate and imported scripts are matching for registrationID=%llu", this, registration->identifier().toUInt64());

%llu -> PRIu64

> Source/WebCore/workers/service/server/SWServerJobQueue.cpp:135
> +        RELEASE_LOG(ServiceWorker, "%p - SWServerJobQueue::importedScriptsFetchFinished, script, certificate and imported scripts are matching for registrationID=%llu", this, registration->identifier().toUInt64());

PRIu64
Comment 5 youenn fablet 2022-04-27 00:45:15 PDT
Created attachment 458426 [details]
Patch
Comment 6 EWS 2022-04-27 06:13:37 PDT
Committed r293506 (250037@main): <https://commits.webkit.org/250037@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 458426 [details].
Comment 7 Radar WebKit Bug Importer 2022-04-27 06:14:15 PDT
<rdar://problem/92393337>