Bug 779793 - Properly send a NO_PROVIDER error when there is no options to handle a WebActivity. r=vingtetun

This commit is contained in:
Etienne Segonzac 2012-08-04 11:28:36 -04:00
Родитель cd2c292374
Коммит 7e6c93672c
1 изменённых файлов: 3 добавлений и 3 удалений

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

@ -193,9 +193,9 @@ let Activities = {
debug(JSON.stringify(aResults));
// We have no matching activity registered, let's fire an error.
if (aResults.length === 0) {
if (aResults.options.length === 0) {
ppmm.sendAsyncMessage("Activity:FireError", {
"id": aMsg.id,
"id": aMsg.id,
"error": "NO_PROVIDER"
});
return;
@ -207,7 +207,7 @@ let Activities = {
// The user has cancelled the choice, fire an error.
if (aChoice === -1) {
ppmm.sendAsyncMessage("Activity:FireError", {
"id": aMsg.id,
"id": aMsg.id,
"error": "USER_ABORT"
});
return;