[Pkg-mozext-commits] [greasemonkey] 27/45: Restore duplicate resource name check.

David Prévot taffit at moszumanska.debian.org
Mon Nov 3 20:59:21 UTC 2014


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

taffit pushed a commit to branch master
in repository greasemonkey.

commit b3f37259ca9bc25d0e8aea536aa78a9c42ea9db8
Author: Anthony Lieuallen <arantius at gmail.com>
Date:   Thu Oct 2 15:10:12 2014 -0400

    Restore duplicate resource name check.
    
    Refs #1996
---
 modules/parseScript.js | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/modules/parseScript.js b/modules/parseScript.js
index f199d1d..59fe99d 100644
--- a/modules/parseScript.js
+++ b/modules/parseScript.js
@@ -81,6 +81,12 @@ function parse(aSource, aUri, aFailWhenMissing, aNoMetaOk) {
       var name = data.value1;
       var url = data.value2;
 
+      if (name in resourceNames) {
+        script.parseErrors.push(
+            gStringBundle.GetStringFromName('parse.resource-duplicate')
+                .replace('%1', resName));
+        break;
+      }
       resourceNames[name] = true;
 
       try {

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