Bug 183489

Summary: [Mac] WebKit fails to receive file promises when the embedding app is sandboxed
Product: WebKit Reporter: Andy Estes <aestes>
Component: New BugsAssignee: Andy Estes <aestes>
Status: RESOLVED FIXED    
Severity: Normal CC: bdakin, bfulgham, commit-queue, darin, dbates, enrica, ews-watchlist, rniwa, thorton, webkit-bug-importer, wenson_hsieh, youennf
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
ews-watchlist: commit-queue-
Archive of layout-test-results from ews100 for mac-sierra
none
Archive of layout-test-results from ews114 for mac-sierra
none
Patch none

Andy Estes
Reported 2018-03-08 17:32:20 PST
[Mac] WebKit fails to receive file promises when the embedding app is sandboxed
Attachments
Patch (4.06 KB, patch)
2018-03-08 17:36 PST, Andy Estes
ews-watchlist: commit-queue-
Archive of layout-test-results from ews100 for mac-sierra (2.61 MB, application/zip)
2018-03-08 18:37 PST, EWS Watchlist
no flags
Archive of layout-test-results from ews114 for mac-sierra (2.93 MB, application/zip)
2018-03-08 19:13 PST, EWS Watchlist
no flags
Patch (9.85 KB, patch)
2018-03-08 21:25 PST, Andy Estes
no flags
Andy Estes
Comment 1 2018-03-08 17:33:10 PST
Andy Estes
Comment 2 2018-03-08 17:36:53 PST Comment hidden (obsolete)
EWS Watchlist
Comment 3 2018-03-08 18:37:22 PST Comment hidden (obsolete)
EWS Watchlist
Comment 4 2018-03-08 18:37:23 PST Comment hidden (obsolete)
EWS Watchlist
Comment 5 2018-03-08 19:13:51 PST Comment hidden (obsolete)
EWS Watchlist
Comment 6 2018-03-08 19:13:53 PST Comment hidden (obsolete)
Andy Estes
Comment 7 2018-03-08 21:25:39 PST
WebKit Commit Bot
Comment 8 2018-03-09 07:11:06 PST
Comment on attachment 335391 [details] Patch Clearing flags on attachment: 335391 Committed r229462: <https://trac.webkit.org/changeset/229462>
WebKit Commit Bot
Comment 9 2018-03-09 07:11:08 PST
All reviewed patches have been landed. Closing bug.
Darin Adler
Comment 10 2018-03-10 17:29:08 PST
Comment on attachment 335391 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=335391&action=review > Source/WebKit/UIProcess/Cocoa/WebViewImpl.mm:3742 > if (errorOrNil) > return; Seems that both dragData and fileNames might leak if we don’t eventually get all the files we expect; I don’t understand how the error handling works here. Also seems we have two identical copies of this code, here and in legacy WebKit, so I guess the code is pretty old. I think it could be factored more cleanly so the call to performDragOperation isn’t nested so deep inside both blocks and loops.
Andy Estes
Comment 11 2018-03-12 09:35:50 PDT
(In reply to Darin Adler from comment #10) > Comment on attachment 335391 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=335391&action=review > > > Source/WebKit/UIProcess/Cocoa/WebViewImpl.mm:3742 > > if (errorOrNil) > > return; > > Seems that both dragData and fileNames might leak if we don’t eventually get > all the files we expect; I don’t understand how the error handling works > here. Also seems we have two identical copies of this code, here and in > legacy WebKit, so I guess the code is pretty old. I think it could be > factored more cleanly so the call to performDragOperation isn’t nested so > deep inside both blocks and loops. I agree. I have an idea for how to clean this up and get rid of the manual memory management.
Note You need to log in before you can comment on or make changes to this bug.