[Pkg-mozext-commits] [requestpolicy] 214/257: [ref] revert using Template Strings

David Prévot taffit at moszumanska.debian.org
Thu Jan 28 03:20:14 UTC 2016


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

taffit pushed a commit to branch master
in repository requestpolicy.

commit b3480c2ae27bec715832007c5ea273c0e92ae2db
Author: Martin Kimmerle <dev at 256k.de>
Date:   Tue Dec 15 16:31:32 2015 +0100

    [ref] revert using Template Strings
---
 src/content/lib/environment.jsm       | 14 ++++++++------
 src/content/lib/old-rules.jsm         |  3 ++-
 src/content/lib/script-loader.jsm     | 22 +++++++++++++---------
 src/content/lib/utils/domains.jsm     |  2 +-
 src/content/settings/common.js        |  4 ++--
 src/content/settings/subscriptions.js |  3 ++-
 6 files changed, 28 insertions(+), 20 deletions(-)

diff --git a/src/content/lib/environment.jsm b/src/content/lib/environment.jsm
index 9c8d234..4597e7a 100644
--- a/src/content/lib/environment.jsm
+++ b/src/content/lib/environment.jsm
@@ -214,7 +214,7 @@ var Environment = (function() {
     });
 
     // #ifdef LOG_ENVIRONMENT
-    log.debug(`created new Environment "${self.name}`);
+    log.debug("created new Environment \"" + self.name + "\"");
     // #endif
   }
 
@@ -326,7 +326,7 @@ var Environment = (function() {
       // #ifdef LOG_ENVIRONMENT
       let fName = f.name || "anonymous";
       log.debug("calling shutdown function immediately: " +
-          `"${fName}" (${self.name})`);
+          "\"" + fName + "\" (" + self.name + ")");
       // #endif
     } else {
       // The opposite, i.e. the startup process did not reach the function's
@@ -388,7 +388,8 @@ var Environment = (function() {
           Cu.reportError(e);
         }
         // #ifdef LOG_ENVIRONMENT
-        log.debug(`function called! (${aFunctions.length} functions left)`);
+        log.debug("function called! (" + aFunctions.length +
+            " functions left)");
         // #endif
       }
     }
