Bug 1141439 - Exit with an error code instead of falling through the REMOTE_NOT_FOUND code path when the X-remote returns an explicit command line handler error. r=bsmedberg

This commit is contained in:
Mike Hommey 2015-03-10 17:14:30 +09:00
parent 66a62ca460
commit 96c39026ab

View File

@ -1671,7 +1671,15 @@ RemoteCommandLine(const char* aDesktopStartupID)
gArgc, gArgv, aDesktopStartupID,
getter_Copies(response), &success);
// did the command fail?
if (NS_FAILED(rv) || !success)
if (!success)
return REMOTE_NOT_FOUND;
// The "command not parseable" error is returned when the
// nsICommandLineHandler throws a NS_ERROR_ABORT.
if (response.EqualsLiteral("500 command not parseable"))
return REMOTE_ARG_BAD;
if (NS_FAILED(rv))
return REMOTE_NOT_FOUND;
return REMOTE_FOUND;