Bug 1070036 - Catch NS_ERROR_NOT_AVAILABLE during OpenH264Provider startup. r=irving, a=sledru
authorGeorg Fritzsche <georg.fritzsche@googlemail.com>
Wed, 24 Sep 2014 17:38:50 +0200
changeset 225168 155cfcc5efa951937ddeb25b157b128a6cfcc1ee
parent 225167 9cfcdef0dc56a544480d6e495641dc0db3d764f5
child 225169 973e99d258a8173609ffb034a9e3d278f0fe9bf3
push id3979
push userraliiev@mozilla.com
push dateMon, 13 Oct 2014 16:35:44 +0000
treeherdermozilla-beta@30f2cc610691 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersirving, sledru
bugs1070036
milestone34.0a2
Bug 1070036 - Catch NS_ERROR_NOT_AVAILABLE during OpenH264Provider startup. r=irving, a=sledru
toolkit/mozapps/extensions/internal/OpenH264Provider.jsm
--- a/toolkit/mozapps/extensions/internal/OpenH264Provider.jsm
+++ b/toolkit/mozapps/extensions/internal/OpenH264Provider.jsm
@@ -263,17 +263,21 @@ let OpenH264Provider = {
 
     Services.obs.addObserver(this, AddonManager.OPTIONS_NOTIFICATION_DISPLAYED, false);
     prefs.observe(OPENH264_PREF_ENABLED, this.onPrefEnabledChanged, this);
     prefs.observe(OPENH264_PREF_VERSION, this.onPrefVersionChanged, this);
     prefs.observe(OPENH264_PREF_LOGGING, configureLogging);
 
     if (this.gmpPath && enabled) {
       this._log.info("startup() - adding gmp directory " + this.gmpPath);
-      gmpService.addPluginDirectory(this.gmpPath);
+      try {
+        gmpService.addPluginDirectory(this.gmpPath);
+      } catch (e if e.name == 'NS_ERROR_NOT_AVAILABLE') {
+        this._log.warning("startup() - adding gmp directory failed with " + e.name + " - sandboxing not available?");
+      }
     }
   },
 
   shutdown: function() {
     this._log.trace("shutdown()");
     Services.obs.removeObserver(this, AddonManager.OPTIONS_NOTIFICATION_DISPLAYED);
     prefs.ignore(OPENH264_PREF_ENABLED, this.onPrefEnabledChanged, this);
     prefs.ignore(OPENH264_PREF_VERSION, this.onPrefVersionChanged, this);