Closed Bug 1186209 Opened 9 years ago Closed 9 years ago

enumerateDevices doesn't return if no devices are found

Categories

(Core :: WebRTC, defect, P1)

41 Branch
defect

Tracking

()

VERIFIED FIXED
mozilla42
Tracking Status
firefox39 --- unaffected
firefox40 --- unaffected
firefox41 + verified
firefox42 + verified

People

(Reporter: standard8, Assigned: jib)

References

Details

(Keywords: regression)

Attachments

(3 files)

STR

1) Set up a Windows VM with no audio nor video devices
2) Start up Firefox, open the Browser Console.
3) Enter:

navigator.mediaDevices.enumerateDevices().then(function(result) { console.log(result) }).catch(function() { console.log("fail"); })

Expected Results (as shown in FF 39 release & FF 40.0b6 versions):

  Promise { <state>: "pending" }
  "fail"

Actual Results (as shown in nightly, 42.0a1, and aurora, 41.0a1):

  Promise { <state>: "pending" }

- no fail line is shown in nightly/aurora.

The result is returned fine if devices are present.
[Tracking Requested - why for this release]: Regression in the WebRTC platform API - Hello also uses this functionality (this was discovered in the verification testing of bug 1168333).
Some way to test this functionality for regressions in the future would also be nice!
Thanks, I see what's going on.
Assignee: nobody → jib
Bug 1186209 - check for VTYPE_EMPTY_ARRAY in enumerateDevices + test.
Attachment #8637323 - Flags: review?(rjesup)
Comment on attachment 8637323 [details]
MozReview Request: Bug 1186209 - check for VTYPE_EMPTY_ARRAY in enumerateDevices + test.

https://reviewboard.mozilla.org/r/13835/#review12491

Ship It!
Attachment #8637323 - Flags: review?(rjesup) → review+
Keywords: checkin-needed
OS: Unspecified → All
Priority: -- → P1
Hardware: Unspecified → All
Version: 33 Branch → 41 Branch
https://hg.mozilla.org/mozilla-central/rev/6f0d5f96cae6
Status: NEW → RESOLVED
Closed: 9 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → mozilla42
Tracked. Randell, do you want to request uplift to m-a? Thanks!
Flags: needinfo?(rjesup)
Comment on attachment 8637323 [details]
MozReview Request: Bug 1186209 - check for VTYPE_EMPTY_ARRAY in enumerateDevices + test.

Approval Request Comment
[Feature/regressing bug #]: Bug 1169665
[User impact if declined]:

Calls to navigator.mediaDevices.enumerateDevices() will never resolve on systems with no camera or microphone.

[Describe test coverage new/current, TreeHerder]:

Landed on m-c with proper test of simulated zero devices this time.

[Risks and why]:

Very low, because this was a simple trip-up of not handling VTYPE_EMPTY_ARRAY.

[String/UUID change made/needed]: none
Flags: needinfo?(rjesup)
Attachment #8637323 - Flags: approval-mozilla-aurora?
Comment on attachment 8637323 [details]
MozReview Request: Bug 1186209 - check for VTYPE_EMPTY_ARRAY in enumerateDevices + test.

Simple fix, has an automated test, let's uplift to Aurora.
Attachment #8637323 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
Mark, can you please verify the fix on a nightly build from 7/24 or later? Thanks!
Flags: needinfo?(standard8)
Needs rebasing for Aurora uplift.
Flags: needinfo?(jib)
Rebased on aurora. Carrying forward r=jesup.
Flags: needinfo?(jib)
Attachment #8639527 - Flags: review+
I've just retested this on latest Windows versions of nightly & aurora and it now works fine.

Thanks Jib.
Status: RESOLVED → VERIFIED
Flags: needinfo?(standard8)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: