Bug 1070036 - Catch NS_ERROR_NOT_AVAILABLE during OpenH264Provider startup. r=irving
authorGeorg Fritzsche <georg.fritzsche@googlemail.com>
Wed, 24 Sep 2014 17:38:50 +0200
changeset 207580 d71444b752910f2987993a0a0d9fe1465ccf682d
parent 207579 9dcdf878b422cdc190e945a8637a135528911833
child 207581 649d337d331c197ec71fdc32a97f902d178449ba
push id49723
push usergeorg.fritzsche@googlemail.com
push dateSun, 28 Sep 2014 14:10:14 +0000
treeherdermozilla-inbound@d71444b75291 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersirving
bugs1070036
milestone35.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 1070036 - Catch NS_ERROR_NOT_AVAILABLE during OpenH264Provider startup. r=irving
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);