diff --git a/content/completion.js b/content/completion.js index 2208abf4..80d37a46 100644 --- a/content/completion.js +++ b/content/completion.js @@ -57,12 +57,12 @@ function CompletionContext(editor, name, offset) self.keys = util.cloneObject(parent.keys); ["compare", "editor", "filterFunc", "keys", "process", "quote", "title", "top"].forEach(function (key) self[key] = parent[key]); + if (self != this) + return self; ["contextList", "onUpdate", "selectionTypes", "tabPressed", "updateAsync", "value"].forEach(function (key) { self.__defineGetter__(key, function () this.top[key]); self.__defineSetter__(key, function (val) this.top[key] = val); }); - if (self != this) - return self; } else { @@ -95,12 +95,8 @@ function CompletionContext(editor, name, offset) this.keys = { text: 0, description: 1, icon: "icon" }; this.offset = offset || 0; this.onUpdate = function () true; - this.process = []; - this.tabPressed = false; - this.title = ["Completions"]; this.top = this; this.__defineGetter__("incomplete", function () this.contextList.some(function (c) c.parent && c.incomplete)); - this.selectionTypes = {}; this.reset(); } this.name = name || ""; @@ -390,8 +386,10 @@ CompletionContext.prototype = { this.highlight(0, 0, type); this.contextList = []; this.offset = 0; + this.process = []; this.selectionTypes = {}; this.tabPressed = false; + this.title = ["Completions"]; this.updateAsync = false; this.value = this.editor ? this.editor.rootElement.textContent : this._value; //for (let key in (k for ([k, v] in Iterator(self.contexts)) if (v.offset > this.caret))) diff --git a/content/liberator.js b/content/liberator.js index 684807af..8d1b57e7 100644 --- a/content/liberator.js +++ b/content/liberator.js @@ -1095,17 +1095,21 @@ const liberator = (function () //{{{ { if (Components.utils.reportError) Components.utils.reportError(error); - let obj = { - toString: function () error.toString(), - stack: <>{error.stack.replace(/^/mg, "\t")} - }; - for (let [k, v] in Iterator(error)) + try { - if (!(k in obj)) - obj[k] = v; + let obj = { + toString: function () error.toString(), + stack: <>{error.stack.replace(/^/mg, "\t")} + }; + for (let [k, v] in Iterator(error)) + { + if (!(k in obj)) + obj[k] = v; + } + liberator.dump(obj); + liberator.dump(""); } - liberator.dump(obj); - liberator.dump(""); + catch (e) {} }, restart: function () diff --git a/content/options.js b/content/options.js index 5aeae1d2..0b2932a7 100644 --- a/content/options.js +++ b/content/options.js @@ -186,6 +186,7 @@ Option.prototype = { op: function (operator, values, scope, invert) { let newValue = null; + let self = this; switch (this.type) {