mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-24 02:35:41 +00:00
Bug 894882 - Make sure the correct host is displayed when prompting for WebRTC from iframes r=wesj
This commit is contained in:
parent
33daf36a24
commit
5a400869a0
@ -82,7 +82,7 @@ var WebrtcUI = {
|
||||
|
||||
browser.ownerDocument.defaultView.navigator.mozGetUserMediaDevices(
|
||||
function (devices) {
|
||||
WebrtcUI.prompt(browser, callID, params.audio, params.video, devices);
|
||||
WebrtcUI.prompt(windowID, callID, params.audio, params.video, devices);
|
||||
},
|
||||
function (error) {
|
||||
Cu.reportError(error);
|
||||
@ -156,7 +156,7 @@ var WebrtcUI = {
|
||||
}
|
||||
},
|
||||
|
||||
prompt: function prompt(aBrowser, aCallID, aAudioRequested, aVideoRequested, aDevices) {
|
||||
prompt: function prompt(aWindowID, aCallID, aAudioRequested, aVideoRequested, aDevices) {
|
||||
let audioDevices = [];
|
||||
let videoDevices = [];
|
||||
for (let device of aDevices) {
|
||||
@ -183,7 +183,8 @@ var WebrtcUI = {
|
||||
else
|
||||
return;
|
||||
|
||||
let host = aBrowser.contentDocument.documentURIObject.asciiHost;
|
||||
let contentWindow = Services.wm.getOuterWindowWithId(aWindowID);
|
||||
let host = contentWindow.document.documentURIObject.host;
|
||||
let requestor = BrowserApp.manifest ? "'" + BrowserApp.manifest.name + "'" : host;
|
||||
let message = Strings.browser.formatStringFromName("getUserMedia.share" + requestType + ".message", [ requestor ], 1);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user