[Pkg-mozext-commits] [itsalltext] 280/459: added catch for weird error

David Prévot taffit at moszumanska.debian.org
Tue Feb 24 23:26:29 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 ccdb6f2390fb34f8e4ce2a792f8f99584926d842
Author: Christian Höltje <docwhat at gerf.org>
Date:   Wed Oct 3 00:03:40 2007 -0400

    added catch for weird error
---
 src/chrome/content/itsalltext.js | 14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)

diff --git a/src/chrome/content/itsalltext.js b/src/chrome/content/itsalltext.js
index f0db7c9..b2b283c 100644
--- a/src/chrome/content/itsalltext.js
+++ b/src/chrome/content/itsalltext.js
@@ -631,7 +631,17 @@ var ItsAllText = function() {
                     location &&
                     location.protocol != 'about:' &&
                     location.protocol != 'chrome:';
-                is_my_readme = location && location.href == that.README;
+                try {
+                    is_my_readme = location && location.href == that.README;
+                    /*
+                     * Avoiding this error.... I hope.
+                     * uncaught exception: [Exception... "Component returned failure code: 0x80004003 (NS_ERROR_INVALID_POINTER) [nsIDOMLocation.href]"  nsresult: "0x80004003 (NS_ERROR_INVALID_POINTER)"  location: "JS frame :: chrome://itsalltext/chrome/itsalltext.js :: anonymous :: line 634"  data: no]
+Line 0
+                    */
+                } catch(e) {
+                    is_my_readme = false;
+                    is_usable = false;
+                }
                 if (!(is_usable || is_my_readme)) {
                     that.debuglog('watch(): ignoring -- ',
                                   location, contentType);
@@ -995,7 +1005,7 @@ ItsAllText.prototype.pageunload = function(event) {
     /* We don't check for the doc type because we want to
      * be sure everything is unloaded.
      */
-    this.debug("pageunload(): A page has been unloaded",doc);
+    this.debug("pageunload(): A page has been unloaded", doc);
     this.monitor.unwatch(doc);
     this.preference_observer.unregister();
     this.cleanCacheObjs();

-- 
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