Bug 1428608: Avoid capturing mutable `DIRS` list from moz.build context; r?Build draft
authorTom Prince <mozilla@hocat.ca>
Sat, 06 Jan 2018 22:59:12 -0700
changeset 717047 8c3fb3a9ba4b6d441c99f59738d76144586e00cd
parent 716905 3ce838735f7bca0f7edc9a29a51ba9f21232c734
child 717048 741a6d79b8ac779175803023d61b43ab5bbde05a
push id94541
push userbmo:mozilla@hocat.ca
push dateMon, 08 Jan 2018 03:54:49 +0000
reviewersBuild
bugs1428608
milestone59.0a1
Bug 1428608: Avoid capturing mutable `DIRS` list from moz.build context; r?Build MozReview-Commit-ID: IfvTVHvwvwS
python/mozbuild/mozbuild/frontend/emitter.py
--- a/python/mozbuild/mozbuild/frontend/emitter.py
+++ b/python/mozbuild/mozbuild/frontend/emitter.py
@@ -1590,16 +1590,16 @@ class TreeMetadataEmitter(LoggingMixin):
         if os.path.exists(os.path.join(context.srcdir, 'jar.mn')):
             if 'jar.mn' not in jar_manifests:
                 raise SandboxValidationError('A jar.mn exists but it '
                     'is not referenced in the moz.build file. '
                     'Please define JAR_MANIFESTS.', context)
 
     def _emit_directory_traversal_from_context(self, context):
         o = DirectoryTraversal(context)
-        o.dirs = context.get('DIRS', [])
+        o.dirs += context.get('DIRS', [])
 
         # Some paths have a subconfigure, yet also have a moz.build. Those
         # shouldn't end up in self._external_paths.
         if o.objdir:
             self._external_paths -= { o.relobjdir }
 
         yield o