Bug 885768 - Cannot make a getUserMedia request within an iframe. r=mfinkle
authorGian-Carlo Pascutto <gpascutto@mozilla.com>
Tue, 23 Jul 2013 08:24:44 +0200
changeset 151826 f242b23cc6877a68c386ef553b155e3aac49f256
parent 151825 1a4da037387adc00180ff9e0e65a8e2842e2666e
child 151827 760bae262cc94a8bed40c846da8efa15f29e1e29
push id2859
push userakeybl@mozilla.com
push dateMon, 16 Sep 2013 19:14:59 +0000
treeherdermozilla-beta@87d3c51cd2bf [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmfinkle
bugs885768
milestone25.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 885768 - Cannot make a getUserMedia request within an iframe. r=mfinkle
mobile/android/chrome/content/WebrtcUI.js
--- a/mobile/android/chrome/content/WebrtcUI.js
+++ b/mobile/android/chrome/content/WebrtcUI.js
@@ -72,20 +72,19 @@ var WebrtcUI = {
 
     sendMessageToJava(msg);
   },
 
   handleRequest: function handleRequest(aSubject, aTopic, aData) {
     let { windowID: windowID, callID: callID } = JSON.parse(aData);
 
     let contentWindow = Services.wm.getOuterWindowWithId(windowID);
-    let browser = BrowserApp.getBrowserForWindow(contentWindow);
     let params = aSubject.QueryInterface(Ci.nsIMediaStreamOptions);
 
-    browser.ownerDocument.defaultView.navigator.mozGetUserMediaDevices(
+    Services.wm.getMostRecentWindow(null).navigator.mozGetUserMediaDevices(
       function (devices) {
         WebrtcUI.prompt(windowID, callID, params.audio, params.video, devices);
       },
       function (error) {
         Cu.reportError(error);
       }
     );
   },