diff --git a/common/content/dactyl.js b/common/content/dactyl.js index 95356359..7a8ac25a 100644 --- a/common/content/dactyl.js +++ b/common/content/dactyl.js @@ -12,9 +12,6 @@ default xml namespace = XHTML; XML.ignoreWhitespace = false; XML.prettyPrinting = false; -var userContext = { __proto__: modules }; -var _userContext = newContext(userContext); - var EVAL_ERROR = "__dactyl_eval_error"; var EVAL_RESULT = "__dactyl_eval_result"; var EVAL_STRING = "__dactyl_eval_string"; diff --git a/common/content/tabs.js b/common/content/tabs.js index efb44b43..0c6abfe1 100644 --- a/common/content/tabs.js +++ b/common/content/tabs.js @@ -375,19 +375,14 @@ var Tabs = Module("tabs", { * reloading. */ reloadAll: function (bypassCache) { - if (bypassCache) { - for (let i = 0; i < config.tabbrowser.mTabs.length; i++) { - try { - this.reload(config.tabbrowser.mTabs[i], bypassCache); - } - catch (e) { - // FIXME: can we do anything useful here without stopping the - // other tabs from reloading? - } + this.visibleTabs.forEach(function (tab) { + try { + this.reload(config.tabbrowser.mTabs[i], bypassCache); } - } - else - config.tabbrowser.reloadAllTabs(); + catch (e) { + dactyl.reportError(e, true); + } + }); }, /** diff --git a/common/locale/en-US/map.xml b/common/locale/en-US/map.xml index 640b321e..7b777129 100644 --- a/common/locale/en-US/map.xml +++ b/common/locale/en-US/map.xml @@ -122,7 +122,7 @@
-group=group
Add this command to the given group (short name -g)
-javascript
Execute rhs as JavaScript rather than keys (short names -js, -j)
-literal=n
Parse the nth argument without specially processing any quote or meta characters. (short name -l)
-
-modes
Create this mapping in the given modes (short names -mode, -m)
+
-modes=modes
Create this mapping in the given modes (short names -mode, -m)
-nopersist
Do not save this mapping to an auto-generated rc file (short name -n)
-silent
Do not echo any generated keys to the command line (short name -s, also <silent> for Vim compatibility)
diff --git a/common/modules/base.jsm b/common/modules/base.jsm index f39f17bf..6e3c6c7d 100644 --- a/common/modules/base.jsm +++ b/common/modules/base.jsm @@ -620,6 +620,7 @@ function memoize(obj, key, getter) { }); } catch (e) { + util.reportError(e); obj[key] = getter.call(obj, key); } } diff --git a/common/modules/contexts.jsm b/common/modules/contexts.jsm index 15549e37..1d90c05f 100644 --- a/common/modules/contexts.jsm +++ b/common/modules/contexts.jsm @@ -109,6 +109,9 @@ var Contexts = Module("contexts", { completer: function (context) modules.completion.group(context) }); + + memoize(modules, "userContext", function () contexts.Context(modules.io.getRCFile("~"), contexts.user, [modules, true])); + memoize(modules, "_userContext", function () contexts.Context(modules.io.getRCFile("~"), contexts.user, [modules.userContext])); }, cleanup: function () { @@ -187,7 +190,7 @@ var Contexts = Module("contexts", { let name = isPlugin ? file.getRelativeDescriptor(isPlugin).replace(File.PATH_SEP, "-") : file.leafName; - self = update(newContext.apply(null, args || [userContext]), { + self = update(args && !isArray(args) ? args : newContext.apply(null, args || [userContext]), { NAME: Const(name.replace(/\.[^.]*$/, "").replace(/-([a-z])/g, function (m, n1) n1.toUpperCase())), PATH: Const(file.path), @@ -212,7 +215,7 @@ var Contexts = Module("contexts", { contexts.removeGroup(this.GROUP); }) }); - Class.replaceProperty(plugins, file.path, self); + // Class.replaceProperty(plugins, file.path, self); // This belongs elsewhere if (isPlugin && args)