[Pkg-mozext-commits] [perspectives-extension] 03/22: Perspectives, Pers_statusbar - Remove newlines from debug logs

David Prévot taffit at moszumanska.debian.org
Wed Feb 26 22:23:48 UTC 2014


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

taffit pushed a commit to branch debian
in repository perspectives-extension.

commit c71fa7eb4d36f99c60ea8679dd2e5c26bc2eef4c
Author: Dave Schaefer <dave.schaefer at gmail.com>
Date:   Fri Jan 31 00:04:37 2014 -0700

    Perspectives, Pers_statusbar - Remove newlines from debug logs
    
    The messages are actually better formatted without them
    in the new Firefox Browser Console.
---
 plugin/chrome/content/initialize.xul | 14 +++++++-------
 plugin/chrome/content/notaries.js    | 18 +++++++++---------
 plugin/chrome/content/statusbar.js   | 14 +++++++-------
 3 files changed, 23 insertions(+), 23 deletions(-)

diff --git a/plugin/chrome/content/initialize.xul b/plugin/chrome/content/initialize.xul
index b14b4ab..26ff397 100644
--- a/plugin/chrome/content/initialize.xul
+++ b/plugin/chrome/content/initialize.xul
@@ -41,14 +41,14 @@
         if(!buttonId) {
           Pers_debug.d_print("error",
                     "Could not add Perspectives button to toolbar: "
-                    + buttonId + " doesn't exist\n");
+                    + buttonId + " doesn't exist");
           return;
         }
 
         if(!toolbarId) {
           Pers_debug.d_print("error",
                     "Could not add Perspectives button to toolbar: "
-                    + toolbarId + " doesn't exist\n");
+                    + toolbarId + " doesn't exist");
           return;
         }
         var toolbar = document.getElementById(toolbarId);
@@ -75,12 +75,12 @@
                     }
                     else {
                         Pers_debug.d_print("error",
-                          "Could not get element " + beforeId + "\n");
+                          "Could not get element " + beforeId + "");
                     }
                 }
                 else {
                     Pers_debug.d_print("error",
-                      "" + beforeId + " doesn't exist.\n");
+                      "" + beforeId + " doesn't exist.");
                 }
 
                 try{
@@ -88,7 +88,7 @@
                 }
                 catch(e) {
                   Pers_debug.d_print("error",
-                      "Could not add Perspectives button to toolbar:" + e + "\n");
+                      "Could not add Perspectives button to toolbar:" + e);
                 }
 
                 toolbar.setAttribute("currentset", toolbar.currentSet);
@@ -101,13 +101,13 @@
             else {
               Pers_debug.d_print("error",
                       "Could not add Perspectives button to toolbar: "
-                      + ToolbarId + " has no child node\n");
+                      + ToolbarId + " has no child node");
             }
         }
         else {
           Pers_debug.d_print("error",
                     "Could not add Perspectives button to toolbar: "
-                    + toolbarId + " doesn't exist\n");
+                    + toolbarId + " doesn't exist");
         }
     }
   </script>
diff --git a/plugin/chrome/content/notaries.js b/plugin/chrome/content/notaries.js
index 40ab5f1..31e2748 100644
--- a/plugin/chrome/content/notaries.js
+++ b/plugin/chrome/content/notaries.js
@@ -531,7 +531,7 @@ var Perspectives = {
 			Perspectives.strbundle = document.getElementById("notary_strings");
 		}
 
