Bug 1428608: Avoid capturing mutable `DIRS` list from moz.build context; r?Build
MozReview-Commit-ID: IfvTVHvwvwS
--- 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