[Pkg-mozext-commits] [tabmixplus] 06/61: Fix lint error 'function closure expressions' is only available in Mozilla JavaScript extensions and move our changeCode function out of the global namespace (changeset 43010a8017e3)

David Prévot taffit at moszumanska.debian.org
Fri Aug 28 19:09:16 UTC 2015


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

taffit pushed a commit to branch master
in repository tabmixplus.

commit 5eab2cd6d9156bb70096432c1ae89ae90e70ed60
Author: onemen <tabmix.onemen at gmail.com>
Date:   Thu Jul 9 10:34:37 2015 +0300

    Fix lint error 'function closure expressions' is only available in Mozilla JavaScript extensions and move our changeCode function out of the global namespace (changeset 43010a8017e3)
---
 chrome/content/changecode.js | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)

diff --git a/chrome/content/changecode.js b/chrome/content/changecode.js
index 306cc68..f396d73 100644
--- a/chrome/content/changecode.js
+++ b/chrome/content/changecode.js
@@ -1,6 +1,3 @@
-var _changeCode;
-// _changeCode is on the first line to help us get the right line number
-
 /* jshint strict: false */
 
 // don't use strict for this file
@@ -80,9 +77,9 @@ Tabmix.changeCode = function(aParent, aName, aOptions) {
         let [obj, fnName] = [aObj || this.obj, aName || this.fnName];
         if (this.isValidToChange(fnName)) {
           if (obj)
-            Tabmix.setNewFunction(obj, fnName, _changeCode(null, this.value));
+            Tabmix.setNewFunction(obj, fnName, Tabmix._makeCode(null, this.value));
           else
-            _changeCode(fnName, this.value);
+            Tabmix._makeCode(fnName, this.value);
         }
         if (aShow)
           this.show(obj, fnName);
@@ -107,7 +104,7 @@ Tabmix.changeCode = function(aParent, aName, aOptions) {
                    this.type == fnType ? this.value : obj[fnType](fnName);
 
         if (typeof code == "string")
-          descriptor[type] = _changeCode(null, code);
+          descriptor[type] = Tabmix._makeCode(null, code);
         else if (typeof code != "undefined")
           descriptor[type] = code;
       }.bind(this);
@@ -173,8 +170,9 @@ Tabmix.nonStrictMode = function(aObj, aFn, aArg) {
 };
 
 (function(obj) {
+  /* jshint moz: true, esnext: false */
   let global = Components.utils.getGlobalForObject(obj);
   let fn = global["ev" + "al"];
-  _changeCode = function(name, code) name ?
+  Tabmix._makeCode = function(name, code) name ?
     fn(name + " = " + code) : fn("(" + code + ")");
 })(this);

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



More information about the Pkg-mozext-commits mailing list