Bug 1070036 - Catch NS_ERROR_NOT_AVAILABLE during OpenH264Provider startup. r=irving
--- 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);