Closed
Bug 1195702
Opened 10 years ago
Closed 10 years ago
Expose UDPSocket existence in navigator.hasFeature()
Categories
(Firefox OS Graveyard :: General, defect, P1)
Tracking
(Not tracked)
RESOLVED
WORKSFORME
People
(Reporter: mat, Assigned: fabrice)
References
Details
Attachments
(1 file)
|
2.06 KB,
patch
|
ehsan.akhgari
:
review-
|
Details | Diff | Splinter Review |
In bug 745283 UDPSocket was implemented and it's available to privileged apps [0].
Marketplace needs to separate devices with and without access to UDPSocket implementation, without requiring the permission itself. navigator.hasFeature() [1] is supposed to be used for that, but navigator.hasFeature('api.window.Navigator.UDPSocket') appears to be unimplemented.
Could it be implemented for all versions of gecko that are shipping with that API ? I'm hesitant to allow apps using this API to be submitted to Marketplace without the ability for Marketplace to detect if the API works or not, since that means users on older versions would be able to see and install apps that are broken to them.
[0] https://mxr.mozilla.org/mozilla-central/source/dom/apps/PermissionsTable.jsm#67
[1] https://dxr.mozilla.org/mozilla-central/source/dom/base/Navigator.cpp#1510
Updated•10 years ago
|
Priority: -- → P1
| Assignee | ||
Comment 1•10 years ago
|
||
Assignee: nobody → fabrice
Attachment #8678390 -
Flags: review?(ehsan)
Comment 2•10 years ago
|
||
Comment on attachment 8678390 [details] [diff] [review]
hasfeature-udpsocket.patch
Review of attachment 8678390 [details] [diff] [review]:
-----------------------------------------------------------------
::: dom/base/Navigator.cpp
@@ +1695,5 @@
> p->MaybeResolve(true);
> return p.forget();
> }
>
> + if (featureName.EqualsLiteral("Navigator.UDPSocket")) {
This shouldn't be needed, see bug 1009645.
Attachment #8678390 -
Flags: review?(ehsan) → review-
| Assignee | ||
Comment 3•10 years ago
|
||
Mat, which versions did you test?
Comment 4•10 years ago
|
||
Ehhhh. We tested a few months ago on this. Looking at the isFeatureDetectible() code, it's entirely possible we didn't have the check correct.
We'll double-check. I have a 2.1 and 2.5 handy that I can check now.
Updated•10 years ago
|
Keywords: dev-doc-needed
| Reporter | ||
Comment 5•10 years ago
|
||
Indeed it's already working on 2.5 ; I just had the wrong string, because I was expecting it to be similar to TCPSocket :(
<<< navigator.hasFeature('api.window.UDPSocket').then(function(val) { console.log(val); });
>>> true
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → WORKSFORME
Updated•10 years ago
|
Keywords: dev-doc-needed
You need to log in
before you can comment on or make changes to this bug.
Description
•