[lldb] Refactor host::OpenFileInExternalEditor
This patch refactors the macOS implementation of OpenFileInExternalEditor. It fixes an AppleEvent memory leak, the caching of LLDB_EXTERNAL_EDITOR and speculatively fixes a crash when CFURL is NULL (rdar://108633464). The new code also improves error handling, readability and documents calls to the CoreFoundation Launch Services APIs. A bunch of the Launch Services APIs have been deprecated (LSFindApplicationForInfo, LSOpenURLsWithRole). The preferred API is LSOpenCFURLRef but it doesn't specifying the "location" Apple Event which is used to highlight the current line and switching over would regress the existing behavior. rdar://108633464 Differential revision: https://reviews.llvm.org/D149482
Loading
Please sign in to comment