Bug 219159

Summary: [macOS] Issue sandbox extension to icon services when starting a drag operation
Product: WebKit Reporter: Per Arne Vollan <pvollan>
Component: WebKit Misc.Assignee: Per Arne Vollan <pvollan>
Status: RESOLVED FIXED    
Severity: Normal CC: bfulgham, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
bfulgham: review+
Patch none

Per Arne Vollan
Reported 2020-11-19 07:10:53 PST
Issue sandbox extension to icon services when starting a drag operation on macOS, since the WebContent process needs access to these services when a drag is started.
Attachments
Patch (8.92 KB, patch)
2020-11-19 07:23 PST, Per Arne Vollan
bfulgham: review+
Patch (8.94 KB, patch)
2020-11-28 03:56 PST, Per Arne Vollan
no flags
Radar WebKit Bug Importer
Comment 1 2020-11-19 07:11:13 PST
Per Arne Vollan
Comment 2 2020-11-19 07:23:04 PST
Brent Fulgham
Comment 3 2020-11-19 15:09:39 PST
Comment on attachment 414578 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=414578&action=review r=me, but please make sure you revoke the extensions in the early return case. > Source/WebKit/WebProcess/WebPage/WebPage.cpp:2834 > bool shouldHandleEvent = true; I think there is an early return in the "if !(shouldHandleEvent)" case. You should probably add a revokeSandboxExtensions there, too. > Source/WebKit/WebProcess/WebPage/WebPage.cpp:7060 > +Vector<RefPtr<SandboxExtension>> WebPage::consumeSandboxExtensions(SandboxExtension::HandleArray&& sandboxExtensions) We do something similar-ish in UserMediaProcessManager::revokeSandboxExtensionsIfNeeded. We might consider a future bug to consolidate the logic.
Per Arne Vollan
Comment 4 2020-11-28 03:56:38 PST
Per Arne Vollan
Comment 5 2020-11-28 04:05:29 PST
(In reply to Brent Fulgham from comment #3) > Comment on attachment 414578 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=414578&action=review > > r=me, but please make sure you revoke the extensions in the early return > case. > > > Source/WebKit/WebProcess/WebPage/WebPage.cpp:2834 > > bool shouldHandleEvent = true; > > I think there is an early return in the "if !(shouldHandleEvent)" case. You > should probably add a revokeSandboxExtensions there, too. > Fixed by consuming the extensions after the early return. > > Source/WebKit/WebProcess/WebPage/WebPage.cpp:7060 > > +Vector<RefPtr<SandboxExtension>> WebPage::consumeSandboxExtensions(SandboxExtension::HandleArray&& sandboxExtensions) > > We do something similar-ish in > UserMediaProcessManager::revokeSandboxExtensionsIfNeeded. We might consider > a future bug to consolidate the logic. Thanks for reviewing!
EWS
Comment 6 2020-11-28 04:52:25 PST
Committed r270216: <https://trac.webkit.org/changeset/270216> All reviewed patches have been landed. Closing bug and clearing flags on attachment 414976 [details].
Note You need to log in before you can comment on or make changes to this bug.