Closed Bug 1596539 Opened 5 years ago Closed 5 years ago

Deadcode in nsLocalFile::Launch

Categories

(Core :: XPCOM, task, P3)

task

Tracking

()

RESOLVED DUPLICATE of bug 1597794

People

(Reporter: toshi, Assigned: toshi)

References

Details

We call ShellExecuteExW in nsLocalFile::Launch, where we have a code to handle SE_ERR_* errors, but those errors are not returned as a return value but returned as SHELLEXECUTEINFO::hInstApp. Moreover, we pass SEE_MASK_ASYNCOK to ShellExecuteExW to execute a file asyncronously. In such a case, ShellExecuteExW will not return API SE_ERR_NOASSOC though a target file does not have an associated app.

As a fix for Bug 1588975, we replace ShellExecuteExW with IShellDispatch2.ShellExecute which is also asynchronous. We can simply return either NS_OK or NS_ERROR_FILE_EXECUTION_FAILED as we do in nsMIMEInfoWin.cpp, removing these error handling code.

Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.