diff options
author | Kris Maglione <maglione.k@gmail.com> | 2011-08-28 18:24:40 -0400 |
---|---|---|
committer | Kris Maglione <maglione.k@gmail.com> | 2011-08-28 18:24:40 -0400 |
commit | 532f2a10ab46ad892fbf213be966801b562ac4c1 (patch) | |
tree | 6772f871ac5307965c6d2bd577c7ceceb999b75a /common | |
parent | aba6aaddd79d6cd08eb0736fab9dc5abf28e59b1 (diff) | |
download | pentadactyl-532f2a10ab46ad892fbf213be966801b562ac4c1.tar.gz |
Remove dead protocols.js symlinks.
Diffstat (limited to 'common')
-rw-r--r-- | common/modules/dom.jsm | 6 | ||||
-rw-r--r-- | common/modules/messages.jsm | 1 | ||||
-rw-r--r-- | common/modules/overlay.jsm | 2 |
3 files changed, 7 insertions, 2 deletions
diff --git a/common/modules/dom.jsm b/common/modules/dom.jsm index d27876bc..e1246b7f 100644 --- a/common/modules/dom.jsm +++ b/common/modules/dom.jsm @@ -302,6 +302,9 @@ var DOM = Class("DOM", { }, get editor() { + if (!this.length) + return; + this[0] instanceof Ci.nsIDOMNSEditableElement; if (this[0].editor instanceof Ci.nsIEditor) return this[0].editor; @@ -511,6 +514,9 @@ var DOM = Class("DOM", { elem.setAttributeNS(ns, k, v); }); + if (!this.length) + return null; + if (Set.has(hooks, key) && hooks[key].get) return hooks[key].get.call(this, this[0]); diff --git a/common/modules/messages.jsm b/common/modules/messages.jsm index 0473e692..5def642b 100644 --- a/common/modules/messages.jsm +++ b/common/modules/messages.jsm @@ -12,7 +12,6 @@ defineModule("messages", { require: ["services", "util"] }, this); -// TODO: Lazy instantiation var Messages = Module("messages", { init: function init(name) { diff --git a/common/modules/overlay.jsm b/common/modules/overlay.jsm index fc841df5..4d048c4b 100644 --- a/common/modules/overlay.jsm +++ b/common/modules/overlay.jsm @@ -498,7 +498,7 @@ var Overlay = Module("Overlay", XPCOM([Ci.nsIObserver, Ci.nsISupportsWeakReferen Object.defineProperty(object, k, desc); if (callable(value)) { - let sentinel = "(function DactylOverlay() {}())" + var sentinel = "(function DactylOverlay() {}())" value.toString = function toString() toString.toString.call(this).replace(/\}?$/, sentinel + "; $&"); value.toSource = function toSource() toSource.toSource.call(this).replace(/\}?$/, sentinel + "; $&"); } |