From a2a3436241d26b900ef15778f85005b0bf33ac3c Mon Sep 17 00:00:00 2001 From: Kris Maglione Date: Fri, 26 Apr 2013 22:12:57 -0700 Subject: [PATCH] [PWPBM] Minor code cleanup. --- common/content/dactyl.js | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/common/content/dactyl.js b/common/content/dactyl.js index 9cc5fcea..869cd735 100644 --- a/common/content/dactyl.js +++ b/common/content/dactyl.js @@ -1884,18 +1884,13 @@ var Dactyl = Module("dactyl", XPCOM(Ci.nsISupportsWeakReference, ModuleBase), { && root._lightweightTheme && root._lightweightTheme._lastScreenWidth == null) { - let { isWindowPrivate } = PrivateBrowsingUtils; - try { + this.withSavedValues.call(PrivateBrowsingUtils, + ["isWindowPrivate"], function () { PrivateBrowsingUtils.isWindowPrivate = function () false; - let { LightweightThemeConsumer } = Cu.import("resource://gre/modules/LightweightThemeConsumer.jsm", {}); - LightweightThemeConsumer.call(root._lightweightTheme, document); - } - catch (e) { - util.reportError(e); - } - finally { - PrivateBrowsingUtils.isWindowPrivate = isWindowPrivate; - } + + Cu.import("resource://gre/modules/LightweightThemeConsumer.jsm", {}) + .LightweightThemeConsumer.call(root._lightweightTheme, document); + }); } dactyl.timeout(function () {