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 () {