Only "title" and "program" are required for AddUserTasks

This commit is contained in:
Cheng Zhao 2014-11-17 17:26:44 +08:00
parent 47c18fef7f
commit 0db2769781

View file

@ -42,10 +42,12 @@ struct Converter<Browser::UserTask> {
mate::Dictionary dict;
if (!ConvertFromV8(isolate, val, &dict))
return false;
return dict.Get("program", &(out->program)) &&
dict.Get("arguments", &(out->arguments)) &&
dict.Get("title", &(out->title)) &&
dict.Get("description", &(out->description));
if (!dict.Get("program", &(out->program)) ||
!dict.Get("title", &(out->title)))
return false;
dict.Get("arguments", &(out->arguments));
dict.Get("description", &(out->description));
return true;
}
};