[Pkg-mozext-commits] [greasemonkey] 08/26: Remove `parse()` parameter `aNoMeta`.

David Prévot taffit at moszumanska.debian.org
Thu Feb 25 02:27:38 UTC 2016


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

taffit pushed a commit to branch master
in repository greasemonkey.

commit 9adfced7a8cae4e56f3437d9b890ab21b7eed138
Author: Anthony Lieuallen <arantius at gmail.com>
Date:   Wed Jan 20 15:10:46 2016 -0500

    Remove `parse()` parameter `aNoMeta`.
    
    Just use `aFailWhenMissing` for the one case where either parameter was ever used.
    
    Fixes #2336
---
 modules/parseScript.js  | 6 +++---
 modules/remoteScript.js | 2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/modules/parseScript.js b/modules/parseScript.js
index 30b7569..f660f0a 100644
--- a/modules/parseScript.js
+++ b/modules/parseScript.js
@@ -16,9 +16,9 @@ var gStringBundle = Components
     .createBundle("chrome://greasemonkey/locale/greasemonkey.properties");
 
 /** Parse the source of a script; produce Script object. */
-function parse(aSource, aUri, aFailWhenMissing, aNoMetaOk) {
+function parse(aSource, aUri, aFailWhenMissing) {
   var meta = extractMeta(aSource).match(/.+/g);
-  if (aFailWhenMissing && !meta && !aNoMetaOk) return null;
+  if (aFailWhenMissing && !meta) return null;
 
   var script = new Script();
 
@@ -32,7 +32,7 @@ function parse(aSource, aUri, aFailWhenMissing, aNoMetaOk) {
   }
   if (aUri) script._namespace = aUri.host;
 
-  if (!meta && aNoMetaOk) {
+  if (!meta) {
     setDefaults(script);
     return script;
   }
diff --git a/modules/remoteScript.js b/modules/remoteScript.js
index d49d6f9..d5d02d0 100644
--- a/modules/remoteScript.js
+++ b/modules/remoteScript.js
@@ -413,7 +413,7 @@ RemoteScript.prototype.parseScript = function(aSource, aFatal) {
 
   var scope = {};
   Components.utils.import('chrome://greasemonkey-modules/content/parseScript.js', scope);
-  var script = scope.parse(aSource, this._uri, true, aFatal);
+  var script = scope.parse(aSource, this._uri, aFatal);
   if (!script || script.parseErrors.length) {
     if (aFatal) {
       this.cleanup(

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