[Pkg-mozext-commits] [itsalltext] 359/459: Fixed ticket #78

David Prévot taffit at moszumanska.debian.org
Tue Feb 24 23:26:38 UTC 2015


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch master
in repository itsalltext.

commit 99c228621227afc42426c193e7630ac8d0b79fb4
Author: Christian Höltje <docwhat at gerf.org>
Date:   Fri Jan 22 18:28:16 2010 -0500

    Fixed ticket #78
    
    Using Component.lookupMethod() is a bad idea.
---
 src/chrome/content/itsalltext.js | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/src/chrome/content/itsalltext.js b/src/chrome/content/itsalltext.js
index 25f12f1..1c084c6 100644
--- a/src/chrome/content/itsalltext.js
+++ b/src/chrome/content/itsalltext.js
@@ -724,8 +724,7 @@ ItsAllText.prototype.listen = function (source, event, listener, opt_capture) {
     opt_capture = !!opt_capture;
     this.debug("listen(%o, %o, -, %o)", source, event, opt_capture);
     if (source) {
-        Components.lookupMethod(source, "addEventListener")(
-            event, listener, opt_capture);
+        source.addEventListener(event, listener, opt_capture);
     }
 };
 
@@ -740,8 +739,7 @@ ItsAllText.prototype.unlisten = function (source, event, listener, opt_capture)
     opt_capture = !!opt_capture;
     this.debug("unlisten(%o, %o, -, %o)", source, event, opt_capture);
     try {
-        Components.lookupMethod(source, "removeEventListener")(
-            event, listener, opt_capture);
+        source && source.removeEventListener(event, listener, opt_capture);
     } catch (err) {
         this.debug("didn't unlisten: %o", err);
     }

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/itsalltext.git



More information about the Pkg-mozext-commits mailing list