Bug 231758

Summary: Null check the context in -[WKWebProcessPlugInFrame jsContextForServiceWorkerWorld:]
Product: WebKit Reporter: Timothy Hatcher <timothy>
Component: WebKit APIAssignee: Timothy Hatcher <timothy>
Status: RESOLVED FIXED    
Severity: Normal CC: cdumez, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Local Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch none

Timothy Hatcher
Reported 2021-10-14 12:33:19 PDT
_frame->jsContextForServiceWorkerWorld() can return nullptr, so we should null check before using the result.
Attachments
Patch (1.80 KB, patch)
2021-10-14 12:37 PDT, Timothy Hatcher
no flags
Patch (1.79 KB, patch)
2021-10-14 12:40 PDT, Timothy Hatcher
no flags
Timothy Hatcher
Comment 1 2021-10-14 12:37:45 PDT
Chris Dumez
Comment 2 2021-10-14 12:38:25 PDT
Comment on attachment 441257 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=441257&action=review > Source/WebKit/WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFrame.mm:76 > + if (JSGlobalContextRef context = _frame->jsContextForServiceWorkerWorld(&[world _scriptWorld])) auto
Timothy Hatcher
Comment 3 2021-10-14 12:40:57 PDT
EWS
Comment 4 2021-10-14 13:41:21 PDT
Committed r284195 (243009@main): <https://commits.webkit.org/243009@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 441259 [details].
Radar WebKit Bug Importer
Comment 5 2021-10-14 13:42:18 PDT
Note You need to log in before you can comment on or make changes to this bug.