Relax checks about NSOpenPanel's underlying type in SelectFileDialogBridge.
In Catalina, sometimes (under unclear circumstances) the NS{Open,Save}Panel objects do not go through the remote panel view system. Instead, NSOpenPanel returns a non-exported AppKit type NSLocalOpenPanel, which does not have any is-a relationship to a NSSave/OpenPanel. The type checks in SelectFileDialogBridge cause failures when this happens, so relax them. Test: `./Chromium.app/Contents/MacOS/Chromium -NSUseRemoteSavePanel NO` and go to "data:text/html,<input type=file>" in the Omnibox. Upload a file and no crash should occur. Bug: 995476 Change-Id: If57acb94ef7d92784cdb5f6e48f4ea908f2bbdce Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1860995 Commit-Queue: Robert Sesek <rsesek@chromium.org> Reviewed-by:Sidney San Martín <sdy@chromium.org> Cr-Commit-Position: refs/heads/master@{#705742}
Showing
Please register or sign in to comment