Bug 1141441 - Make the -remote option return an error code. r=bsmedberg

This commit is contained in:
Mike Hommey 2015-03-10 17:25:19 +09:00
Родитель 3bf6773d2f
Коммит 77e457a86d
1 изменённых файлов: 11 добавлений и 0 удалений

Просмотреть файл

@ -342,6 +342,17 @@ nsBrowserContentHandler.prototype = {
cmdLine.preventDefault = true;
}
// In the past, when an instance was not already running, the -remote
// option returned an error code. Any script or application invoking the
// -remote option is expected to be handling this case, otherwise they
// wouldn't be doing anything when there is no Firefox already running.
// Making the -remote option always return an error code makes those
// scripts or applications handle the situation as if Firefox was not
// already running.
if (cmdLine.handleFlag("remote", true)) {
throw NS_ERROR_ABORT;
}
var uriparam;
try {
while ((uriparam = cmdLine.handleFlagWithParam("new-window", false))) {