Summary: | SWContextManager::postMessageToServiceWorker should check for valid service worker | ||||||
---|---|---|---|---|---|---|---|
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 Local Build | ||||||
Hardware: | Unspecified | ||||||
OS: | Unspecified | ||||||
Attachments: |
|
Description
youenn fablet
2021-04-27 03:04:24 PDT
Created attachment 427131 [details]
Patch
Comment on attachment 427131 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=427131&action=review > Source/WebCore/workers/service/context/SWContextManager.cpp:87 > + if (!serviceWorker) Should we also return early in the isTerminatingOrTerminated() case? (In reply to Chris Dumez from comment #3) > Comment on attachment 427131 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=427131&action=review > > > Source/WebCore/workers/service/context/SWContextManager.cpp:87 > > + if (!serviceWorker) > > Should we also return early in the isTerminatingOrTerminated() case? We probably could since enqueuing the task will be useless work in that case. I went this way to align this message event to other events like install or activate. Comment on attachment 427131 [details]
Patch
Ok. If this is consistent with others, let's go this way.
Committed r276649 (237076@main): <https://commits.webkit.org/237076@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 427131 [details]. |