mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-01-30 19:35:46 +01:00
Fix some major mode changing bugs. Closes issue #55.
--HG-- branch : mode-refactoring
This commit is contained in:
@@ -57,6 +57,7 @@ const Util = Module("Util", {
|
||||
if (observers[target])
|
||||
observers[target].call(obj, subject, data);
|
||||
});
|
||||
obj.observe.unRegister = function () register("removeObserver");
|
||||
register("addObserver");
|
||||
},
|
||||
|
||||
@@ -248,7 +249,7 @@ const Util = Module("Util", {
|
||||
* @param {number} frames The number of frames to print.
|
||||
*/
|
||||
dumpStack: function dumpStack(msg, frames) {
|
||||
let stack = Error().stack.replace(/(?:.*\n){1}/, "");
|
||||
let stack = Error().stack.replace(/(?:.*\n){2}/, "");
|
||||
if (frames != null)
|
||||
[stack] = stack.match(RegExp("(?:.*\n){0," + frames + "}"));
|
||||
util.dump((msg || "Stack") + "\n" + stack + "\n");
|
||||
|
||||
Reference in New Issue
Block a user