Bug 1415342 - Part 3 - Clear MediaMmanager deviceIds when clearing cookies. r=esawin
authorJan Henning <jh+bugzilla@buttercookie.de>
Thu, 12 Apr 2018 20:37:21 +0200
changeset 468051 78ea2b0c5f65c7a644ce05051f490b801d01815e
parent 468050 6ed0756634261ff6ab8287dc5e0ecf5b0ee0acaa
child 468052 c204a27313079105c498c9700df3c3a375410243
push id9165
push userasasaki@mozilla.com
push dateThu, 26 Apr 2018 21:04:54 +0000
treeherdermozilla-beta@064c3804de2e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersesawin
bugs1415342
milestone61.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 1415342 - Part 3 - Clear MediaMmanager deviceIds when clearing cookies. r=esawin There is at least one reference to the MediaManagerService being used within mobile in conjunction with WebRTC, so we should do the same thing that desktop Firefox is doing here. MozReview-Commit-ID: 1z1cLapxK2F
mobile/android/modules/Sanitizer.jsm
--- a/mobile/android/modules/Sanitizer.jsm
+++ b/mobile/android/modules/Sanitizer.jsm
@@ -98,16 +98,24 @@ Sanitizer.prototype = {
       clear: function() {
         return new Promise(function(resolve, reject) {
           let refObj = {};
           TelemetryStopwatch.start("FX_SANITIZE_COOKIES_2", refObj);
 
           Services.cookies.removeAll();
 
           TelemetryStopwatch.finish("FX_SANITIZE_COOKIES_2", refObj);
+
+          // Clear deviceIds. Done asynchronously (returns before complete).
+          try {
+            let mediaMgr = Cc["@mozilla.org/mediaManagerService;1"]
+                             .getService(Ci.nsIMediaManagerService);
+            mediaMgr.sanitizeDeviceIds(0);
+          } catch (er) { }
+
           resolve();
         });
       },
 
       get canClear() {
         return true;
       }
     },