Closed
Bug 859612
Opened 11 years ago
Closed 6 years ago
mozCameras API - return undefined if the API is unsupported on the platform, not null
Categories
(Core :: DOM: Device Interfaces, defect)
Core
DOM: Device Interfaces
Tracking
()
RESOLVED
INCOMPLETE
People
(Reporter: jsmith, Unassigned)
References
Details
See the discussion on bug 859554 for context. Any WebAPI that is not supported on a platform should return undefined, not null. null is only returned if the API is supported on the platform, but the web content does not have access to that API.
Reporter | ||
Updated•11 years ago
|
blocking-b2g: --- → tef?
Reporter | ||
Comment 1•11 years ago
|
||
Actually, this doesn't need to block tef. The changes required here would be needed for desktop and android primarily.
blocking-b2g: tef? → ---
Reporter | ||
Updated•11 years ago
|
Component: General → DOM: Device Interfaces
Product: Boot2Gecko → Core
Version: unspecified → Trunk
Comment 2•11 years ago
|
||
How is this usually done? Is there a handy return value, or do I need to change: NS_IMETHODIMP Navigator::GetMozCameras(nsIDOMCameraManager** aCameraManager) ...to return a a JS::Value that I can set to JSVAL_VOID [1]? 1. http://mxr.mozilla.org/mozilla-central/source/js/public/Value.h#851
Reporter | ||
Comment 3•11 years ago
|
||
I'll redirect to Doug on your question in comment 2.
Flags: needinfo?(doug.turner)
Comment 4•11 years ago
|
||
Mike, what about just guarding that with #ifdef MOZ_B2G since we only have support there?
Comment 5•11 years ago
|
||
correct. this change should be uplifted though -- we want to make sure that we don't expose this API on desktop or mobile.
Flags: needinfo?(doug.turner)
Updated•11 years ago
|
Assignee: nobody → mhabicher
Status: NEW → ASSIGNED
Comment 6•11 years ago
|
||
Do you think it would be worth having a mochitest that runs on desktop to verify that the api is not exposed ?
Reporter | ||
Comment 7•11 years ago
|
||
(In reply to dclarke@mozilla.com [:onecyrenus] from comment #6) > Do you think it would be worth having a mochitest that runs on desktop to > verify that the api is not exposed ? Yup, we should do that.
Comment 8•11 years ago
|
||
I assume the mochitest change won't land without this change? Else we'll need to revisit prioritization of this bug.
Updated•11 years ago
|
Keywords: dev-doc-needed
Comment 9•11 years ago
|
||
(In reply to Jason Smith [:jsmith] from comment #7) > (In reply to dclarke@mozilla.com [:onecyrenus] from comment #6) > > Do you think it would be worth having a mochitest that runs on desktop to > > verify that the api is not exposed ? > > Yup, we should do that. Can we get a followup bug filed for this? What happened with this bug? I don't see that anything related ever landed in my repo.
Comment 10•11 years ago
|
||
Too busy with blocking issues. If someone wants to tackle this, go ahead; else I'll get to it when I can.
Assignee: mhabicher → nobody
Comment 11•6 years ago
|
||
Cleaning up Device Interfaces component, and mass-marking old FxOS bugs as incomplete. If any of these bugs are still valid, please let me know.
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → INCOMPLETE
Updated•6 years ago
|
Keywords: dev-doc-needed
You need to log in
before you can comment on or make changes to this bug.
Description
•