Bug 797322 - Preprocessed .jsm files don't get //@line info. r=ted
authorMike Hommey <mh+mozilla@glandium.org>
Sat, 06 Oct 2012 10:38:58 +0200
changeset 109517 8576d9edfc18fe26e8a7dc6384d76cb96a9a365e
parent 109516 c0c3b137c10de40b7dac7a6141276ada8ff2a091
child 109518 afbb5b5249e06961cdaf8a8d75872ba8c45c92c7
push id23630
push useremorley@mozilla.com
push dateSat, 06 Oct 2012 19:35:27 +0000
treeherdermozilla-central@9f677c2bb33d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersted
bugs797322
milestone18.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 797322 - Preprocessed .jsm files don't get //@line info. r=ted
config/Preprocessor.py
js/src/config/Preprocessor.py
--- a/config/Preprocessor.py
+++ b/config/Preprocessor.py
@@ -421,17 +421,17 @@ class Preprocessor:
           args = self.applyFilters(args)
         if not os.path.isabs(args):
           args = os.path.join(self.context['DIRECTORY'], args)
         args = open(args, 'rU')
       except Preprocessor.Error:
         raise
       except:
         raise Preprocessor.Error(self, 'FILE_NOT_FOUND', str(args))
-    self.checkLineNumbers = bool(re.search('\.(js|java)(?:\.in)?$', args.name))
+    self.checkLineNumbers = bool(re.search('\.(js|jsm|java)(?:\.in)?$', args.name))
     oldFile = self.context['FILE']
     oldLine = self.context['LINE']
     oldDir = self.context['DIRECTORY']
     if args.isatty():
       # we're stdin, use '-' and '' for file and dir
       self.context['FILE'] = '-'
       self.context['DIRECTORY'] = ''
     else:
--- a/js/src/config/Preprocessor.py
+++ b/js/src/config/Preprocessor.py
@@ -421,17 +421,17 @@ class Preprocessor:
           args = self.applyFilters(args)
         if not os.path.isabs(args):
           args = os.path.join(self.context['DIRECTORY'], args)
         args = open(args, 'rU')
       except Preprocessor.Error:
         raise
       except:
         raise Preprocessor.Error(self, 'FILE_NOT_FOUND', str(args))
-    self.checkLineNumbers = bool(re.search('\.(js|java)(?:\.in)?$', args.name))
+    self.checkLineNumbers = bool(re.search('\.(js|jsm|java)(?:\.in)?$', args.name))
     oldFile = self.context['FILE']
     oldLine = self.context['LINE']
     oldDir = self.context['DIRECTORY']
     if args.isatty():
       # we're stdin, use '-' and '' for file and dir
       self.context['FILE'] = '-'
       self.context['DIRECTORY'] = ''
     else: