[Pkg-mozext-commits] [greasemonkey] 29/55: Line length/whitespace.

David Prévot taffit at moszumanska.debian.org
Thu Oct 29 15:38:04 UTC 2015


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

taffit pushed a commit to branch master
in repository greasemonkey.

commit ee047d2227eca68cdb32c22c759af74ad2af018a
Author: Anthony Lieuallen <arantius at gmail.com>
Date:   Thu Sep 24 10:00:31 2015 -0400

    Line length/whitespace.
---
 content/framescript.js   |  5 +++--
 modules/ipcscript.js     | 27 +++++++++++++++------------
 modules/processScript.js |  8 +++++---
 3 files changed, 23 insertions(+), 17 deletions(-)

diff --git a/content/framescript.js b/content/framescript.js
index e55f76e..9bf289d 100644
--- a/content/framescript.js
+++ b/content/framescript.js
@@ -17,8 +17,9 @@ Cu.import('chrome://greasemonkey-modules/content/scriptProtocol.js');
 Cu.import('chrome://greasemonkey-modules/content/documentObserver.js');
 Cu.import('chrome://greasemonkey-modules/content/util.js');
 
-// register with process script. no need to import all the vars into the local scope
-Cu.import('chrome://greasemonkey-modules/content/processScript.js', {}).addFrame(this);
+// Register with process script. Don't import all the vars into the local scope.
+Cu.import('chrome://greasemonkey-modules/content/processScript.js', {}
+    ).addFrame(this);
 
 // \\ // \\ // \\ // \\ // \\ // \\ // \\ // \\ // \\ // \\ // \\ // \\ // \\ //
 
diff --git a/modules/ipcscript.js b/modules/ipcscript.js
index b309d73..f21fead 100644
--- a/modules/ipcscript.js
+++ b/modules/ipcscript.js
@@ -57,16 +57,16 @@ IPCScript.prototype = Object.create(AbstractScript.prototype, {
 
 
 IPCScript.scriptsForUrl = function(url, when, windowId) {
-    return scripts.filter(function(script) {
-      try {
-        return GM_util.scriptMatchesUrlAndRuns(script, url, when);
-      } catch (e) {
-        console.log(e);
-        GM_util.logError(e, false, e.fileName, e.lineNumber);
-        // See #1692; Prevent failures like that from being so severe.
-        return false;
-      }
-   });
+  var result = scripts.filter(function(script) {
+    try {
+      return GM_util.scriptMatchesUrlAndRuns(script, url, when);
+    } catch (e) {
+      // See #1692; Prevent failures like that from being so severe.
+      GM_util.logError(e, false, e.fileName, e.lineNumber);
+      return false;
+    }
+  });
+  return result;
 };
 
 
@@ -108,6 +108,7 @@ var scripts = [];
 const cpmm = Components.classes["@mozilla.org/childprocessmessagemanager;1"]
     .getService(Components.interfaces.nsISyncMessageSender);
 
+
 function objectToScript(obj) {
   var script = Object.create(IPCScript.prototype);
   Object.keys(obj).forEach(function(k) {
@@ -117,6 +118,7 @@ function objectToScript(obj) {
   return script;
 }
 
+
 function updateData(data) {
   if (!data) return;
   var newScripts = data.scripts.map(objectToScript);
@@ -125,6 +127,7 @@ function updateData(data) {
   IPCScript.prototype.globalExcludes = data.globalExcludes;
 }
 
+
 if (cpmm.initialProcessData) {
   updateData(cpmm.initialProcessData["greasemonkey:scripts-update"]);
 } else {
@@ -133,6 +136,6 @@ if (cpmm.initialProcessData) {
   updateData(results[0]);
 }
 
-cpmm.addMessageListener("greasemonkey:scripts-update", function(message) {
-  updateData(message.data);
+cpmm.addMessageListener("greasemonkey:scripts-update", function(aMessage) {
+  updateData(aMessage.data);
 });
diff --git a/modules/processScript.js b/modules/processScript.js
index 4916418..be4ffe9 100644
--- a/modules/processScript.js
+++ b/modules/processScript.js
@@ -1,8 +1,9 @@
 'use strict';
 
-// frame scripts, including all their functions, block scopes etc. are instantiated for each tab
-// having a single per-process script has a lower footprint for stateless things.
-// avoid keeping references to frame scripts or their content, this could leak frames!
+// Frame scripts, including all their functions, block scopes etc. are
+// instantiated for each tab.  Having a single per-process script has a lower
+// footprint for stateless things.  Avoid keeping references to frame scripts
+// or their content, this could leak frames!
 
 const EXPORTED_SYMBOLS = ['addFrame'];
 
@@ -21,6 +22,7 @@ function urlsOfAllFrames(contentWindow) {
   return urls;
 }
 
+
 function urlTree(message) {
   var frameMM = message.target;
   var urls = urlsOfAllFrames(frameMM.content);

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



More information about the Pkg-mozext-commits mailing list