diff --git a/common/content/events.js b/common/content/events.js index c5795158..3dbe77e9 100644 --- a/common/content/events.js +++ b/common/content/events.js @@ -1018,6 +1018,7 @@ var Events = Module("events", { if (refeed) for (let [i, event] in Iterator(refeed)) if (event.originalTarget) { + util.dump("Re-feed " + i + " " + refeed.length + " " + (events.toString(event) || "").quote()); let evt = events.create(event.originalTarget.ownerDocument, event.type, event); events.dispatch(event.originalTarget, evt, i == 0 && { skipmap: true }); } diff --git a/common/content/mappings.js b/common/content/mappings.js index 53596adb..7e88c23e 100644 --- a/common/content/mappings.js +++ b/common/content/mappings.js @@ -110,7 +110,11 @@ var Map = Class("Map", { if (this.names[0] != ".") // FIXME: Kludge. mappings.repeat = repeat; - return dactyl.trapErrors(repeat); + dactyl.assert(!this.executing, "Attempt to execute mapping recursively"); + this.executing = true; + let res = dactyl.trapErrors(repeat); + this.executing = false; + return res; } }, { diff --git a/common/content/modes.js b/common/content/modes.js index 8a1694cd..965eb4b6 100644 --- a/common/content/modes.js +++ b/common/content/modes.js @@ -387,7 +387,7 @@ var Modes = Module("modes", { }, options); }, - toString: function () this.name, + get toStringParams() [this.name], valueOf: function () this.id, @@ -411,14 +411,14 @@ var Modes = Module("modes", { }), StackElement: (function () { const StackElement = Struct("main", "extended", "params", "saved"); + StackElement.className = "Modes.StackElement"; StackElement.defaultValue("params", function () this.main.params); + update(StackElement.prototype, { - toString: function () !loaded.modes ? this.main : "[mode " + - this.main.name + - (!this.extended ? "" : - "(" + modes.all.filter(function (m) this.extended & m) - .join("|") + - ")") + "]" + get toStringParams() !loaded.modes ? this.main.name : [ + this.main.name, + <>({ modes.all.filter(function (m) this.extended & m, this).map(function (m) m.name).join("|") }) + ] }); return StackElement; })(), diff --git a/common/modules/base.jsm b/common/modules/base.jsm index df7fb30b..868a3e46 100644 --- a/common/modules/base.jsm +++ b/common/modules/base.jsm @@ -769,7 +769,8 @@ Class.prototype = { toString: function () { if (this.toStringParams) var params = "(" + this.toStringParams.map(function (m) isArray(m) ? "[" + m + "]" : - isString(m) ? m.quote() : String(m)) + ")"; + isString(m) ? m.quote() : String(m)) + .join(", ") + ")"; return "[instance " + this.constructor.className + (params || "") + "]"; },