| Summary: | Make sure to fail importScripts as per https://w3c.github.io/ServiceWorker/#importscripts step 4 | ||||||
|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | youenn fablet <youennf> | ||||
| Component: | Service Workers | Assignee: | youenn fablet <youennf> | ||||
| Status: | RESOLVED FIXED | ||||||
| Severity: | Normal | CC: | achristensen, cdumez, webkit-bug-importer | ||||
| Priority: | P2 | Keywords: | InRadar | ||||
| Version: | WebKit Nightly Build | ||||||
| Hardware: | Unspecified | ||||||
| OS: | Unspecified | ||||||
| Attachments: |
|
||||||
|
Description
youenn fablet
2022-04-28 05:39:44 PDT
Created attachment 458519 [details]
Patch
Comment on attachment 458519 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=458519&action=review r=me > Source/WebCore/workers/WorkerScriptLoader.cpp:85 > + auto* serviceWorkerGlobalScope = dynamicDowncast<ServiceWorkerGlobalScope>(workerGlobalScope); Would be nice to reduce scoping and do this in the if condition: `if (auto* serviceWorkerGlobalScope = dynamicDowncast<ServiceWorkerGlobalScope>(workerGlobalScope))` Comment on attachment 458519 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=458519&action=review >> Source/WebCore/workers/WorkerScriptLoader.cpp:85 >> + auto* serviceWorkerGlobalScope = dynamicDowncast<ServiceWorkerGlobalScope>(workerGlobalScope); > > Would be nice to reduce scoping and do this in the if condition: > `if (auto* serviceWorkerGlobalScope = dynamicDowncast<ServiceWorkerGlobalScope>(workerGlobalScope))` serviceWorkerGlobalScope is reused below, and it seems a tad better to have a wider scope instead of two casts. Committed r293607 (250113@main): <https://commits.webkit.org/250113@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 458519 [details]. |