@@ -409,7 +410,8 @@ var Environment = (function() {
       if (levelObj.levelState === LEVEL_STATES.NOT_ENTERED) {
         levelObj.levelState = LEVEL_STATES.PROCESSING;
         // #ifdef LOG_ENVIRONMENT
-        log.debug(`processing level ${aLevel} of startup (${self.uid})`);
+        log.debug("processing level " + aLevel + " of startup (" +
+            self.uid + ")");
         // #endif
 
         if (aStartupOrShutdown === "shutdown") {
@@ -423,8 +425,8 @@ var Environment = (function() {
 
         levelObj.levelState = LEVEL_STATES.FINISHED_PROCESSING;
         // #ifdef LOG_ENVIRONMENT
-        log.debug(`processing level ${aLevel} of startup ` +
-            `(${self.uid}) finished`);
+        log.debug("processing level " + aLevel + " of startup " +
+            "(" + self.uid + ") finished");
         // #endif
       }
     }
diff --git a/src/content/lib/old-rules.jsm b/src/content/lib/old-rules.jsm
index 68c556f..ec57fe5 100644
--- a/src/content/lib/old-rules.jsm
+++ b/src/content/lib/old-rules.jsm
@@ -129,7 +129,8 @@ var OldRules = (function() {
         }
       }
 
-      throw new OldRulesParseError(`Invalid old rule: "${originToDest}"`);
+      throw new OldRulesParseError("Invalid old rule: \"" + originToDest +
+          "\"");
     }
 
     return rules;
diff --git a/src/content/lib/script-loader.jsm b/src/content/lib/script-loader.jsm
index 3832bfb..c34eebf 100644
--- a/src/content/lib/script-loader.jsm
+++ b/src/content/lib/script-loader.jsm
@@ -82,12 +82,13 @@ var ScriptLoader = (function() {
         if (importedModuleURIs.hasOwnProperty(uri) &&
             moduleUnloadExceptions.hasOwnProperty(uri) === false) {
           // #ifdef LOG_SCRIPTLOADER
-          console.debug(`[RPC] [ScriptLoader] Cu.unload("${uri}");`);
+          console.debug("[RPC] [ScriptLoader] Cu.unload(\"" + uri + "\");");
           // #endif
           try {
             Cu.unload(uri);
           } catch (e) {
-            console.error(`[RPC] [ScriptLoader] failed to unload "${uri}"`);
+            console.error("[RPC] [ScriptLoader] failed to unload \"" + uri +
+                "\"");
             Cu.reportError(e);
           }
           delete importedModuleURIs[uri];
@@ -120,7 +121,8 @@ var ScriptLoader = (function() {
       }
 
       // #ifdef LOG_SCRIPTLOADER
-      console.debug(`[RPC] [ScriptLoader] importModule("${moduleID}") called.`);
+      console.debug("[RPC] [ScriptLoader] importModule(\"" + moduleID +
+          "\") called.");
       // #endif
 
       let uri = getModuleURI(moduleID);
@@ -131,7 +133,7 @@ var ScriptLoader = (function() {
         }
 
         // #ifdef LOG_SCRIPTLOADER
-        console.debug(`[RPC] [ScriptLoader] Cu.import("${uri}");`);
+        console.debug("[RPC] [ScriptLoader] Cu.import(\"" + uri + "\");");
         // #endif
         Cu.import(uri, scope);
         importedModuleURIs[uri] = true;
@@ -141,10 +143,11 @@ var ScriptLoader = (function() {
         }
       } catch (e) {
         if (e.result === Cr.NS_ERROR_FILE_NOT_FOUND) {
-          logSevereError(`Failed to import module with ID "${moduleID}", ` +
-                         "the file was not found!", e);
+          logSevereError("Failed to import module with ID \"" + moduleID +
+              "\", the file was not found!", e);
         } else {
-          logSevereError(`Failed to import module with ID "${moduleID}".`, e);
+          logSevereError("Failed to import module with ID \"" + moduleID +
+              "\".", e);
         }
       }
       return scope;
@@ -183,7 +186,7 @@ var ScriptLoader = (function() {
 
       // #ifdef LOG_SCRIPTLOADER
       console.debug("[RPC] [ScriptLoader] " +
-          `defineLazyModuleGetter("${moduleID}") called.`);
+          "defineLazyModuleGetter(\"" + moduleID + "\") called.");
       // #endif
       let uri = getModuleURI(moduleID);
       for (let i in names) {
@@ -193,7 +196,8 @@ var ScriptLoader = (function() {
         // #else
         /* jshint -W083 */ // "don't make functions within a loop"
         XPCOMUtils.defineLazyModuleGetter(scope, name, uri, null, function() {
-          console.debug(`[RPC] [ScriptLoader] lazily imported "${name}"`);
+          console.debug("[RPC] [ScriptLoader] lazily imported \"" + name +
+              "\"");
         });
         /* jshint +W083 */
         // #endif
diff --git a/src/content/lib/utils/domains.jsm b/src/content/lib/utils/domains.jsm
index bdf10d2..a0a2a18 100644
--- a/src/content/lib/utils/domains.jsm
+++ b/src/content/lib/utils/domains.jsm
@@ -278,7 +278,7 @@ DomainUtil.parseRefresh = function(refreshString) {
   if (url) {
     var first = url[0];
     var last = url[url.length - 1];
-    if (first === last && (first === "'" || first === `"`)) {
+    if (first === last && (first === "'" || first === "\"")) {
       url = url.substring(1, url.length - 1);
     }
   }
diff --git a/src/content/settings/common.js b/src/content/settings/common.js
index 6c03dec..30e0a78 100644
--- a/src/content/settings/common.js
+++ b/src/content/settings/common.js
@@ -112,7 +112,7 @@ var {common, WinEnv, elManager, $id, $str} = (function() {
       //                  be confused with `*://http:*`. The string `http://*`
       //                  wouldn't be correct for all cases, since there are
       //                  URIs _without_ a host.
-      return `scheme "${ruleDataPart.s}"`;
+      return "scheme \"" + ruleDataPart.s + "\"";
     }
     var str = "";
     if (ruleDataPart.s || ruleDataPart.port) {
@@ -129,7 +129,7 @@ var {common, WinEnv, elManager, $id, $str} = (function() {
 
   common.localize = function(stringNames) {
     stringNames.forEach(function(name) {
-      $(`[data-string="${name}"]`).each(function() {
+      $("[data-string=\"" + name + "\"]").each(function() {
         $(this).text($str(name));
       });
     });
diff --git a/src/content/settings/subscriptions.js b/src/content/settings/subscriptions.js
index 7393416..4213326 100644
--- a/src/content/settings/subscriptions.js
+++ b/src/content/settings/subscriptions.js
@@ -63,7 +63,8 @@
   }
 
   function getInputElement(subName) {
-    var elements = document.body.querySelectorAll(`input[name=${subName}]`);
+    var elements = document.body.querySelectorAll(
+        "input[name=" + subName + "]");
     if (elements.length <= 0) {
       return null;
     }

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



More information about the Pkg-mozext-commits mailing list