Bug 1203159 - Add resource:// mapping in all DevTools directories. r=glandium,ochameau
authorJ. Ryan Stinnett <jryans@gmail.com>
Tue, 06 Oct 2015 17:42:00 -0500
changeset 289884 5bf7a8f46f7b8c0258f07a8016cd080335693e3e
parent 289883 fc96642eae7f8848414990f4ed1e7e9c0bc4720c
child 289885 3f174efd3a89d9a5ed1127f272d778afa1d1c1c3
push id8654
push userraliiev@mozilla.com
push dateThu, 29 Oct 2015 11:48:40 +0000
treeherdermozilla-aurora@bc4551debe17 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersglandium, ochameau
bugs1203159
milestone44.0a1
Bug 1203159 - Add resource:// mapping in all DevTools directories. r=glandium,ochameau Add resource mapping jar.mn for DevTools. The DevToolsModules template method is modified to install the files in their new flattened add-on location.
devtools/shared/jar.mn
devtools/shared/moz.build
devtools/templates.mozbuild
new file mode 100644
--- /dev/null
+++ b/devtools/shared/jar.mn
@@ -0,0 +1,10 @@
+# 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/.
+
+devtools.jar:
+%   resource devtools %modules/devtools/
+# The typical approach would be to list all the resource files in this manifest
+# for installation.  Instead of doing this, use the DevToolsModules syntax via
+# moz.build files to do the installation so that we can enforce correct paths
+# based on source tree location.
--- a/devtools/shared/moz.build
+++ b/devtools/shared/moz.build
@@ -27,16 +27,18 @@ DIRS += [
     'webconsole',
     'worker',
 ]
 
 BROWSER_CHROME_MANIFESTS += ['tests/browser/browser.ini']
 MOCHITEST_CHROME_MANIFESTS += ['tests/mochitest/chrome.ini']
 XPCSHELL_TESTS_MANIFESTS += ['tests/unit/xpcshell.ini']
 
+JAR_MANIFESTS += ['jar.mn']
+
 DevToolsModules(
     'async-storage.js',
     'async-utils.js',
     'content-observer.js',
     'css-color.js',
     'deprecated-sync-thenables.js',
     'DevToolsUtils.js',
     'event-emitter.js',
--- a/devtools/templates.mozbuild
+++ b/devtools/templates.mozbuild
@@ -20,12 +20,16 @@ def DevToolsModules(*modules):
     build a list manually above.  Bug 1198013 tracks fixing this to make it more
     like other moz.build constructs.'''
 
     for m in modules:
         if '/' in m:
             error('DevToolsModules must be used from the same directory as ' +
                   'the files to be installed.')
 
-    base = EXTRA_JS_MODULES
+    # jar.mn manifest files are typically used to install files to chrome
+    # locations.  Instead of doing this, use this DevToolsModules syntax via
+    # moz.build files to do the installation so that we can enforce correct
+    # paths based on source tree location.
+    base = FINAL_TARGET_FILES.chrome.devtools.modules
     for dir in RELATIVEDIR.split('/'):
         base = base[dir]
     base += [m for m in modules]