[webkit-reviews] review granted: [Bug 239847] Make sure to fail importScripts as per https://w3c.github.io/ServiceWorker/#importscripts step 4 : [Attachment 458519] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Apr 28 10:58:00 PDT 2022


Chris Dumez <cdumez at apple.com> has granted youenn fablet <youennf at gmail.com>'s
request for review:
Bug 239847: Make sure to fail importScripts as per
https://w3c.github.io/ServiceWorker/#importscripts step 4
https://bugs.webkit.org/show_bug.cgi?id=239847

Attachment 458519: Patch

https://bugs.webkit.org/attachment.cgi?id=458519&action=review




--- Comment #2 from Chris Dumez <cdumez at apple.com> ---
Comment on attachment 458519
  --> https://bugs.webkit.org/attachment.cgi?id=458519
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))`


More information about the webkit-reviews mailing list