From a1743165d4f7b9e05f8ecf721cc9238efe102139 Mon Sep 17 00:00:00 2001 From: Kris Maglione Date: Tue, 23 Aug 2011 18:00:43 -0400 Subject: [PATCH] Fix template._sandbox. --- common/content/dactyl.js | 4 ++-- common/modules/template.jsm | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/common/content/dactyl.js b/common/content/dactyl.js index ae5f2216..08175652 100644 --- a/common/content/dactyl.js +++ b/common/content/dactyl.js @@ -1486,8 +1486,8 @@ var Dactyl = Module("dactyl", XPCOM(Ci.nsISupportsWeakReference, ModuleBase), { // FIXME: cleanup cleanupValue: config.cleanups.guioptions || - "r" + [k for ([k, v] in iter(groups[1].opts)) - if (!Dactyl.toolbarHidden(document.getElementById(v[1][0])))].join(""), + "rb" + [k for ([k, v] in iter(groups[1].opts)) + if (!Dactyl.toolbarHidden(document.getElementById(v[1][0])))].join(""), values: array(groups).map(function (g) [[k, v[0]] for ([k, v] in Iterator(g.opts))]).flatten(), diff --git a/common/modules/template.jsm b/common/modules/template.jsm index 852dd2e8..2dedd5eb 100644 --- a/common/modules/template.jsm +++ b/common/modules/template.jsm @@ -4,6 +4,7 @@ // given in the LICENSE.txt file included with this file. "use strict"; +let global = this; Components.utils.import("resource://dactyl/bootstrap.jsm"); defineModule("template", { exports: ["Binding", "Template", "template"], @@ -270,7 +271,7 @@ var Template = Module("Template", { } }, - _sandbox: Class.Memoize(function () Cu.Sandbox(this, { wantXrays: false })), + _sandbox: Class.Memoize(function () Cu.Sandbox(global, { wantXrays: false })), // if "processStrings" is true, any passed strings will be surrounded by " and // any line breaks are displayed as \n