Closed Bug 872122 Opened 13 years ago Closed 13 years ago

nsDOMCameraManager::GetListOfCameras uses a bogus static variable

Categories

(Core :: DOM: Device Interfaces, defect)

All
Gonk (Firefox OS)
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla24
blocking-b2g hd+
Tracking Status
firefox22 --- wontfix
firefox23 --- wontfix
firefox24 --- fixed
b2g18 + fixed
b2g18-v1.0.0 --- wontfix
b2g18-v1.0.1 --- wontfix
b2g-v1.1hd --- fixed

People

(Reporter: Ms2ger, Assigned: mikeh)

Details

Attachments

(2 files, 1 obsolete file)

In particular, every time you call the function, the extra cameras move further back in the array.
We won't hit this code path on the hardware we're using, but this is a pretty messy bug that should be fixed. The fix is relatively simple too.
blocking-b2g: --- → leo?
tracking-b2g18: --- → ?
While we're here, could we drop the manual JSAPI and just produce XPCOM strings and let XPConnect handle all the JS bits?
(In reply to Boris Zbarsky (:bz) from comment #2) > > While we're here, could we drop the manual JSAPI and just produce XPCOM > strings and let XPConnect handle all the JS bits? That will be part of my patch.
Attached patch clean up getListOfCameras() (obsolete) — Splinter Review
Attachment #749550 - Flags: review?(bzbarsky)
Comment on attachment 749550 [details] [diff] [review] clean up getListOfCameras() r=me
Attachment #749550 - Flags: review?(bzbarsky) → review+
Includes the change to the fallback stub implementation; carrying r+ forward.
Attachment #749550 - Attachment is obsolete: true
Comment on attachment 750442 [details] [diff] [review] clean up getListOfCameras(), r=bz NOTE: Please see https://wiki.mozilla.org/Release_Management/B2G_Landing to better understand the B2G approval process and landings. [Approval Request Comment] Bug caused by (feature/regressing bug #): 872122 User impact if declined: if hardware implements non-{back, front} cameras, ID strings returned will erroneously increase on each call Testing completed: tested on hamachi, emulator Risk to taking this patch (and alternatives if risky): minimal String or UUID changes made by this patch: nsIDOMCameraManager UUID change, although the API hasn't changed from the perspective of JS
Attachment #750442 - Flags: approval-mozilla-b2g18?
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla24
Triage - per comment 2, not directly required for the current hardware but nice to be fixed, tracking.
blocking-b2g: leo? → ---
Comment on attachment 750442 [details] [diff] [review] clean up getListOfCameras(), r=bz Approving in support of the emulator.
Attachment #750442 - Flags: approval-mozilla-b2g18? → approval-mozilla-b2g18+
This needs a branch-specific patch for uplift to b2g18.
ni?(RyanVM) - here's the b2g18 port of the patch.
Flags: needinfo?(ryanvm)
We need this on the hd branch for front-facing camera - please uplift to hd branch.
blocking-b2g: --- → hd+
(In reply to lsblakk@mozilla.com [:lsblakk] from comment #16) > > We need this on the hd branch for front-facing camera - please uplift to hd > branch. Was this intended for bug 883084?
Flags: needinfo?(lsblakk)
Flags: needinfo?(lsblakk)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: