Bug 802656: GetUserMediaDevices: Consider no devices available an error r=anant

This commit is contained in:
Randell Jesup 2013-01-04 13:11:14 -05:00
parent 73c5357eab
commit e73ad3f0ef

View File

@ -162,8 +162,11 @@ public:
int32_t len = mDevices.Length();
if (len == 0) {
devices->SetAsEmptyArray();
success->OnSuccess(devices);
// XXX
// We should in the future return an empty array, and dynamically add
// devices to the dropdowns if things are hotplugged while the
// requester is up.
error->OnError(NS_LITERAL_STRING("NO_DEVICES_FOUND"));
return NS_OK;
}