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 216874 b6985e15046b
parent 216873 82f4086ba2c7
child 216875 69047a750833
push id3950
push usergeorg.fritzsche@googlemail.com
push date2014-09-29 17:41 +0000
treeherdermozilla-beta@b6985e15046b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersirving, sledru
bugs1070036
milestone33.0
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);