Bug 1499153 - Remove obsolete manifest check and NO_JS_MANIFEST r=glandium
authorAndrew McCreight <continuation@gmail.com>
Tue, 16 Oct 2018 22:35:15 +0000
changeset 489942 55bb23a27ec7e39516d9d7f4254b312220f2ea34
parent 489941 6dad1580bc3ea76a5239ef86a78e82745f197f5a
child 489943 c19d5002228fdea6a41a9e3d1f0d32a54fb08af2
push id247
push userfmarier@mozilla.com
push dateSat, 27 Oct 2018 01:06:44 +0000
reviewersglandium
bugs1499153, 1438688
milestone64.0a1
Bug 1499153 - Remove obsolete manifest check and NO_JS_MANIFEST r=glandium Bug 1438688 made it so that XPT information is compiled directly into the binary instead of being shipped separately in interface files. This means that manifests are no longer necessary for JS components, which means the manifest check in emitter.py can be removed. That check is the only use of NO_JS_MANIFEST, so that can in turn be removed entirely. Differential Revision: https://phabricator.services.mozilla.com/D8885
browser/tools/mozscreenshots/mozscreenshots/extension/moz.build
python/mozbuild/mozbuild/backend/recursivemake.py
python/mozbuild/mozbuild/frontend/context.py
python/mozbuild/mozbuild/frontend/emitter.py
testing/specialpowers/moz.build
tools/quitter/moz.build
--- a/browser/tools/mozscreenshots/mozscreenshots/extension/moz.build
+++ b/browser/tools/mozscreenshots/mozscreenshots/extension/moz.build
@@ -2,17 +2,16 @@
 # vim: set filetype=python:
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 XPI_NAME = 'mozscreenshots'
 
 USE_EXTENSION_MANIFEST = True
-NO_JS_MANIFEST = True
 
 FINAL_TARGET_FILES += [
     'api.js',
     'manifest.json',
     'schema.json',
 ]
 
 FINAL_TARGET_FILES.resources += [
--- a/python/mozbuild/mozbuild/backend/recursivemake.py
+++ b/python/mozbuild/mozbuild/backend/recursivemake.py
@@ -108,17 +108,16 @@ MOZBUILD_VARIABLES = [
     b'JAVA_JAR_TARGETS',
     b'LIBRARY_NAME',
     b'LIBS',
     b'MAKE_FRAMEWORK',
     b'MODULE',
     b'NO_DIST_INSTALL',
     b'NO_EXPAND_LIBS',
     b'NO_INTERFACES_MANIFEST',
-    b'NO_JS_MANIFEST',
     b'OS_LIBS',
     b'PARALLEL_DIRS',
     b'PREF_JS_EXPORTS',
     b'PROGRAM',
     b'RESOURCE_FILES',
     b'SHARED_LIBRARY_LIBS',
     b'SHARED_LIBRARY_NAME',
     b'SIMPLE_PROGRAMS',
--- a/python/mozbuild/mozbuild/frontend/context.py
+++ b/python/mozbuild/mozbuild/frontend/context.py
@@ -1923,27 +1923,16 @@ VARIABLES = {
     'USE_EXTENSION_MANIFEST': (bool, bool,
         """Controls the name of the manifest for JAR files.
 
         By default, the name of the manifest is ${JAR_MANIFEST}.manifest.
         Setting this variable to ``True`` changes the name of the manifest to
         chrome.manifest.
         """),
 
-    'NO_JS_MANIFEST': (bool, bool,
-        """Explicitly disclaims responsibility for manifest listing in EXTRA_COMPONENTS.
-
-        Normally, if you have .js files listed in ``EXTRA_COMPONENTS`` or
-        ``EXTRA_PP_COMPONENTS``, you are expected to have a corresponding
-        .manifest file to go with those .js files.  Setting ``NO_JS_MANIFEST``
-        indicates that the relevant .manifest file and entries for those .js
-        files are elsehwere (jar.mn, for instance) and this state of affairs
-        is OK.
-        """),
-
     'GYP_DIRS': (StrictOrderingOnAppendListWithFlagsFactory({
             'variables': dict,
             'input': unicode,
             'sandbox_vars': dict,
             'no_chromium': bool,
             'no_unified': bool,
             'non_unified_sources': StrictOrderingOnAppendList,
             'action_overrides': dict,
--- a/python/mozbuild/mozbuild/frontend/emitter.py
+++ b/python/mozbuild/mozbuild/frontend/emitter.py
@@ -1032,17 +1032,16 @@ class TreeMetadataEmitter(LoggingMixin):
         passthru = VariablePassthru(context)
         varlist = [
             'EXTRA_DSO_LDOPTS',
             'RCFILE',
             'RESFILE',
             'RCINCLUDE',
             'WIN32_EXE_LDFLAGS',
             'USE_EXTENSION_MANIFEST',
-            'NO_JS_MANIFEST',
             'HAS_MISC_RULE',
         ]
         for v in varlist:
             if v in context and context[v]:
                 passthru.variables[v] = context[v]
 
         if context.config.substs.get('OS_TARGET') == 'WINNT' and \
                 context['DELAYLOAD_DLLS']:
@@ -1295,26 +1294,16 @@ class TreeMetadataEmitter(LoggingMixin):
             if has_resources and (context.get('DIST_SUBDIR') or
                                   context.get('XPI_NAME')):
                 raise SandboxValidationError(
                     'RESOURCES_FILES cannot be used with DIST_SUBDIR or '
                     'XPI_NAME.', context)
 
             yield cls(context, all_files)
 
-        # Check for manifest declarations in EXTRA_{PP_,}COMPONENTS.
-        if any(e.endswith('.js') for e in components) and \
-                not any(e.endswith('.manifest') for e in components) and \
-                not context.get('NO_JS_MANIFEST', False):
-            raise SandboxValidationError('A .js component was specified in EXTRA_COMPONENTS '
-                                         'or EXTRA_PP_COMPONENTS without a matching '
-                                         '.manifest file.  See '
-                                         'https://developer.mozilla.org/en/XPCOM/XPCOM_changes_in_Gecko_2.0 .',
-                                         context);
-
         for c in components:
             if c.endswith('.manifest'):
                 yield ChromeManifestEntry(context, 'chrome.manifest',
                                           Manifest('components',
                                                    mozpath.basename(c)))
 
         if self.config.substs.get('MOZ_RUST_TESTS', None):
             rust_tests = context.get('RUST_TESTS', [])
--- a/testing/specialpowers/moz.build
+++ b/testing/specialpowers/moz.build
@@ -2,17 +2,16 @@
 # vim: set filetype=python:
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 XPI_NAME = 'specialpowers'
 
 USE_EXTENSION_MANIFEST = True
-NO_JS_MANIFEST = True
 
 FINAL_TARGET_FILES += [
     'api.js',
     'manifest.json',
     'schema.json',
 ]
 
 FINAL_TARGET_FILES.content += [
--- a/tools/quitter/moz.build
+++ b/tools/quitter/moz.build
@@ -4,15 +4,14 @@
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 XPI_NAME = 'quitter'
 
 JAR_MANIFESTS += ['jar.mn']
 
 USE_EXTENSION_MANIFEST = True
-NO_JS_MANIFEST = True
 
 FINAL_TARGET_FILES += [
     'bootstrap.js',
     'chrome.manifest',
     'install.rdf',
 ]