Closed
Bug 1095733
Opened 10 years ago
Closed 10 years ago
navigator.mozGetUserMedia does not work on about:home
Categories
(Firefox :: Site Permissions, defect)
Tracking
()
RESOLVED
FIXED
Firefox 36
People
(Reporter: fippo, Assigned: jib)
References
Details
Attachments
(1 file, 3 obsolete files)
(deleted),
patch
|
jib
:
review+
|
Details | Diff | Splinter Review |
User Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/37.0.2062.120 Chrome/37.0.2062.120 Safari/537.36
Steps to reproduce:
on about:startpage paste
navigator.mozGetUserMedia({audio:true, video:true}, function (stream) { console.log('yay'); }, function (err) { console.log(err); })
into the javascript console.
Actual results:
Nothing.
With
NSPR_LOG_MODULES=mediamanager:5
I get the following output:
System JS : ERROR resource://app/modules/webrtcUI.jsm:181 - NS_ERROR_FAILURE: Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIURI.host]
Possibly caused by uri being undefined in http://dxr.mozilla.org/mozilla-central/source/browser/modules/webrtcUI.jsm#156 ?
Expected results:
the getUserMedia popup should have appeared or the error callback called.
Reporter | ||
Comment 1•10 years ago
|
||
same behaviour on about:blank
Assignee | ||
Comment 2•10 years ago
|
||
Reuse Martin's origin code (NB: I changed your asciiHost to host. Hope that's ok).
Assignee: nobody → jib
Status: UNCONFIRMED → NEW
Ever confirmed: true
Attachment #8519346 -
Flags: review?(martin.thomson)
Assignee | ||
Updated•10 years ago
|
Summary: navigator.mozGetUserMedia does not work on about:startpage → navigator.mozGetUserMedia does not work on about:home
Comment 3•10 years ago
|
||
Comment on attachment 8519346 [details] [diff] [review]
make gUM work from js console on about:home
Review of attachment 8519346 [details] [diff] [review]:
-----------------------------------------------------------------
I'm not sure about this. If we want to do the permissions right here, we should be storing permissions against an origin (not a host). That differs from other uses, so maybe that's not appropriate for this fix. WDYT?
::: browser/modules/webrtcUI.jsm
@@ +150,5 @@
> + try {
> + if (!uri) {
> + uri = Services.io.newURI(href, null, null);
> + }
> + origin = uri.host;
If you are using "origin" as the name here, it's going to be surprising if this is bound to uri.host and not uri.prePath.
Attachment #8519346 -
Flags: review?(martin.thomson)
Assignee | ||
Comment 4•10 years ago
|
||
I shouldn't have named it getOrigin. To rule out confusion, here's the patch again with a less confusing name.
I hope this makes it clearer how feature-neutral I believe this patch to be. The only significant differences I believe it makes are:
1. Rather than throw, use made-up hostname for about: in gUM, like you do in IdP.
2. Use .host rather than .asciiHost in your existing IdP code.
#2 comes from purely from my attempt to consolidate code.
(In reply to Martin Thomson [:mt] from comment #3)
> I'm not sure about this. If we want to do the permissions right here, we
> should be storing permissions against an origin (not a host). That differs
> from other uses, so maybe that's not appropriate for this fix. WDYT?
Please run this by me again on the new patch, as I don't understand whether it's a comment on existing behaviors or my patch. And please understand that I barely know the difference between an origin and a host. ;-)
Attachment #8519670 -
Flags: review?(martin.thomson)
Assignee | ||
Updated•10 years ago
|
Attachment #8519346 -
Attachment is obsolete: true
Comment 5•10 years ago
|
||
Comment on attachment 8519670 [details] [diff] [review]
make gUM work from js console on about:home (2)
Review of attachment 8519670 [details] [diff] [review]:
-----------------------------------------------------------------
Yep, this is easier.
I think that I'll open a new bug on tracking permissions against an origin. That's a bigger change.
Attachment #8519670 -
Flags: review?(martin.thomson) → review+
Assignee | ||
Updated•10 years ago
|
Keywords: checkin-needed
Assignee | ||
Comment 7•10 years ago
|
||
I don't have one unfortunately with try being down.
Assignee | ||
Comment 8•10 years ago
|
||
Assignee | ||
Comment 9•10 years ago
|
||
Updated commit msg. Carrying forward r=mt.
Attachment #8519670 -
Attachment is obsolete: true
Attachment #8521089 -
Flags: review+
Assignee | ||
Updated•10 years ago
|
Keywords: checkin-needed
Comment 10•10 years ago
|
||
(In reply to Jan-Ivar Bruaroey [:jib] from comment #9)
> Created attachment 8521089 [details] [diff] [review]
> make gUM work from js console on about:home (3) r=mt
>
> Updated commit msg. Carrying forward r=mt.
Hi Jib, does this fix the failures from the try run too ?
Flags: needinfo?(jib)
Keywords: checkin-needed
Assignee | ||
Comment 11•10 years ago
|
||
Thanks! Fix try failure. Carrying forward r=mt.
Green try: https://treeherder.mozilla.org/ui/#/jobs?repo=try&revision=4c4a94a7d618
Attachment #8521089 -
Attachment is obsolete: true
Flags: needinfo?(jib)
Attachment #8521630 -
Flags: review+
Assignee | ||
Updated•10 years ago
|
Keywords: checkin-needed
Comment 12•10 years ago
|
||
Keywords: checkin-needed
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla36
Updated•10 years ago
|
Component: WebRTC → Device Permissions
Product: Core → Firefox
Target Milestone: mozilla36 → Firefox 36
Updated•10 years ago
|
QA Whiteboard: [good first verify]
You need to log in
before you can comment on or make changes to this bug.
Description
•