-		Pers_debug.d_print("main", "Update Status\n");
+		Pers_debug.d_print("main", "Update Status");
 		
 		var error_text = Perspectives.detectInvalidURI(win); 
 		if(error_text) { 	
@@ -549,7 +549,7 @@ var Perspectives = {
 			return;
 		} 
 		
-		Pers_debug.d_print("main", "Update Status: " + ti.uri.spec + "\n");
+		Pers_debug.d_print("main", "Update Status: " + ti.uri.spec);
 		
 		ti.cert       = Perspectives.getCertificate(ti.browser);
 		if(!ti.cert){
@@ -565,7 +565,7 @@ var Perspectives = {
 
 		ti.is_override_cert = Perspectives.overrideService.isCertUsedForOverrides(ti.cert, true, true);
 		Pers_debug.d_print("main", 
-			"is_override_cert = " + ti.is_override_cert + "\n"); 
+			"is_override_cert = " + ti.is_override_cert);
 		var check_good = Perspectives.root_prefs.
 			getBoolPref("perspectives.check_good_certificates"); 
 
@@ -628,11 +628,11 @@ var Perspectives = {
 		if(ti.query_results) { 
 			Perspectives.process_notary_results(ti);
 		} else {  
-			Pers_debug.d_print("main", ti.uri.host + " needs a request\n"); 
+			Pers_debug.d_print("main", ti.uri.host + " needs a request");
 			var needs_perm = Perspectives.root_prefs
 					.getBoolPref("perspectives.require_user_permission"); 
 			if(needs_perm && !ti.has_user_permission) {
-				Pers_debug.d_print("main", "needs user permission\n");  
+				Pers_debug.d_print("main", "needs user permission");
 				Pers_notify.do_notify(ti, Pers_notify.TYPE_NEEDS_PERMISSION);
 				var text = Perspectives.strbundle.getString("needsPermission"); 
 				Pers_statusbar.setStatus(ti.uri, Pers_statusbar.STATE_NEUT, text); 
@@ -650,7 +650,7 @@ var Perspectives = {
 				return; 
 			} 
  
-			Pers_debug.d_print("main", "Contacting notaries\n"); 
+			Pers_debug.d_print("main", "Contacting notaries");
 			// this call is asynchronous.  after hearing from the 
 			// notaries, the logic picks up again with the function 
 			// 'process_notary_results()' below
@@ -841,7 +841,7 @@ var Perspectives = {
 				Perspectives.strbundle = document.getElementById("notary_strings");
 			}
       			try{
-        			Pers_debug.d_print("main", "Location change " + aURI.spec + "\n");
+        			Pers_debug.d_print("main", "Location change " + aURI.spec);
         			Pers_statusbar.setStatus(aURI, Pers_statusbar.STATE_QUERY, 
         				Perspectives.strbundle.getFormattedString("contactingNotariesAbout", [ aURI.host ]));
       			} catch(err){
@@ -859,7 +859,7 @@ var Perspectives = {
 			if(aFlag & Components.interfaces.nsIWebProgressListener.STATE_STOP){
        			  try {
      				var uri = window.gBrowser.currentURI;
-     				Pers_debug.d_print("main", "State change " + uri.spec + "\n");
+    				Pers_debug.d_print("main", "State change " + uri.spec);
          			Perspectives.updateStatus(window,false);
        			  } catch (err) {
          			Pers_debug.d_print("error", "Perspectives had an internal exception: " + err);
@@ -875,7 +875,7 @@ var Perspectives = {
        			var uri = null;
        			try{
          			uri = window.gBrowser.currentURI;
-         			Pers_debug.d_print("main", "Security change " + uri.spec + "\n");
+         			Pers_debug.d_print("main", "Security change " + uri.spec);
          			Perspectives.updateStatus(window,false);
        			} catch(err){
          			Pers_debug.d_print("error", "Perspectives had an internal exception: " + err);
diff --git a/plugin/chrome/content/statusbar.js b/plugin/chrome/content/statusbar.js
index eb79797..9222720 100644
--- a/plugin/chrome/content/statusbar.js
+++ b/plugin/chrome/content/statusbar.js
@@ -88,33 +88,33 @@ var Pers_statusbar = {
 			imgList[j].parentNode.setAttribute("tooltiptext", tooltip); 
 			switch(state){
 			case Pers_statusbar.STATE_SEC:
-				Pers_debug.d_print("main", "Secure Status\n");
+				Pers_debug.d_print("main", "Secure Status");
 				imgList[j].setAttribute("src", "chrome://perspectives/content/img/good.png");
 				continue;
 			case Pers_statusbar.STATE_NSEC:
-				Pers_debug.d_print("main", "Unsecure Status\n");
+				Pers_debug.d_print("main", "Unsecure Status");
 				imgList[j].setAttribute("src", "chrome://perspectives/content/img/bad.png");
 				continue;
 			case Pers_statusbar.STATE_NEUT:
-				Pers_debug.d_print("main", "Neutral Status\n");
+				Pers_debug.d_print("main", "Neutral Status");
 				imgList[j].setAttribute("src", "chrome://perspectives/content/img/default.png");
 				continue;
 			case Pers_statusbar.STATE_WHITELIST:
 				//TODO: have other code call this
-				Pers_debug.d_print("main", "Whitelist Status\n");
+				Pers_debug.d_print("main", "Whitelist Status");
 				imgList[j].setAttribute("src", "chrome://perspectives/content/img/whitelist.png");
 				continue;
 			case Pers_statusbar.STATE_QUERY:
-				Pers_debug.d_print("main", "Querying Status\n");
+				Pers_debug.d_print("main", "Querying Status");
 				imgList[j].setAttribute("src", "chrome://perspectives/content/img/progress.gif");
 				continue;
 			case Pers_statusbar.STATE_ERROR:
-				Pers_debug.d_print("main", "Error Status\n");
+				Pers_debug.d_print("main", "Error Status");
 				imgList[j].setAttribute("src", "chrome://perspectives/content/img/error.png");
 				continue;
 			}
 		}
-		Pers_debug.d_print("main", "changing tooltip to: " + tooltip + "\n"); 
+		Pers_debug.d_print("main", "changing tooltip to: " + tooltip);
 		return true;
 	},
 

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



More information about the Pkg-mozext-commits mailing list