Add try/catch here required by the behavior change in bug 524995 (enabling/disabling plugins is broken), r=mfinkle
authorGavin Sharp <gavin@gavinsharp.com>
Wed, 04 Nov 2009 11:59:14 -0500
changeset 65756 493937b76e12b28f6c8569d9aa22ba9169c0796f
parent 65755 188dc606d26b04f55c55bd2613f838be008c5ea7
child 65757 99d4ad5e19e9756444220a96ef3faf14412f08ad
push id1
push userroot
push dateTue, 26 Apr 2011 22:38:44 +0000
treeherdermozilla-beta@bfdb6e623a36 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmfinkle
bugs524995
Add try/catch here required by the behavior change in bug 524995 (enabling/disabling plugins is broken), r=mfinkle
mobile/chrome/content/browser.js
--- a/mobile/chrome/content/browser.js
+++ b/mobile/chrome/content/browser.js
@@ -590,17 +590,19 @@ var Browser = {
 
     window.controllers.removeController(this);
     window.controllers.removeController(BrowserUI);
   },
 
   setPluginState: function(enabled, nameMatch) {
     // XXX clear this out so that we always disable flash on startup, even
     // after the user has disabled/re-enabled plugins
-    gPrefService.clearUserPref("temporary.disabledFlash");
+    try {
+      gPrefService.clearUserPref("temporary.disabledFlash");
+    } catch (ex) {}
 
     var phs = Cc["@mozilla.org/plugin/host;1"].getService(Ci.nsIPluginHost);
     var plugins = phs.getPluginTags({ });
     for (var i = 0; i < plugins.length; ++i) {
       if (nameMatch && !nameMatch.test(plugins[i].name))
         continue;
       plugins[i].disabled = !enabled;
     }