Browse Source

sync build fixes with wip

Frank-Rainer Grahl 1 month ago
parent
commit
0e2fd6a1dc
100 changed files with 5902 additions and 490 deletions
  1. 2 2
      mozilla-release/patches/1021926-67a1.patch
  2. 4 4
      mozilla-release/patches/1367092-1-67a1.patch
  3. 3 2
      mozilla-release/patches/1367092-5-67a1.patch
  4. 26 30
      mozilla-release/patches/1375861-64a1.patch
  5. 282 0
      mozilla-release/patches/1428705-1-73a1.patch
  6. 134 0
      mozilla-release/patches/1428705-2-73a1.patch
  7. 166 0
      mozilla-release/patches/1428705-3-73a1.patch
  8. 91 0
      mozilla-release/patches/1428705-4-73a1.patch
  9. 2 2
      mozilla-release/patches/1428706-1-67a1.patch
  10. 48 0
      mozilla-release/patches/1428707-1-65a1.patch
  11. 25 0
      mozilla-release/patches/1428707-2-65a1.patch
  12. 2 2
      mozilla-release/patches/1428713-67a1.patch
  13. 2 2
      mozilla-release/patches/1428714-67a1.patch
  14. 75 0
      mozilla-release/patches/1428716-1-71a1.patch
  15. 17 0
      mozilla-release/patches/1428716-2-71a1.patch
  16. 266 0
      mozilla-release/patches/1436037-2no1-65a1.patch
  17. 58 0
      mozilla-release/patches/1436263-5-60a1.patch
  18. 44 0
      mozilla-release/patches/1440421-1only-PARTIAL-62a1.patch
  19. 59 0
      mozilla-release/patches/1441765-1-60a1.patch
  20. 22 26
      mozilla-release/patches/1460856-2-63a1.patch
  21. 311 0
      mozilla-release/patches/1460914-5-65a1.patch
  22. 3 2
      mozilla-release/patches/1468273-1-63a1.patch
  23. 3 2
      mozilla-release/patches/1468273-5-63a1.patch
  24. 3 2
      mozilla-release/patches/1468273-6-63a1.patch
  25. 0 0
      mozilla-release/patches/1469027-3-64a1.patch
  26. 247 0
      mozilla-release/patches/1470266-6-64a1.patch
  27. 2 2
      mozilla-release/patches/1471648-67a1.patch
  28. 71 0
      mozilla-release/patches/1471916-68a1.patch
  29. 2 2
      mozilla-release/patches/1471920-2-67a1.patch
  30. 3 2
      mozilla-release/patches/1473308-63a1.patch
  31. 262 0
      mozilla-release/patches/1490948-4-64a1.patch
  32. 18 11
      mozilla-release/patches/1491419-1-64a1.patch
  33. 12 5
      mozilla-release/patches/1491419-2-64a1.patch
  34. 13 6
      mozilla-release/patches/1491419-3-64a1.patch
  35. 13 6
      mozilla-release/patches/1491419-8-64a1.patch
  36. 15 8
      mozilla-release/patches/1491419-9-64a1.patch
  37. 58 0
      mozilla-release/patches/1492716-1-65a1.patch
  38. 556 0
      mozilla-release/patches/1492716-2-65a1.patch
  39. 99 0
      mozilla-release/patches/1492716-2_1-65a1.patch
  40. 500 0
      mozilla-release/patches/1495669-64a1.patch
  41. 292 0
      mozilla-release/patches/1496791-64a1.patch
  42. 30 0
      mozilla-release/patches/1496828-64a1.patch
  43. 268 0
      mozilla-release/patches/1498636-67a1.patch
  44. 30 0
      mozilla-release/patches/1502358-65a1.patch
  45. 2 2
      mozilla-release/patches/1508927-65a1.patch
  46. 4 4
      mozilla-release/patches/1513009-2-66a1.patch
  47. 0 0
      mozilla-release/patches/1513134-1-66a1.patch
  48. 78 0
      mozilla-release/patches/1513134-2-66a1.patch
  49. 27 22
      mozilla-release/patches/1513134-3-66a1.patch
  50. 9 9
      mozilla-release/patches/1514089-66a1.patch
  51. 5 5
      mozilla-release/patches/1514448-66a1.patch
  52. 27 30
      mozilla-release/patches/1515579-2only-66a1.patch
  53. 3 2
      mozilla-release/patches/1515746-2-67a1.patch
  54. 3 3
      mozilla-release/patches/1515746-3-67a1.patch
  55. 28 31
      mozilla-release/patches/1519040-66a1.patch
  56. 2 2
      mozilla-release/patches/1519307-66a1.patch
  57. 5 5
      mozilla-release/patches/1519308-66a1.patch
  58. 4 5
      mozilla-release/patches/1519325-66a1.patch
  59. 31 0
      mozilla-release/patches/1520458-3only-88a1.patch
  60. 190 0
      mozilla-release/patches/1524467-2-67a1.patch
  61. 12 8
      mozilla-release/patches/1526062-5-67a1.patch
  62. 186 0
      mozilla-release/patches/1529000-67a1.patch
  63. 3 3
      mozilla-release/patches/1541329-68a1.patch
  64. 20 3
      mozilla-release/patches/1542963-1-69a1.patch
  65. 6 6
      mozilla-release/patches/1547730-20-69a1.patch
  66. 3 3
      mozilla-release/patches/1547931-68a1.patch
  67. 49 53
      mozilla-release/patches/1549794-68a1.patch
  68. 4 4
      mozilla-release/patches/1554056-69a1.patch
  69. 8 8
      mozilla-release/patches/1557213-1only-69a1.patch
  70. 11 11
      mozilla-release/patches/1557583-2-69a1.patch
  71. 35 0
      mozilla-release/patches/1558667-78a1.patch
  72. 3 3
      mozilla-release/patches/1563797-2-70a1.patch
  73. 5 5
      mozilla-release/patches/1567642-8-71a1.patch
  74. 54 0
      mozilla-release/patches/1579545-71a1.patch
  75. 2 2
      mozilla-release/patches/1580280-1-71a1.patch
  76. 2 2
      mozilla-release/patches/1580280-2-71a1.patch
  77. 4 4
      mozilla-release/patches/1580280-9-71a1.patch
  78. 3 3
      mozilla-release/patches/1585702-2-71a1.patch
  79. 2 2
      mozilla-release/patches/1591195-72a1.patch
  80. 8 8
      mozilla-release/patches/1594914-81a1.patch
  81. 30 0
      mozilla-release/patches/1598823-84a1.patch
  82. 2 2
      mozilla-release/patches/1601140-2-76a1.patch
  83. 5 4
      mozilla-release/patches/1604079-73a1.patch
  84. 11 11
      mozilla-release/patches/1604360-4-73a1.patch
  85. 12 12
      mozilla-release/patches/1604360-5-73a1.patch
  86. 2 2
      mozilla-release/patches/1604360-6-73a1.patch
  87. 10 10
      mozilla-release/patches/1604360-7-73a1.patch
  88. 3 3
      mozilla-release/patches/1604360-8-73a1.patch
  89. 10 10
      mozilla-release/patches/1604616-75a1.patch
  90. 4 4
      mozilla-release/patches/1606475-80a1.patch
  91. 14 9
      mozilla-release/patches/1606703-77a1.patch
  92. 4 43
      mozilla-release/patches/1616989-75a1.patch
  93. 35 0
      mozilla-release/patches/1621718-76a1.patch
  94. 3 3
      mozilla-release/patches/1621960-5-79a1.patch
  95. 338 0
      mozilla-release/patches/1623024-1-79a1.patch
  96. 21 0
      mozilla-release/patches/1623024-4-79a1.patch
  97. 410 0
      mozilla-release/patches/1623593-76a1.patch
  98. 4 4
      mozilla-release/patches/1627072-77a1.patch
  99. 5 5
      mozilla-release/patches/1627255-1-77a1.patch
  100. 2 2
      mozilla-release/patches/1627255-2-77a1.patch

+ 2 - 2
mozilla-release/patches/1021926-67a1.patch

@@ -2,7 +2,7 @@
 # User Nikki S <nikkisharpley@gmail.com>
 # Date 1552386072 0
 # Node ID f6705b8320496d0e67213299773e0c429f2b63ef
-# Parent  dfae25df1e698be1808cc2b0033d9cf18f26eca0
+# Parent  b7ea80a5fc062ff2add92483d7f7962c5747388e
 mozlog: move the capture io class from web-platform/tests to mozlog (bug 1021926) r=jgraham
 
 The ability to capture the parent process' stdio is suggested to be a useful feature
@@ -118,7 +118,7 @@ diff --git a/testing/mozbase/mozlog/tests/manifest.ini b/testing/mozbase/mozlog/
 +++ b/testing/mozbase/mozlog/tests/manifest.ini
 @@ -1,6 +1,7 @@
  [DEFAULT]
- subsuite = mozbase, os == "linux"
+ subsuite = mozbase
  [test_logger.py]
  [test_logtypes.py]
  [test_formatters.py]

+ 4 - 4
mozilla-release/patches/1367092-1-67a1.patch

@@ -3,7 +3,7 @@
 # Date 1550846275 0
 #      Fri Feb 22 14:37:55 2019 +0000
 # Node ID ef9a57429d594ef1f75d070784764fc1b70d8595
-# Parent  c0df5cc5df6ba2bc78f5fd1911bca1f1abd49f25
+# Parent  4598fd73a136e822bbc615025a212248828e6b17
 Bug 1367092 - [flake8] Use per-file-ignores to skip __init__.py files under testing/marionette and testing/firefox-ui, r=ato
 
 This allows us to only skip the "unused import" config in these files rather
@@ -15,14 +15,14 @@ Differential Revision: https://phabricator.services.mozilla.com/D20493
 diff --git a/.flake8 b/.flake8
 --- a/.flake8
 +++ b/.flake8
-@@ -11,18 +11,16 @@ exclude =
-     gfx/angle/,
+@@ -12,18 +12,16 @@ exclude =
      gfx/harfbuzz,
      glx/skia/,
      intl/icu/,
      ipc/chromium/,
      js/*.configure,
      memory/moz.configure,
+     node_modules,
      security/nss/,
 -    testing/firefox-ui/**/__init__.py,
 -    testing/marionette/**/__init__.py,
@@ -34,7 +34,7 @@ diff --git a/.flake8 b/.flake8
      tools/crashreporter/*.configure,
  
  # See:
-@@ -33,9 +31,11 @@ ignore =
+@@ -34,9 +32,11 @@ ignore =
      F632, F633, F811, E117, W504, W605, W606,
      # These are intentionally disabled (not necessarily for good reason).
      #   F723: syntax error in type comment

+ 3 - 2
mozilla-release/patches/1367092-5-67a1.patch

@@ -3,7 +3,7 @@
 # Date 1550870750 0
 #      Fri Feb 22 21:25:50 2019 +0000
 # Node ID 4624c850f711417ae3cc95f3e69ce4cb6c07f70b
-# Parent  8f24f1f26d987b2af921b0d9c49bee4547f89544
+# Parent  8570d2477288f471ad57b2f79e25998c574fffe0
 Bug 1367092 - [flake8] Use a blacklist instead of a whitelist, r=egao
 
 This ensures that the default for new python files is to be linted by flake8.
@@ -15,7 +15,7 @@ Differential Revision: https://phabricator.services.mozilla.com/D20497
 diff --git a/.flake8 b/.flake8
 --- a/.flake8
 +++ b/.flake8
-@@ -1,32 +1,84 @@
+@@ -1,33 +1,85 @@
  [flake8]
  # See http://pep8.readthedocs.io/en/latest/intro.html#configuration
  ignore = E121, E123, E126, E129, E133, E226, E241, E242, E704, W503, E402, E741
@@ -85,6 +85,7 @@ diff --git a/.flake8 b/.flake8
      ipc/chromium/,
      js/*.configure,
      memory/moz.configure,
+     node_modules,
      security/nss/,
      testing/marionette/harness/marionette_harness/runner/mixins,
      testing/marionette/harness/marionette_harness/tests,

+ 26 - 30
mozilla-release/patches/1375861-64a1.patch

@@ -2,7 +2,7 @@
 # User Andrew Halberstadt <ahalberstadt@mozilla.com>
 # Date 1539876479 0
 # Node ID 1635530c393a0f80512a3cf695fe968eb53562f2
-# Parent  d9d0ada65031dd3ac22c6a54e3d6965c8c1bbe4c
+# Parent  a9f828938a04994c08336f247ef52b4ab2a24059
 Bug 1375861 - [mozlint] Globally exclude paths listed in tools/rewriting/ThirdPartyPaths.txt from our linters, r=sylvestre
 
 Differential Revision: https://phabricator.services.mozilla.com/D9126
@@ -65,34 +65,30 @@ diff --git a/tools/lint/codespell.yml b/tools/lint/codespell.yml
      extensions:
          - js
          - jsm
-diff --git a/tools/lint/cpp-virtual-final.yml.1375861.later b/tools/lint/cpp-virtual-final.yml.1375861.later
-new file mode 100644
---- /dev/null
-+++ b/tools/lint/cpp-virtual-final.yml.1375861.later
-@@ -0,0 +1,23 @@
-+--- cpp-virtual-final.yml
-++++ cpp-virtual-final.yml
-+@@ -2,20 +2,16 @@
-+ cpp-virtual-final:
-+     description: "Virtual function declarations should specify only one of
-+                   `virtual`, `final`, or `override`"
-+     level: error
-+     include: ['.']
-+     exclude:
-+         # Third-party code with cpp-virtual-final warnings:
-+         - '**/node_modules'
-+-        - gfx/angle
-+-        - gfx/skia
-+-        - media/webrtc/trunk
-+-        - security/sandbox/chromium
-+     extensions: ['cpp', 'h', 'mm']
-+     type: regex
-+     #
-+     # This lint warns about:
-+     #
-+     #   virtual void Bad1() final
-+     #   void Bad2() final override
-+     #   void Bad3() override final
+diff --git a/tools/lint/cpp-virtual-final.yml b/tools/lint/cpp-virtual-final.yml
+--- a/tools/lint/cpp-virtual-final.yml
++++ b/tools/lint/cpp-virtual-final.yml
+@@ -2,20 +2,16 @@
+ cpp-virtual-final:
+     description: "Virtual function declarations should specify only one of
+                   `virtual`, `final`, or `override`"
+     level: error
+     include: ['.']
+     exclude:
+         # Third-party code with cpp-virtual-final warnings:
+         - '**/node_modules'
+-        - gfx/angle
+-        - gfx/skia
+-        - media/webrtc/trunk
+-        - security/sandbox/chromium
+     extensions: ['cpp', 'h', 'mm']
+     type: regex
+     #
+     # This lint warns about:
+     #
+     #   virtual void Bad1() final
+     #   void Bad2() final override
+     #   void Bad3() override final
 diff --git a/tools/lint/mach_commands.py b/tools/lint/mach_commands.py
 --- a/tools/lint/mach_commands.py
 +++ b/tools/lint/mach_commands.py
@@ -188,7 +184,7 @@ diff --git a/tools/lint/mingw-capitalization.yml b/tools/lint/mingw-capitalizati
 diff --git a/tools/lint/py2.yml b/tools/lint/py2.yml
 --- a/tools/lint/py2.yml
 +++ b/tools/lint/py2.yml
-@@ -39,17 +39,16 @@ py2:
+@@ -38,17 +38,16 @@ py2:
          - testing/mochitest
          - testing/mozharness
          - testing/remotecppunittests.py

+ 282 - 0
mozilla-release/patches/1428705-1-73a1.patch

@@ -0,0 +1,282 @@
+# HG changeset patch
+# User Edwin Takahashi <egao@mozilla.com>
+# Date 1575671158 0
+# Node ID f85d054c6a1b350a24441959bf3d39c19b4a01b7
+# Parent  1981c2c6f2ab9f8e55f0bf23f4d0054435c2bdbf
+Bug 1428705 - [manifestparser] Add support for Python 3. r=egao
+
+Differential Revision: https://phabricator.services.mozilla.com/D54113
+
+diff --git a/testing/mozbase/manifestparser/manifestparser/expression.py b/testing/mozbase/manifestparser/manifestparser/expression.py
+--- a/testing/mozbase/manifestparser/manifestparser/expression.py
++++ b/testing/mozbase/manifestparser/manifestparser/expression.py
+@@ -3,17 +3,17 @@
+ # You can obtain one at http://mozilla.org/MPL/2.0/.
+ 
+ from __future__ import absolute_import, print_function
+ 
+ import re
+ import sys
+ import traceback
+ 
+-from six import reraise
++import six
+ 
+ __all__ = ['parse', 'ParseError', 'ExpressionParser']
+ 
+ # expr.py
+ # from:
+ # http://k0s.org/mozilla/hg/expressionparser
+ # http://hg.mozilla.org/users/tmielczarek_mozilla.com/expressionparser
+ 
+@@ -275,47 +275,47 @@ class ExpressionParser(object):
+ 
+     def advance(self, expected):
+         """
+         Assert that the next token is an instance of |expected|, and advance
+         to the next token.
+         """
+         if not isinstance(self.token, expected):
+             raise Exception("Unexpected token!")
+-        self.token = self.iter.next()
++        self.token = six.next(self.iter)
+ 
+     def expression(self, rbp=0):
+         """
+         Parse and return the value of an expression until a token with
+         right binding power greater than rbp is encountered.
+         """
+         t = self.token
+-        self.token = self.iter.next()
++        self.token = six.next(self.iter)
+         left = t.nud(self)
+         while rbp < self.token.lbp:
+             t = self.token
+-            self.token = self.iter.next()
++            self.token = six.next(self.iter)
+             left = t.led(self, left)
+         return left
+ 
+     def parse(self):
+         """
+         Parse and return the value of the expression in the text
+         passed to the constructor. Raises a ParseError if the expression
+         could not be parsed.
+         """
+         try:
+             self.iter = self._tokenize()
+-            self.token = self.iter.next()
++            self.token = six.next(self.iter)
+             return self.expression()
+         except Exception:
+             extype, ex, tb = sys.exc_info()
+             formatted = ''.join(traceback.format_exception_only(extype, ex))
+-            reraise(ParseError("could not parse: %s\nexception: %svariables: %s" %
+-                    (self.text, formatted, self.valuemapping)), None, tb)
++            six.reraise(ParseError, ParseError("could not parse: %s\nexception: %svariables: %s" %
++                        (self.text, formatted, self.valuemapping)), tb)
+ 
+     __call__ = parse
+ 
+ 
+ def parse(text, **values):
+     """
+     Parse and evaluate a boolean expression.
+     :param text: The expression to parse, as a string.
+diff --git a/testing/mozbase/manifestparser/manifestparser/filters.py b/testing/mozbase/manifestparser/manifestparser/filters.py
+--- a/testing/mozbase/manifestparser/manifestparser/filters.py
++++ b/testing/mozbase/manifestparser/manifestparser/filters.py
+@@ -10,16 +10,17 @@ possible to define custom filters if the
+ 
+ from __future__ import absolute_import
+ 
+ import itertools
+ import os
+ from abc import ABCMeta, abstractmethod
+ from collections import defaultdict, MutableSequence
+ 
++import six
+ from six import string_types
+ 
+ from .expression import (
+     parse,
+     ParseError,
+ )
+ 
+ 
+@@ -89,20 +90,22 @@ class InstanceFilter(object):
+     Generally only one instance of a class filter should be applied at a time.
+     Two instances of `InstanceFilter` are considered equal if they have the
+     same class name. This ensures only a single instance is ever added to
+     `filterlist`. This class also formats filters' __str__ method for easier
+     debugging.
+     """
+     unique = True
+ 
++    __hash__ = super.__hash__
++
+     def __init__(self, *args, **kwargs):
+         self.fmt_args = ', '.join(itertools.chain(
+             [str(a) for a in args],
+-            ['{}={}'.format(k, v) for k, v in kwargs.iteritems()]))
++            ['{}={}'.format(k, v) for k, v in six.iteritems(kwargs)]))
+ 
+     def __eq__(self, other):
+         if self.unique:
+             return self.__class__ == other.__class__
+         return self.__hash__() == other.__hash__()
+ 
+     def __str__(self):
+         return "{}({})".format(self.__class__.__name__, self.fmt_args)
+@@ -249,17 +252,17 @@ class chunk_by_dir(InstanceFilter):
+         for i in range(start, end):
+             for test in tests_by_dir.pop(ordered_dirs[i]):
+                 yield test
+ 
+         # find directories that only contain disabled tests. They still need to
+         # be yielded for reporting purposes. Put them all in chunk 1 for
+         # simplicity.
+         if self.this_chunk == 1:
+-            disabled_dirs = [v for k, v in tests_by_dir.iteritems()
++            disabled_dirs = [v for k, v in six.iteritems(tests_by_dir)
+                              if k not in ordered_dirs]
+             for disabled_test in itertools.chain(*disabled_dirs):
+                 yield disabled_test
+ 
+ 
+ class ManifestChunk(InstanceFilter):
+     """
+     Base class for chunking tests by manifest using a numerical key.
+diff --git a/testing/mozbase/manifestparser/manifestparser/manifestparser.py b/testing/mozbase/manifestparser/manifestparser/manifestparser.py
+--- a/testing/mozbase/manifestparser/manifestparser/manifestparser.py
++++ b/testing/mozbase/manifestparser/manifestparser/manifestparser.py
+@@ -322,26 +322,26 @@ class ManifestParser(object):
+             tags = set()
+ 
+         # make some check functions
+         if inverse:
+             def has_tags(test):
+                 return not tags.intersection(test.keys())
+ 
+             def dict_query(test):
+-                for key, value in kwargs.items():
++                for key, value in list(kwargs.items()):
+                     if test.get(key) == value:
+                         return False
+                 return True
+         else:
+             def has_tags(test):
+                 return tags.issubset(test.keys())
+ 
+             def dict_query(test):
+-                for key, value in kwargs.items():
++                for key, value in list(kwargs.items()):
+                     if test.get(key) != value:
+                         return False
+                 return True
+ 
+         # query the tests
+         tests = self.query(has_tags, dict_query, tests=tests)
+ 
+         # if a key is given, return only a list of that key
+@@ -355,17 +355,17 @@ class ManifestParser(object):
+     def manifests(self, tests=None):
+         """
+         return manifests in order in which they appear in the tests
+         If |tests| is not set, the order of the manifests is unspecified.
+         """
+         if tests is None:
+             manifests = []
+             # Make sure to return all the manifests, even ones without tests.
+-            for manifest in self.manifest_defaults.keys():
++            for manifest in list(self.manifest_defaults.keys()):
+                 if isinstance(manifest, tuple):
+                     parentmanifest, manifest = manifest
+                 if manifest not in manifests:
+                     manifests.append(manifest)
+             return manifests
+ 
+         manifests = []
+         for test in tests:
+@@ -472,17 +472,17 @@ class ManifestParser(object):
+         # get matching tests
+         tests = self.get(tags=tags, **kwargs)
+ 
+         # print the .ini manifest
+         if global_tags or global_kwargs:
+             print('[DEFAULT]', file=fp)
+             for tag in global_tags:
+                 print('%s =' % tag, file=fp)
+-            for key, value in global_kwargs.items():
++            for key, value in list(global_kwargs.items()):
+                 print('%s = %s' % (key, value), file=fp)
+             print(file=fp)
+ 
+         for test in tests:
+             test = test.copy()  # don't overwrite
+ 
+             path = test['name']
+             if not os.path.isabs(path):
+diff --git a/testing/mozbase/manifestparser/tests/manifest.ini b/testing/mozbase/manifestparser/tests/manifest.ini
+--- a/testing/mozbase/manifestparser/tests/manifest.ini
++++ b/testing/mozbase/manifestparser/tests/manifest.ini
+@@ -1,13 +1,14 @@
+ [DEFAULT]
+ subsuite = mozbase
+-skip-if = python == 3
+ [test_expressionparser.py]
+ [test_manifestparser.py]
+ [test_testmanifest.py]
+ [test_read_ini.py]
+ [test_convert_directory.py]
++skip-if = python == 3
+ [test_filters.py]
+ [test_chunking.py]
++skip-if = python == 3
+ 
+ [test_convert_symlinks.py]
+ disabled = https://bugzilla.mozilla.org/show_bug.cgi?id=920938
+diff --git a/testing/mozbase/manifestparser/tests/test_manifestparser.py b/testing/mozbase/manifestparser/tests/test_manifestparser.py
+--- a/testing/mozbase/manifestparser/tests/test_manifestparser.py
++++ b/testing/mozbase/manifestparser/tests/test_manifestparser.py
+@@ -5,17 +5,17 @@
+ # You can obtain one at http://mozilla.org/MPL/2.0/.
+ 
+ from __future__ import absolute_import
+ 
+ import os
+ import shutil
+ import tempfile
+ import unittest
+-from StringIO import StringIO
++from six import StringIO
+ 
+ import mozunit
+ 
+ from manifestparser import ManifestParser
+ 
+ here = os.path.dirname(os.path.abspath(__file__))
+ 
+ 
+diff --git a/testing/mozbase/manifestparser/tests/test_read_ini.py b/testing/mozbase/manifestparser/tests/test_read_ini.py
+--- a/testing/mozbase/manifestparser/tests/test_read_ini.py
++++ b/testing/mozbase/manifestparser/tests/test_read_ini.py
+@@ -9,17 +9,17 @@ is the default:
+ 
+ http://docs.python.org/2/library/configparser.html
+ """
+ 
+ from __future__ import absolute_import
+ 
+ import unittest
+ from manifestparser import read_ini
+-from StringIO import StringIO
++from six import StringIO
+ 
+ import mozunit
+ 
+ 
+ class IniParserTest(unittest.TestCase):
+ 
+     def parse_manifest(self, string):
+         buf = StringIO()

+ 134 - 0
mozilla-release/patches/1428705-2-73a1.patch

@@ -0,0 +1,134 @@
+# HG changeset patch
+# User Edwin Takahashi <egao@mozilla.com>
+# Date 1576293045 0
+# Node ID 9ffd4ecbfc2b3b9255e66588111a0af2140d0559
+# Parent  0c13995b0aef5c8ea8409961f5bb5f3857a1576e
+Bug 1428705 - fix manifestparser/manifestparser for python3 and enable test_convert_directory.py r=ahal
+
+Changes:
+
+Import the appropriate version of `StringIO` instead of `BytesIO` depending on the version of python, and use it in `manifestparser.py`.
+
+This is required for `test_convert_directory.py` to pass on both python versions. Changes to the test was not required.
+
+Differential Revision: https://phabricator.services.mozilla.com/D56865
+
+diff --git a/testing/mozbase/manifestparser/manifestparser/manifestparser.py b/testing/mozbase/manifestparser/manifestparser/manifestparser.py
+--- a/testing/mozbase/manifestparser/manifestparser/manifestparser.py
++++ b/testing/mozbase/manifestparser/manifestparser/manifestparser.py
+@@ -1,23 +1,22 @@
+ # 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/.
+ 
+ from __future__ import absolute_import, print_function
+ 
+-from io import BytesIO
+ import json
+ import fnmatch
+ import os
+ import shutil
+ import sys
+ import types
+ 
+-from six import string_types
++from six import string_types, StringIO
+ 
+ from .ini import read_ini
+ from .filters import (
+     DEFAULT_FILTERS,
+     enabled,
+     exists as _exists,
+     filterlist,
+ )
+@@ -504,17 +503,17 @@ class ManifestParser(object):
+                 print('%s = %s' % (key, test[key]), file=fp)
+             print(file=fp)
+ 
+         if close:
+             # close the created file
+             fp.close()
+ 
+     def __str__(self):
+-        fp = BytesIO()
++        fp = StringIO()
+         self.write(fp=fp)
+         value = fp.getvalue()
+         return value
+ 
+     def copy(self, directory, rootdir=None, *tags, **kwargs):
+         """
+         copy the manifests and associated tests
+         - directory : directory to copy to
+@@ -713,47 +712,49 @@ class ManifestParser(object):
+     @classmethod
+     def from_directories(cls, directories, pattern=None, ignore=(), write=None, relative_to=None):
+         """
+         convert directories to a simple manifest; returns ManifestParser instance
+ 
+         pattern -- shell pattern (glob) or patterns of filenames to match
+         ignore -- directory names to ignore
+         write -- filename or file-like object of manifests to write;
+-                 if `None` then a BytesIO instance will be created
++                 if `None` then a StringIO instance will be created
+         relative_to -- write paths relative to this path;
+                        if false then the paths are absolute
+         """
+ 
+         # determine output
+         opened_manifest_file = None  # name of opened manifest file
+         absolute = not relative_to  # whether to output absolute path names as names
+         if isinstance(write, string_types):
+             opened_manifest_file = write
+             write = open(write, 'w')
+         if write is None:
+-            write = BytesIO()
++            write = StringIO()
+ 
+         # walk the directories, generating manifests
+         def callback(directory, dirpath, dirnames, filenames):
+ 
+             # absolute paths
+             filenames = [os.path.join(dirpath, filename)
+                          for filename in filenames]
+             # ensure new manifest isn't added
+             filenames = [filename for filename in filenames
+                          if filename != opened_manifest_file]
+             # normalize paths
+             if not absolute and relative_to:
+                 filenames = [relpath(filename, relative_to)
+                              for filename in filenames]
+ 
+             # write to manifest
+-            print('\n'.join(['[%s]' % denormalize_path(filename)
+-                             for filename in filenames]), file=write)
++            write_content = '\n'.join([
++                '[{}]'.format(denormalize_path(filename)) for filename in filenames
++            ])
++            print(write_content, file=write)
+ 
+         cls._walk_directories(directories, callback, pattern=pattern, ignore=ignore)
+ 
+         if opened_manifest_file:
+             # close file
+             write.close()
+             manifests = [opened_manifest_file]
+         else:
+diff --git a/testing/mozbase/manifestparser/tests/manifest.ini b/testing/mozbase/manifestparser/tests/manifest.ini
+--- a/testing/mozbase/manifestparser/tests/manifest.ini
++++ b/testing/mozbase/manifestparser/tests/manifest.ini
+@@ -1,14 +1,13 @@
+ [DEFAULT]
+ subsuite = mozbase
+ [test_expressionparser.py]
+ [test_manifestparser.py]
+ [test_testmanifest.py]
+ [test_read_ini.py]
+ [test_convert_directory.py]
+-skip-if = python == 3
+ [test_filters.py]
+ [test_chunking.py]
+ skip-if = python == 3
+ 
+ [test_convert_symlinks.py]
+ disabled = https://bugzilla.mozilla.org/show_bug.cgi?id=920938

+ 166 - 0
mozilla-release/patches/1428705-3-73a1.patch

@@ -0,0 +1,166 @@
+# HG changeset patch
+# User Edwin Takahashi <egao@mozilla.com>
+# Date 1576707535 0
+# Node ID bb6c737e982ac81cc3a3cc6dd60ba0ea4ba46bce
+# Parent  4c52190dc98aa5ce2bdc9816ed02f1bcbc5dca41
+Bug 1428705 - fix manifestparser/test_chunking.py for python3 r=ahal,whimboo
+
+Changes:
+
+Fix syntax in the test file to work under python3.
+
+Assorted changes to the code style, and eliminating unnecessary warnings.
+
+Differential Revision: https://phabricator.services.mozilla.com/D56803
+
+diff --git a/testing/mozbase/manifestparser/tests/manifest.ini b/testing/mozbase/manifestparser/tests/manifest.ini
+--- a/testing/mozbase/manifestparser/tests/manifest.ini
++++ b/testing/mozbase/manifestparser/tests/manifest.ini
+@@ -2,12 +2,11 @@
+ subsuite = mozbase
+ [test_expressionparser.py]
+ [test_manifestparser.py]
+ [test_testmanifest.py]
+ [test_read_ini.py]
+ [test_convert_directory.py]
+ [test_filters.py]
+ [test_chunking.py]
+-skip-if = python == 3
+ 
+ [test_convert_symlinks.py]
+ disabled = https://bugzilla.mozilla.org/show_bug.cgi?id=920938
+diff --git a/testing/mozbase/manifestparser/tests/test_chunking.py b/testing/mozbase/manifestparser/tests/test_chunking.py
+--- a/testing/mozbase/manifestparser/tests/test_chunking.py
++++ b/testing/mozbase/manifestparser/tests/test_chunking.py
+@@ -2,19 +2,20 @@
+ 
+ from __future__ import absolute_import
+ 
+ from itertools import chain
+ from unittest import TestCase
+ import os
+ import random
+ 
++from six.moves import range
++from six import iteritems
++
+ import mozunit
+-from six.moves import range
+-
+ from manifestparser.filters import (
+     chunk_by_dir,
+     chunk_by_runtime,
+     chunk_by_slice,
+ )
+ 
+ here = os.path.dirname(os.path.abspath(__file__))
+ 
+@@ -85,18 +86,18 @@ class ChunkByDir(TestCase):
+     """Test chunking related filters"""
+ 
+     def generate_tests(self, dirs):
+         """
+         :param dirs: dict of the form,
+                         { <dir>: <num tests> }
+         """
+         i = 0
+-        for d, num in dirs.iteritems():
+-            for j in range(num):
++        for d, num in iteritems(dirs):
++            for _ in range(num):
+                 i += 1
+                 name = 'test%i' % i
+                 test = {'name': name,
+                         'relpath': os.path.join(d, name)}
+                 yield test
+ 
+     def run_all_combos(self, dirs):
+         tests = list(self.generate_tests(dirs))
+@@ -113,17 +114,17 @@ class ChunkByDir(TestCase):
+                 return len(unique)
+ 
+             for total in range(1, num_groups(tests) + 1):
+                 res = []
+                 for this in range(1, total + 1):
+                     f = chunk_by_dir(this, total, depth)
+                     res.append(list(f(tests, {})))
+ 
+-                lengths = map(num_groups, res)
++                lengths = list(map(num_groups, res))
+                 # the chunk with the most dirs should have at most one more
+                 # dir than the chunk with the least dirs
+                 self.assertLessEqual(max(lengths) - min(lengths), 1)
+ 
+                 all_chunks = list(chain.from_iterable(res))
+                 # chunk_by_dir will mess up order, but chained chunks should
+                 # contain all of the original tests and be the same length
+                 self.assertEqual(len(all_chunks), len(tests))
+@@ -176,18 +177,18 @@ class ChunkByRuntime(TestCase):
+     """Test chunking related filters"""
+ 
+     def generate_tests(self, dirs):
+         """
+         :param dirs: dict of the form,
+                      { <dir>: <num tests> }
+         """
+         i = 0
+-        for d, num in dirs.iteritems():
+-            for j in range(num):
++        for d, num in iteritems(dirs):
++            for _ in range(num):
+                 i += 1
+                 name = 'test%i' % i
+                 test = {'name': name,
+                         'relpath': os.path.join(d, name),
+                         'manifest': os.path.join(d, 'manifest.ini')}
+                 yield test
+ 
+     def get_runtimes(self, tests):
+@@ -199,17 +200,17 @@ class ChunkByRuntime(TestCase):
+     def chunk_by_round_robin(self, tests, runtimes):
+         manifests = set(t['manifest'] for t in tests)
+         tests_by_manifest = []
+         for manifest in manifests:
+             mtests = [t for t in tests if t['manifest'] == manifest]
+             total = sum(runtimes[t['relpath']] for t in mtests
+                         if 'disabled' not in t)
+             tests_by_manifest.append((total, mtests))
+-        tests_by_manifest.sort()
++        tests_by_manifest.sort(key=lambda x: x[0], reverse=False)
+ 
+         chunks = [[] for i in range(total)]
+         d = 1  # direction
+         i = 0
+         for runtime, batch in tests_by_manifest:
+             chunks[i].extend(batch)
+ 
+             # "draft" style (last pick goes first in the next round)
+diff --git a/testing/mozbase/manifestparser/tests/test_chunking.py.1428705.later b/testing/mozbase/manifestparser/tests/test_chunking.py.1428705.later
+new file mode 100644
+--- /dev/null
++++ b/testing/mozbase/manifestparser/tests/test_chunking.py.1428705.later
+@@ -0,0 +1,24 @@
++--- test_chunking.py
+++++ test_chunking.py
++@@ -198,20 +199,20 @@ class ChunkByRuntime(TestCase):
++     def get_runtimes(self, tests):
++         runtimes = defaultdict(int)
++         for test in tests:
++             runtimes[test['manifest_relpath']] += random.randint(0, 100)
++         return runtimes
++ 
++     def chunk_by_round_robin(self, tests, total, runtimes):
++         tests_by_manifest = []
++-        for manifest, runtime in runtimes.items():
+++        for manifest, runtime in iteritems(runtimes):
++             mtests = [t for t in tests if t['manifest_relpath'] == manifest]
++             tests_by_manifest.append((runtime, mtests))
++         tests_by_manifest.sort(key=lambda x: x[0], reverse=False)
++ 
++         chunks = [[] for i in range(total)]
++         d = 1  # direction
++         i = 0
++         for runtime, batch in tests_by_manifest:
++             chunks[i].extend(batch)
++ 
++             # "draft" style (last pick goes first in the next round)

+ 91 - 0
mozilla-release/patches/1428705-4-73a1.patch

@@ -0,0 +1,91 @@
+# HG changeset patch
+# User Edwin Takahashi <egao@mozilla.com>
+# Date 1577366933 0
+# Node ID 55e7b7f75e47c3a79d5f9d57acecb2d1216141a6
+# Parent  59cfdeeada81cef1e745f6beb917507ee31fbef4
+Bug 1428705 - use assertEqual in test_manifest.py and add formal python3 compatibility in setup.py for manifestparser r=Callek
+
+Changes:
+
+Change assert from `assertEquals` to `assertEqual` since the former has been technically deprecated as of 2.7.
+Add python3 compatibility in `setup.py`.
+
+This should be the last item to bring full python3 compatibility to manifestparser.
+
+Differential Revision: https://phabricator.services.mozilla.com/D58208
+
+diff --git a/testing/mozbase/manifestparser/setup.py b/testing/mozbase/manifestparser/setup.py
+--- a/testing/mozbase/manifestparser/setup.py
++++ b/testing/mozbase/manifestparser/setup.py
+@@ -9,17 +9,19 @@ from setuptools import setup
+ PACKAGE_NAME = "manifestparser"
+ PACKAGE_VERSION = '1.2'
+ 
+ setup(name=PACKAGE_NAME,
+       version=PACKAGE_VERSION,
+       description="Library to create and manage test manifests",
+       long_description="see https://firefox-source-docs.mozilla.org/mozbase/index.html",
+       classifiers=['Programming Language :: Python :: 2.7',
+-                   'Programming Language :: Python :: 2 :: Only'],
++                   'Programming Language :: Python :: 3',
++                   'Programming Language :: Python :: 3.5',
++                   ],
+                   # Get strings from http://pypi.python.org/pypi?%3Aaction=list_classifiers
+       keywords='mozilla manifests',
+       author='Mozilla Automation and Testing Team',
+       author_email='tools@lists.mozilla.org',
+       url='https://wiki.mozilla.org/Auto-tools/Projects/Mozbase',
+       license='MPL',
+       zip_safe=False,
+       packages=['manifestparser'],
+diff --git a/testing/mozbase/manifestparser/tests/test_testmanifest.py b/testing/mozbase/manifestparser/tests/test_testmanifest.py
+--- a/testing/mozbase/manifestparser/tests/test_testmanifest.py
++++ b/testing/mozbase/manifestparser/tests/test_testmanifest.py
+@@ -70,42 +70,42 @@ class TestTestManifest(unittest.TestCase
+         test subsuites and conditional subsuites
+         """
+         relative_path = os.path.join(here, 'subsuite.ini')
+         manifest = TestManifest(manifests=(relative_path,))
+         info = {'foo': 'bar'}
+ 
+         # 6 tests total
+         tests = manifest.active_tests(exists=False, **info)
+-        self.assertEquals(len(tests), 6)
++        self.assertEqual(len(tests), 6)
+ 
+         # only 3 tests for subsuite bar when foo==bar
+         tests = manifest.active_tests(exists=False,
+                                       filters=[subsuite('bar')],
+                                       **info)
+-        self.assertEquals(len(tests), 3)
++        self.assertEqual(len(tests), 3)
+ 
+         # only 1 test for subsuite baz, regardless of conditions
+         other = {'something': 'else'}
+         tests = manifest.active_tests(exists=False,
+                                       filters=[subsuite('baz')],
+                                       **info)
+-        self.assertEquals(len(tests), 1)
++        self.assertEqual(len(tests), 1)
+         tests = manifest.active_tests(exists=False,
+                                       filters=[subsuite('baz')],
+                                       **other)
+-        self.assertEquals(len(tests), 1)
++        self.assertEqual(len(tests), 1)
+ 
+         # 4 tests match when the condition doesn't match (all tests except
+         # the unconditional subsuite)
+         info = {'foo': 'blah'}
+         tests = manifest.active_tests(exists=False,
+                                       filters=[subsuite()],
+                                       **info)
+-        self.assertEquals(len(tests), 5)
++        self.assertEqual(len(tests), 5)
+ 
+         # test for illegal subsuite value
+         manifest.tests[0]['subsuite'] = 'subsuite=bar,foo=="bar",type="nothing"'
+         with self.assertRaises(ParseError):
+             manifest.active_tests(exists=False,
+                                   filters=[subsuite('foo')],
+                                   **info)
+ 

+ 2 - 2
mozilla-release/patches/1428706-1-67a1.patch

@@ -2,7 +2,7 @@
 # User A. Wilcox <AWilcox@Wilcox-Tech.com>
 # Date 1549892245 0
 # Node ID 184745d744bfb4e4ffd18852cb88bcc34d15e408
-# Parent  279fce05bfb27476ce1b50de7584f931c0cee0db
+# Parent  08aecfb8cac913070f5d0d5b9f2ae823032ccc4e
 Bug 1428706 - [mozcrash] Add support for Python 3; r=ted
 
 Differential Revision: https://phabricator.services.mozilla.com/D19132
@@ -76,7 +76,7 @@ diff --git a/testing/mozbase/mozcrash/tests/manifest.ini b/testing/mozbase/mozcr
 +++ b/testing/mozbase/mozcrash/tests/manifest.ini
 @@ -1,9 +1,7 @@
  [DEFAULT]
- subsuite = mozbase, os == "linux"
+ subsuite = mozbase
 -skip-if = python == 3
 -
  [test_basic.py]

+ 48 - 0
mozilla-release/patches/1428707-1-65a1.patch

@@ -0,0 +1,48 @@
+# HG changeset patch
+# User Arshad Kazmi <arshadkazmi42@gmail.com>
+# Date 1540379098 0
+# Node ID aa2736811468cbfb5e3963aba841c2fe5463fb31
+# Parent  74d478d34081cbd51c8a57e5a52df74f2bcb1898
+Bug 1428707 - Validated python3 support, updated package version r=davehunt
+
+Differential Revision: https://phabricator.services.mozilla.com/D9565
+
+diff --git a/testing/mozbase/mozdebug/mozdebug/setup.cfg b/testing/mozbase/mozdebug/mozdebug/setup.cfg
+new file mode 100644
+--- /dev/null
++++ b/testing/mozbase/mozdebug/mozdebug/setup.cfg
+@@ -0,0 +1,2 @@
++[bdist_wheel]
++universal=1
+\ No newline at end of file
+diff --git a/testing/mozbase/mozdebug/setup.py b/testing/mozbase/mozdebug/setup.py
+--- a/testing/mozbase/mozdebug/setup.py
++++ b/testing/mozbase/mozdebug/setup.py
+@@ -1,17 +1,17 @@
+ # 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/.
+ 
+ from __future__ import absolute_import
+ 
+ from setuptools import setup
+ 
+-PACKAGE_VERSION = '0.1'
++PACKAGE_VERSION = '0.1.1'
+ 
+ setup(name='mozdebug',
+       version=PACKAGE_VERSION,
+       description="Utilities for running applications under native code debuggers "
+       "intended for use in Mozilla testing",
+       long_description="see https://firefox-source-docs.mozilla.org/mozbase/index.html",
+       classifiers=['Programming Language :: Python :: 2.7',
+                    'Programming Language :: Python :: 2 :: Only'],
+diff --git a/testing/mozbase/mozdebug/tests/manifest.ini b/testing/mozbase/mozdebug/tests/manifest.ini
+--- a/testing/mozbase/mozdebug/tests/manifest.ini
++++ b/testing/mozbase/mozdebug/tests/manifest.ini
+@@ -1,4 +1,3 @@
+ [DEFAULT]
+ subsuite = mozbase, os == "linux"
+-skip-if = python == 3
+ [test.py]
+

+ 25 - 0
mozilla-release/patches/1428707-2-65a1.patch

@@ -0,0 +1,25 @@
+# HG changeset patch
+# User Arshad Kazmi <arshadkazmi42@gmail.com>
+# Date 1541181417 0
+# Node ID 6e0d21ef7ec6531dc834df9a02265ac8da22d4bf
+# Parent  0f64a4699ae8ffbd3b8fac4816d602a0611811df
+Bug 1428707 - Move testing/mozbase/mozdebug/mozdebug/setup.cfg to testing/mozbase/mozdebug/setup.cfg r=davehunt
+
+Differential Revision: https://phabricator.services.mozilla.com/D9987
+
+diff --git a/testing/mozbase/mozdebug/mozdebug/setup.cfg b/testing/mozbase/mozdebug/mozdebug/setup.cfg
+deleted file mode 100644
+--- a/testing/mozbase/mozdebug/mozdebug/setup.cfg
++++ /dev/null
+@@ -1,2 +0,0 @@
+-[bdist_wheel]
+-universal=1
+\ No newline at end of file
+diff --git a/testing/mozbase/mozdebug/setup.cfg b/testing/mozbase/mozdebug/setup.cfg
+new file mode 100644
+--- /dev/null
++++ b/testing/mozbase/mozdebug/setup.cfg
+@@ -0,0 +1,2 @@
++[bdist_wheel]
++universal=1
+

+ 2 - 2
mozilla-release/patches/1428713-67a1.patch

@@ -2,7 +2,7 @@
 # User AndreiH <ahutusoru@mozilla.com>
 # Date 1549444424 0
 # Node ID 46ccb19887128bb67b48f1474a05803c09e61025
-# Parent  3a8a96a8e1e0fed8871cd5cae4c325bf2248f4ef
+# Parent  f40e7edeb06410c839f5434b663a0022de7b9ecb
 Bug 1428713 [mozprocess] Add support for Python 3 r=ahal
 
 Differential Revision: https://phabricator.services.mozilla.com/D18048
@@ -758,7 +758,7 @@ diff --git a/testing/mozbase/mozprocess/tests/manifest.ini b/testing/mozbase/moz
 +++ b/testing/mozbase/mozprocess/tests/manifest.ini
 @@ -1,10 +1,11 @@
  [DEFAULT]
- subsuite = mozbase, os == "linux"
+ subsuite = mozbase
 -skip-if = python == 3
 +# Python bug https://bugs.python.org/issue32745
 +skip-if = python == 3 && os == "win"  # Bug 1428713 for more info

+ 2 - 2
mozilla-release/patches/1428714-67a1.patch

@@ -2,7 +2,7 @@
 # User AndreiH <ahutusoru@mozilla.com>
 # Date 1550830577 0
 # Node ID faa0d674fe5f86219b9c2e0ee53a990adbdd9ff2
-# Parent  fc29c25e8a154c927e8199d279cce316b5993e6f
+# Parent  72b09bbb9ac759b545420bbd28426f146dc0a306
 Bug 1428714 - [mozrunner] Add support for Python 3 r=davehunt
 
 Differential Revision: https://phabricator.services.mozilla.com/D20486
@@ -166,7 +166,7 @@ diff --git a/testing/mozbase/mozrunner/tests/manifest.ini b/testing/mozbase/mozr
 +++ b/testing/mozbase/mozrunner/tests/manifest.ini
 @@ -1,10 +1,9 @@
  [DEFAULT]
- subsuite = mozbase, os == "linux"
+ subsuite = mozbase
 -skip-if = python == 3
  [test_crash.py]
  [test_interactive.py]

+ 75 - 0
mozilla-release/patches/1428716-1-71a1.patch

@@ -0,0 +1,75 @@
+# HG changeset patch
+# User championshuttler <shivams2799@gmail.com>
+# Date 1569613605 0
+# Node ID 2ac45586caa93605f5f62297aeb0c48417144570
+# Parent  419f2e2803ff4f478fb97b365cef23739ea99065
+Bug 1428716 - Bump mozsystemmonitor to v1.0.0 and add classifiers. r=ahal
+
+Differential Revision: https://phabricator.services.mozilla.com/D47203
+
+diff --git a/testing/mozbase/mozsystemmonitor/setup.py b/testing/mozbase/mozsystemmonitor/setup.py
+--- a/testing/mozbase/mozsystemmonitor/setup.py
++++ b/testing/mozbase/mozsystemmonitor/setup.py
+@@ -3,28 +3,31 @@
+ # file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ 
+ from __future__ import absolute_import
+ 
+ import os
+ 
+ from setuptools import setup
+ 
+-PACKAGE_VERSION = '0.4'
++PACKAGE_VERSION = '1.0.0'
+ 
+ try:
+     pwd = os.path.dirname(os.path.abspath(__file__))
+     description = open(os.path.join(pwd, 'README.rst')).read()
+ except Exception:
+     description = ''
+ 
+ setup(
+     name='mozsystemmonitor',
+     description='Monitor system resource usage.',
+     long_description="see https://firefox-source-docs.mozilla.org/mozbase/index.html",
++    classifiers=['Programming Language :: Python :: 2.7',
++                 'Programming Language :: Python :: 3.5'],
++    # Get strings from http://pypi.python.org/pypi?%3Aaction=list_classifiers
+     license='MPL 2.0',
+     keywords='mozilla',
+     author='Mozilla Automation and Tools Team',
+     author_email='tools@lists.mozilla.org',
+     url='https://wiki.mozilla.org/Auto-tools/Projects/Mozbase',
+     packages=['mozsystemmonitor'],
+     version=PACKAGE_VERSION,
+     install_requires=['psutil >= 3.1.1'],
+diff --git a/testing/mozbase/mozsystemmonitor/tests/manifest.ini b/testing/mozbase/mozsystemmonitor/tests/manifest.ini
+--- a/testing/mozbase/mozsystemmonitor/tests/manifest.ini
++++ b/testing/mozbase/mozsystemmonitor/tests/manifest.ini
+@@ -1,4 +1,3 @@
+ [DEFAULT]
+ subsuite = mozbase
+-skip-if = python == 3
+ [test_resource_monitor.py]
+diff --git a/testing/mozbase/mozsystemmonitor/tests/test_resource_monitor.py b/testing/mozbase/mozsystemmonitor/tests/test_resource_monitor.py
+--- a/testing/mozbase/mozsystemmonitor/tests/test_resource_monitor.py
++++ b/testing/mozbase/mozsystemmonitor/tests/test_resource_monitor.py
+@@ -55,17 +55,17 @@ class TestResourceMonitor(unittest.TestC
+             time.sleep(1)
+ 
+             with monitor.phase('phase2'):
+                 time.sleep(1)
+ 
+         monitor.stop()
+ 
+         self.assertEqual(len(monitor.phases), 2)
+-        self.assertEqual(['phase2', 'phase1'], monitor.phases.keys())
++        self.assertEqual(['phase2', 'phase1'], list(monitor.phases.keys()))
+ 
+         all = list(monitor.range_usage())
+         data1 = list(monitor.phase_usage('phase1'))
+         data2 = list(monitor.phase_usage('phase2'))
+ 
+         self.assertGreater(len(all), len(data1))
+         self.assertGreater(len(data1), len(data2))
+ 

+ 17 - 0
mozilla-release/patches/1428716-2-71a1.patch

@@ -0,0 +1,17 @@
+# HG changeset patch
+# User championshuttler <shivams2799@gmail.com>
+# Date 1569612652 0
+# Node ID 5e548ced2bc430c2e96091df21b8c1c5f6e1c41e
+# Parent  2ac45586caa93605f5f62297aeb0c48417144570
+Bug 1428716 - Create setup.cfg for universal wheels in mozsystemmonitor. r=ahal
+
+Differential Revision: https://phabricator.services.mozilla.com/D47204
+
+diff --git a/testing/mozbase/mozsystemmonitor/setup.cfg b/testing/mozbase/mozsystemmonitor/setup.cfg
+new file mode 100644
+--- /dev/null
++++ b/testing/mozbase/mozsystemmonitor/setup.cfg
+@@ -0,0 +1,2 @@
++[bdist_wheel]
++universal=1
+

+ 266 - 0
mozilla-release/patches/1436037-2no1-65a1.patch

@@ -0,0 +1,266 @@
+# HG changeset patch
+# User Andrew Halberstadt <ahalberstadt@mozilla.com>
+# Date 1544037616 0
+# Node ID c88d2cb951ca8b2622ed90f921194902bd4bb712
+# Parent  7045562c466e8be924c0e4d335a709f3e0e5cca0
+Bug 1436037 - [python] Create Windows python-test tasks, r=gps
+
+The following python-test paths are being moved out of 'make check' and into their own task:
+- python/mozlint
+- testing/mozbase
+- tools/lint
+
+The following python-test paths previously did not run on Windows:
+- python/mozterm
+- testing/marionette
+- testing/raptor
+- tools/tryselect
+
+Differential Revision: https://phabricator.services.mozilla.com/D10759
+
+diff --git a/python/mozlint/test/python.ini b/python/mozlint/test/python.ini
+--- a/python/mozlint/test/python.ini
++++ b/python/mozlint/test/python.ini
+@@ -1,10 +1,10 @@
+ [DEFAULT]
+-subsuite = mozlint, os == "linux"
++subsuite = mozlint
+ skip-if = python == 3
+ 
+ [test_cli.py]
+ [test_editor.py]
+ [test_formatters.py]
+ [test_parser.py]
+ [test_pathutils.py]
+ [test_result.py]
+diff --git a/testing/marionette/harness/marionette_harness/tests/harness_unit/test_marionette_runner.py b/testing/marionette/harness/marionette_harness/tests/harness_unit/test_marionette_runner.py
+--- a/testing/marionette/harness/marionette_harness/tests/harness_unit/test_marionette_runner.py
++++ b/testing/marionette/harness/marionette_harness/tests/harness_unit/test_marionette_runner.py
+@@ -1,14 +1,16 @@
+ # 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/.
+ 
+ from __future__ import absolute_import
+ 
++import os
++
+ import manifestparser
+ import mozunit
+ import pytest
+ 
+ from mock import Mock, patch, mock_open, sentinel, DEFAULT
+ 
+ from marionette_harness.runtests import MarionetteTestRunner
+ 
+@@ -291,17 +293,17 @@ def test_add_test_directory(runner):
+     tests = list(dir_contents[0][2] + dir_contents[1][2])
+     assert len(runner.tests) == 0
+     # Need to use side effect to make isdir return True for test_dir and False for tests
+     with patch('os.path.isdir', side_effect=[True] + [False for t in tests]) as isdir:
+         with patch('os.walk', return_value=dir_contents) as walk:
+             runner.add_test(test_dir)
+     assert isdir.called and walk.called
+     for test in runner.tests:
+-        assert test_dir in test['filepath']
++        assert os.path.normpath(test_dir) in test['filepath']
+     assert len(runner.tests) == 2
+ 
+ 
+ @pytest.mark.parametrize("test_files_exist", [True, False])
+ def test_add_test_manifest(mock_runner, manifest_with_tests, monkeypatch, test_files_exist):
+     monkeypatch.setattr('marionette_harness.runner.base.TestManifest',
+                         manifest_with_tests.manifest_class)
+     mock_runner.marionette = mock_runner.driverclass()
+diff --git a/testing/mozbase/manifestparser/tests/manifest.ini b/testing/mozbase/manifestparser/tests/manifest.ini
+--- a/testing/mozbase/manifestparser/tests/manifest.ini
++++ b/testing/mozbase/manifestparser/tests/manifest.ini
+@@ -1,10 +1,10 @@
+ [DEFAULT]
+-subsuite = mozbase, os == "linux"
++subsuite = mozbase
+ skip-if = python == 3
+ [test_expressionparser.py]
+ [test_manifestparser.py]
+ [test_testmanifest.py]
+ [test_read_ini.py]
+ [test_convert_directory.py]
+ [test_filters.py]
+ [test_chunking.py]
+diff --git a/testing/mozbase/mozcrash/tests/manifest.ini b/testing/mozbase/mozcrash/tests/manifest.ini
+--- a/testing/mozbase/mozcrash/tests/manifest.ini
++++ b/testing/mozbase/mozcrash/tests/manifest.ini
+@@ -1,9 +1,9 @@
+ [DEFAULT]
+-subsuite = mozbase, os == "linux"
++subsuite = mozbase
+ skip-if = python == 3
+ 
+ [test_basic.py]
+ [test_java_exception.py]
+ [test_save_path.py]
+ [test_stackwalk.py]
+ [test_symbols_path.py]
+diff --git a/testing/mozbase/mozdebug/tests/manifest.ini b/testing/mozbase/mozdebug/tests/manifest.ini
+--- a/testing/mozbase/mozdebug/tests/manifest.ini
++++ b/testing/mozbase/mozdebug/tests/manifest.ini
+@@ -1,3 +1,3 @@
+ [DEFAULT]
+-subsuite = mozbase, os == "linux"
++subsuite = mozbase
+ [test.py]
+diff --git a/testing/mozbase/mozfile/tests/manifest.ini b/testing/mozbase/mozfile/tests/manifest.ini
+--- a/testing/mozbase/mozfile/tests/manifest.ini
++++ b/testing/mozbase/mozfile/tests/manifest.ini
+@@ -1,9 +1,9 @@
+ [DEFAULT]
+-subsuite = mozbase, os == "linux"
++subsuite = mozbase
+ [test_extract.py]
+ [test_load.py]
+ [test_move_remove.py]
+ [test_tempdir.py]
+ [test_tempfile.py]
+ [test_tree.py]
+ [test_url.py]
+diff --git a/testing/mozbase/mozhttpd/tests/manifest.ini b/testing/mozbase/mozhttpd/tests/manifest.ini
+--- a/testing/mozbase/mozhttpd/tests/manifest.ini
++++ b/testing/mozbase/mozhttpd/tests/manifest.ini
+@@ -1,10 +1,10 @@
+ [DEFAULT]
+-subsuite = mozbase, os == "linux"
++subsuite = mozbase
+ [api.py]
+ skip-if = python == 3
+ [baseurl.py]
+ [basic.py]
+ [filelisting.py]
+ skip-if = python == 3
+ [paths.py]
+ [requestlog.py]
+diff --git a/testing/mozbase/mozinfo/tests/manifest.ini b/testing/mozbase/mozinfo/tests/manifest.ini
+--- a/testing/mozbase/mozinfo/tests/manifest.ini
++++ b/testing/mozbase/mozinfo/tests/manifest.ini
+@@ -1,3 +1,3 @@
+ [DEFAULT]
+-subsuite = mozbase, os == "linux"
++subsuite = mozbase
+ [test.py]
+diff --git a/testing/mozbase/mozinstall/tests/manifest.ini b/testing/mozbase/mozinstall/tests/manifest.ini
+--- a/testing/mozbase/mozinstall/tests/manifest.ini
++++ b/testing/mozbase/mozinstall/tests/manifest.ini
+@@ -1,4 +1,4 @@
+ [DEFAULT]
+-subsuite = mozbase, os == "linux"
++subsuite = mozbase
+ skip-if = python == 3
+ [test.py]
+diff --git a/testing/mozbase/mozlog/tests/manifest.ini b/testing/mozbase/mozlog/tests/manifest.ini
+--- a/testing/mozbase/mozlog/tests/manifest.ini
++++ b/testing/mozbase/mozlog/tests/manifest.ini
+@@ -1,9 +1,9 @@
+ [DEFAULT]
+-subsuite = mozbase, os == "linux"
++subsuite = mozbase
+ [test_logger.py]
+ skip-if = python == 3
+ [test_logtypes.py]
+ [test_formatters.py]
+ skip-if = python == 3
+ [test_structured.py]
+ skip-if = python == 3
+diff --git a/testing/mozbase/moznetwork/tests/manifest.ini b/testing/mozbase/moznetwork/tests/manifest.ini
+--- a/testing/mozbase/moznetwork/tests/manifest.ini
++++ b/testing/mozbase/moznetwork/tests/manifest.ini
+@@ -1,4 +1,4 @@
+ [DEFAULT]
+-subsuite = mozbase, os == "linux"
++subsuite = mozbase
+ skip-if = python == 3
+ [test.py]
+diff --git a/testing/mozbase/mozprocess/tests/manifest.ini b/testing/mozbase/mozprocess/tests/manifest.ini
+--- a/testing/mozbase/mozprocess/tests/manifest.ini
++++ b/testing/mozbase/mozprocess/tests/manifest.ini
+@@ -1,10 +1,10 @@
+ [DEFAULT]
+-subsuite = mozbase, os == "linux"
++subsuite = mozbase
+ skip-if = python == 3
+ [test_kill.py]
+ [test_misc.py]
+ [test_poll.py]
+ [test_wait.py]
+ [test_output.py]
+ [test_params.py]
+ [test_process_reader.py]
+diff --git a/testing/mozbase/mozprofile/tests/manifest.ini b/testing/mozbase/mozprofile/tests/manifest.ini
+--- a/testing/mozbase/mozprofile/tests/manifest.ini
++++ b/testing/mozbase/mozprofile/tests/manifest.ini
+@@ -1,10 +1,10 @@
+ [DEFAULT]
+-subsuite = mozbase, os == "linux"
++subsuite = mozbase
+ [test_addonid.py]
+ [test_server_locations.py]
+ [test_preferences.py]
+ [test_permissions.py]
+ [test_bug758250.py]
+ [test_nonce.py]
+ [test_clone_cleanup.py]
+ [test_profile.py]
+diff --git a/testing/mozbase/mozrunner/tests/manifest.ini b/testing/mozbase/mozrunner/tests/manifest.ini
+--- a/testing/mozbase/mozrunner/tests/manifest.ini
++++ b/testing/mozbase/mozrunner/tests/manifest.ini
+@@ -1,10 +1,10 @@
+ [DEFAULT]
+-subsuite = mozbase, os == "linux"
++subsuite = mozbase
+ skip-if = python == 3
+ [test_crash.py]
+ [test_interactive.py]
+ [test_start.py]
+ [test_states.py]
+ [test_stop.py]
+ [test_threads.py]
+ [test_wait.py]
+diff --git a/testing/mozbase/mozsystemmonitor/tests/manifest.ini b/testing/mozbase/mozsystemmonitor/tests/manifest.ini
+--- a/testing/mozbase/mozsystemmonitor/tests/manifest.ini
++++ b/testing/mozbase/mozsystemmonitor/tests/manifest.ini
+@@ -1,3 +1,3 @@
+ [DEFAULT]
+-subsuite = mozbase, os == "linux"
++subsuite = mozbase
+ [test_resource_monitor.py]
+diff --git a/testing/mozbase/moztest/tests/manifest.ini b/testing/mozbase/moztest/tests/manifest.ini
+--- a/testing/mozbase/moztest/tests/manifest.ini
++++ b/testing/mozbase/moztest/tests/manifest.ini
+@@ -1,5 +1,5 @@
+ [DEFAULT]
+-subsuite = mozbase, os == "linux"
++subsuite = mozbase
+ skip-if = python == 3
+ [test.py]
+ [test_resolve.py]
+diff --git a/testing/mozbase/mozversion/tests/manifest.ini b/testing/mozbase/mozversion/tests/manifest.ini
+--- a/testing/mozbase/mozversion/tests/manifest.ini
++++ b/testing/mozbase/mozversion/tests/manifest.ini
+@@ -1,6 +1,6 @@
+ [DEFAULT]
+-subsuite = mozbase, os == "linux"
++subsuite = mozbase
+ 
+ [test_binary.py]
+ [test_apk.py]
+ skip-if = python == 3
+diff --git a/tools/lint/test/python.ini b/tools/lint/test/python.ini
+--- a/tools/lint/test/python.ini
++++ b/tools/lint/test/python.ini
+@@ -1,7 +1,7 @@
+ [DEFAULT]
+-subsuite=mozlint, os == "linux"
++subsuite = mozlint
+ skip-if = python == 3
+ 
+ [test_eslint.py]
+ skip-if = os == "win"  # node not installed on worker
+ [test_flake8.py]

+ 58 - 0
mozilla-release/patches/1436263-5-60a1.patch

@@ -0,0 +1,58 @@
+# HG changeset patch
+# User Chris Peterson <cpeterson@mozilla.com>
+# Date 1518684602 28800
+# Node ID 0a00e515def32e3a4b194967e6080abfc629d315
+# Parent  8f706e7a3934ab8b58b98a04361ef9503c828987
+Bug 1436263 - Part 5: Add a mach lint for virtual function declarations with multiple specifiers. r=froydnj r=ahal
+
+Virtual function declarations should specify only one of `virtual`, `final`, or `override`, as per the Mozilla C++ style guide:
+
+https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Coding_Style
+
+This lint warns about:
+
+  virtual void Bad1() final
+  void Bad2() final override
+  void Bad3() override final
+
+Caveats: This lint doesn't warn about `virtual void NotBad() override` at this time because there are 8000+ instances. It also doesn't warn about function declarations that span multiple lines because the regex can't match across line breaks.
+
+MozReview-Commit-ID: LcBsOAKKgz7
+
+diff --git a/tools/lint/cpp-virtual-final.yml b/tools/lint/cpp-virtual-final.yml
+new file mode 100644
+--- /dev/null
++++ b/tools/lint/cpp-virtual-final.yml
+@@ -0,0 +1,31 @@
++---
++cpp-virtual-final:
++    description: "Virtual function declarations should specify only one of
++                  `virtual`, `final`, or `override`"
++    level: warning
++    include: ['.']
++    exclude:
++        # Third-party code with cpp-virtual-final warnings:
++        - gfx/angle
++        - gfx/skia
++        - media/webrtc/trunk
++        - security/sandbox/chromium
++    extensions: ['cpp', 'h', 'mm']
++    type: regex
++    #
++    # This lint warns about:
++    #
++    #   virtual void Bad1() final
++    #   void Bad2() final override
++    #   void Bad3() override final
++    #
++    # Caveats: This lint ...
++    #
++    #   * Doesn't warn about `virtual void NotBad() override` at this time
++    #     because there are 8000+ instances.
++    #
++    #   * Doesn't warn about function declarations that span multiple lines
++    #     because the regex can't match across line breaks.
++    #
++    #           virtual    )    final  |  final  override  |  override  final
++    payload: ^ *virtual .+\).+\bfinal\b|\bfinal +override\b|\boverride +final\b
+

+ 44 - 0
mozilla-release/patches/1440421-1only-PARTIAL-62a1.patch

@@ -0,0 +1,44 @@
+# HG changeset patch
+# User Ed Lee <edilee@mozilla.com>
+# Date 1528306363 25200
+# Node ID 09a74b229025e9cd883bf6e6b4dd1ed7998e7050
+# Parent  8b74ade33a23f697956e6f5ea6cf83957bd0aeda
+Bug 1440421 part 1. Ignore activity-stream and node_modules for linting. r=ahal
+
+MozReview-Commit-ID: EEua2y790cW
+
+diff --git a/.flake8 b/.flake8
+--- a/.flake8
++++ b/.flake8
+@@ -1,9 +1,10 @@
+ [flake8]
+ # See http://pep8.readthedocs.io/en/latest/intro.html#configuration
+ ignore = E121, E123, E126, E129, E133, E226, E241, E242, E704, W503, E402, E741
+ max-line-length = 99
+ exclude =
+     build/pymake/,
++    node_modules,
+     security/nss/,
+     testing/mochitest/pywebsocket,
+     tools/lint/test/files,
+diff --git a/tools/lint/cpp-virtual-final.yml b/tools/lint/cpp-virtual-final.yml
+--- a/tools/lint/cpp-virtual-final.yml
++++ b/tools/lint/cpp-virtual-final.yml
+@@ -1,16 +1,17 @@
+ ---
+ cpp-virtual-final:
+     description: "Virtual function declarations should specify only one of
+                   `virtual`, `final`, or `override`"
+     level: warning
+     include: ['.']
+     exclude:
+         # Third-party code with cpp-virtual-final warnings:
++        - '**/node_modules'
+         - gfx/angle
+         - gfx/skia
+         - media/webrtc/trunk
+         - security/sandbox/chromium
+     extensions: ['cpp', 'h', 'mm']
+     type: regex
+     #
+     # This lint warns about:

+ 59 - 0
mozilla-release/patches/1441765-1-60a1.patch

@@ -0,0 +1,59 @@
+# HG changeset patch
+# User Lars T Hansen <lhansen@mozilla.com>
+# Date 1519805403 -3600
+#      Wed Feb 28 09:10:03 2018 +0100
+# Node ID 6ed3cc037e85f85dd356f744d79fe78b38666d5d
+# Parent  2165379b8cb88182c052ba2379e0032ba23ad14b
+Bug 1441765 - Introduce EARLY_BETA_OR_EARLIER in SpiderMonkey. r=glandium
+
+diff --git a/js/src/old-configure.in b/js/src/old-configure.in
+--- a/js/src/old-configure.in
++++ b/js/src/old-configure.in
+@@ -1523,16 +1523,17 @@ AC_DEFINE_UNQUOTED(JS_DEFAULT_JITREPORT_
+ dnl ========================================================
+ dnl =
+ dnl = Misc. Options
+ dnl =
+ dnl ========================================================
+ MOZ_ARG_HEADER(Misc. Options)
+ 
+ if test -z "$SKIP_COMPILER_CHECKS"; then
++
+ dnl ========================================================
+ dnl =
+ dnl = Compiler Options
+ dnl =
+ dnl ========================================================
+ MOZ_ARG_HEADER(Compiler Options)
+ 
+ dnl ========================================================
+@@ -1754,16 +1755,29 @@ AC_CHECK_FUNCS(posix_fadvise posix_fallo
+ dnl Set various defines and substitutions
+ dnl ========================================================
+ 
+ AC_SUBST(MOZ_DEV_EDITION)
+ if test -n "$MOZ_DEV_EDITION"; then
+     AC_DEFINE(MOZ_DEV_EDITION)
+ fi
+ 
++# Allow influencing configure with a defines.sh script.
++. "${srcdir}/build/defines.sh"
++
++# If we're not building a release build, define EARLY_BETA_OR_EARLIER if it is
++# set in defines.sh
++if test "$BUILDING_RELEASE"; then
++  # Override value in defines.sh, if any
++  EARLY_BETA_OR_EARLIER=
++elif test "$EARLY_BETA_OR_EARLIER"; then
++  AC_DEFINE(EARLY_BETA_OR_EARLIER)
++fi
++AC_SUBST(EARLY_BETA_OR_EARLIER)
++
+ dnl ========================================================
+ dnl JavaScript shell
+ dnl ========================================================
+ 
+ MOZ_CHECK_ALLOCATOR
+ 
+ AC_CHECK_FUNCS(localeconv)
+ 

+ 22 - 26
mozilla-release/patches/1460856-2-63a1.patch

@@ -3,7 +3,7 @@
 # Date 1535484295 0
 #      Tue Aug 28 19:24:55 2018 +0000
 # Node ID 38549f3a51879ed4efc1c0a55c85e88198ed1c05
-# Parent  1900417ab09237831cdd455327da918d76bf4943
+# Parent  3226a1fdc82db85220e2c4a1e23218baf97d1902
 Bug 1460856 - [mozlint] Stop using warnings in all current linters r=Standard8
 
 Soon, warnings will be suppressed by default and won't causes a failure.
@@ -15,28 +15,24 @@ Depends on D3819
 
 Differential Revision: https://phabricator.services.mozilla.com/D3820
 
-diff --git a/tools/lint/cpp-virtual-final.yml.1460856.later b/tools/lint/cpp-virtual-final.yml.1460856.later
-new file mode 100644
---- /dev/null
-+++ b/tools/lint/cpp-virtual-final.yml.1460856.later
-@@ -0,0 +1,17 @@
-+--- cpp-virtual-final.yml
-++++ cpp-virtual-final.yml
-+@@ -1,13 +1,13 @@
-+ ---
-+ cpp-virtual-final:
-+     description: "Virtual function declarations should specify only one of
-+                   `virtual`, `final`, or `override`"
-+-    level: warning
-++    level: error
-+     include: ['.']
-+     exclude:
-+         # Third-party code with cpp-virtual-final warnings:
-+         - '**/node_modules'
-+         - gfx/angle
-+         - gfx/skia
-+         - media/webrtc/trunk
-+         - security/sandbox/chromium
+diff --git a/tools/lint/cpp-virtual-final.yml b/tools/lint/cpp-virtual-final.yml
+--- a/tools/lint/cpp-virtual-final.yml
++++ b/tools/lint/cpp-virtual-final.yml
+@@ -1,13 +1,13 @@
+ ---
+ cpp-virtual-final:
+     description: "Virtual function declarations should specify only one of
+                   `virtual`, `final`, or `override`"
+-    level: warning
++    level: error
+     include: ['.']
+     exclude:
+         # Third-party code with cpp-virtual-final warnings:
+         - '**/node_modules'
+         - gfx/angle
+         - gfx/skia
+         - media/webrtc/trunk
+         - security/sandbox/chromium
 diff --git a/tools/lint/mingw-capitalization.yml b/tools/lint/mingw-capitalization.yml
 --- a/tools/lint/mingw-capitalization.yml
 +++ b/tools/lint/mingw-capitalization.yml
@@ -83,7 +79,7 @@ diff --git a/tools/lint/python/__init__.py b/tools/lint/python/__init__.py
 diff --git a/tools/lint/python/flake8.py b/tools/lint/python/flake8.py
 --- a/tools/lint/python/flake8.py
 +++ b/tools/lint/python/flake8.py
-@@ -76,22 +76,18 @@ class Flake8Process(ProcessHandlerMixin)
+@@ -77,22 +77,18 @@ class Flake8Process(ProcessHandlerMixin)
          # Escape slashes otherwise JSON conversion will not work
          line = line.replace('\\', '\\\\')
          try:
@@ -133,7 +129,7 @@ diff --git a/tools/lint/shell/__init__.py b/tools/lint/shell/__init__.py
 diff --git a/tools/lint/spell/__init__.py b/tools/lint/spell/__init__.py
 --- a/tools/lint/spell/__init__.py
 +++ b/tools/lint/spell/__init__.py
-@@ -47,17 +47,17 @@ class CodespellProcess(ProcessHandlerMix
+@@ -56,17 +56,17 @@ class CodespellProcess(ProcessHandlerMix
  
          # Ignore false positive like aParent (which would be fixed to apparent)
          # See https://github.com/lucasdemarchi/codespell/issues/314
@@ -155,7 +151,7 @@ diff --git a/tools/lint/spell/__init__.py b/tools/lint/spell/__init__.py
 diff --git a/tools/lint/yamllint_/__init__.py b/tools/lint/yamllint_/__init__.py
 --- a/tools/lint/yamllint_/__init__.py
 +++ b/tools/lint/yamllint_/__init__.py
-@@ -43,17 +43,17 @@ class YAMLLintProcess(ProcessHandlerMixi
+@@ -41,17 +41,17 @@ class YAMLLintProcess(ProcessHandlerMixi
              match = YAMLLINT_FORMAT_REGEX.match(line)
              abspath, line, col, level, message, code = match.groups()
          except AttributeError:

+ 311 - 0
mozilla-release/patches/1460914-5-65a1.patch

@@ -0,0 +1,311 @@
+# HG changeset patch
+# User Andrew Halberstadt <ahalberstadt@mozilla.com>
+# Date 1541688686 0
+# Node ID f99b45112279bbf314dba4224fc0bf19ac2cd1ca
+# Parent  80df3ef3a2b71e83015ad0a22290dee09384b8c9
+Bug 1460914 - [mozprofile] Move mochitest's 'parseKeyValue' function into mozprofile.cli, r=ted
+
+Parsing prefs and env on the command line is a common task performed by our harnesses, let's
+move it into mozbase.
+
+Depends on D9717
+
+Differential Revision: https://phabricator.services.mozilla.com/D9796
+
+diff --git a/testing/mochitest/runrobocop.py b/testing/mochitest/runrobocop.py
+--- a/testing/mochitest/runrobocop.py
++++ b/testing/mochitest/runrobocop.py
+@@ -12,22 +12,23 @@ from collections import defaultdict
+ 
+ sys.path.insert(
+     0, os.path.abspath(
+         os.path.realpath(
+             os.path.dirname(__file__))))
+ 
+ from automation import Automation
+ from remoteautomation import RemoteAutomation, fennecLogcatFilters
+-from runtests import KeyValueParseError, MochitestDesktop, MessageLogger, parseKeyValue
++from runtests import KeyValueParseError, MochitestDesktop, MessageLogger
+ from mochitest_options import MochitestArgumentParser
+ 
+ from manifestparser import TestManifest
+ from manifestparser.filters import chunk_by_slice
+ from mozdevice import ADBAndroid
++from mozprofile.cli import parse_key_value
+ import mozfile
+ import mozinfo
+ 
+ SCRIPT_DIR = os.path.abspath(os.path.realpath(os.path.dirname(__file__)))
+ 
+ 
+ class RobocopTestRunner(MochitestDesktop):
+     """
+@@ -396,17 +397,17 @@ class RobocopTestRunner(MochitestDesktop
+             del browserEnv["XPCOM_MEM_BLOAT_LOG"]
+         browserEnv["MOZ_LOG_FILE"] = os.path.join(
+             self.remoteMozLog,
+             self.mozLogName)
+ 
+         try:
+             browserEnv.update(
+                 dict(
+-                    parseKeyValue(
++                    parse_key_value(
+                         self.options.environment,
+                         context='--setenv')))
+         except KeyValueParseError as e:
+             self.log.error(str(e))
+             return None
+ 
+         return browserEnv
+ 
+diff --git a/testing/mochitest/runtests.py b/testing/mochitest/runtests.py
+--- a/testing/mochitest/runtests.py
++++ b/testing/mochitest/runtests.py
+@@ -61,17 +61,18 @@ except ImportError as e:
+     def reraise(*args, **kwargs):
+         raise(e)
+     Marionette = reraise
+ 
+ from leaks import ShutdownLeaks, LSANLeaks
+ from mochitest_options import (
+     MochitestArgumentParser, build_obj, get_default_valgrind_suppression_files
+ )
+-from mozprofile import Profile, Preferences
++from mozprofile import Profile
++from mozprofile.cli import parse_preferences, parse_key_value, KeyValueParseError
+ from mozprofile.permissions import ServerLocations
+ from urllib import quote_plus as encodeURIComponent
+ from mozlog.formatters import TbplFormatter
+ from mozlog import commandline
+ from mozrunner.utils import get_stack_fixer_function, test_environment
+ from mozscreenshot import dump_screen
+ import mozleak
+ 
+@@ -780,41 +781,16 @@ def findTestMediaDevices(log):
+     # Whether it was loaded or not make it the default output
+     subprocess.check_call([pacmd, 'set-default-sink', 'null'])
+ 
+     # Hardcode the name since it's always the same.
+     info['audio'] = 'Monitor of Null Output'
+     return info
+ 
+ 
+-class KeyValueParseError(Exception):
+-
+-    """error when parsing strings of serialized key-values"""
+-
+-    def __init__(self, msg, errors=()):
+-        self.errors = errors
+-        Exception.__init__(self, msg)
+-
+-
+-def parseKeyValue(strings, separator='=', context='key, value: '):
+-    """
+-    parse string-serialized key-value pairs in the form of
+-    `key = value`. Returns a list of 2-tuples.
+-    Note that whitespace is not stripped.
+-    """
+-
+-    # syntax check
+-    missing = [string for string in strings if separator not in string]
+-    if missing:
+-        raise KeyValueParseError(
+-            "Error: syntax error in %s" %
+-            (context, ','.join(missing)), errors=missing)
+-    return [string.split(separator, 1) for string in strings]
+-
+-
+ def create_zip(path):
+     """
+     Takes a `path` on disk and creates a zipfile with its contents. Returns a
+     path to the location of the temporary zip file.
+     """
+     with tempfile.NamedTemporaryFile() as f:
+         # `shutil.make_archive` writes to "{f.name}.zip", so we're really just
+         # using `NamedTemporaryFile` as a way to get a random path.
+@@ -911,30 +887,16 @@ class MochitestDesktop(object):
+         self.result = {}
+ 
+         self.start_script = os.path.join(here, 'start_desktop.js')
+ 
+     def environment(self, **kwargs):
+         kwargs['log'] = self.log
+         return test_environment(**kwargs)
+ 
+-    def parseExtraPrefs(self, prefs):
+-        """Interpolate extra preferences from option strings"""
+-
+-        try:
+-            prefs = dict(parseKeyValue(prefs, context='--setpref='))
+-        except KeyValueParseError as e:
+-            print(str(e))
+-            sys.exit(1)
+-
+-        for pref, value in prefs.items():
+-            value = Preferences.cast(value)
+-            prefs[pref] = value
+-        return prefs
+-
+     def getFullPath(self, path):
+         " Get an absolute path relative to self.oldcwd."
+         return os.path.normpath(
+             os.path.join(
+                 self.oldcwd,
+                 os.path.expanduser(path)))
+ 
+     def getLogFilePath(self, logFile):
+@@ -1676,17 +1638,17 @@ toolbar#nav-bar {
+         # These variables are necessary for correct application startup; change
+         # via the commandline at your own risk.
+         browserEnv["XPCOM_DEBUG_BREAK"] = "stack"
+ 
+         # interpolate environment passed with options
+         try:
+             browserEnv.update(
+                 dict(
+-                    parseKeyValue(
++                    parse_key_value(
+                         options.environment,
+                         context='--setenv')))
+         except KeyValueParseError as e:
+             self.log.error(str(e))
+             return None
+ 
+         browserEnv["XPCOM_MEM_BLOAT_LOG"] = self.leak_report_file
+ 
+@@ -2564,17 +2526,17 @@ toolbar#nav-bar {
+         self.log.info(':::')
+         self.log.info('::: Test verification %s' % finalResult)
+         self.log.info(':::')
+ 
+         return 0
+ 
+     def runTests(self, options):
+         """ Prepare, configure, run tests and cleanup """
+-        self.extraPrefs = self.parseExtraPrefs(options.extraPrefs)
++        self.extraPrefs = parse_preferences(options.extraPrefs)
+ 
+         # a11y and chrome tests don't run with e10s enabled in CI. Need to set
+         # this here since |mach mochitest| sets the flavor after argument parsing.
+         if options.flavor in ('a11y', 'chrome'):
+             options.e10s = False
+ 
+         # for test manifest parsing.
+         mozinfo.update({
+@@ -2617,17 +2579,17 @@ toolbar#nav-bar {
+             self.log.info("Running manifest: {}".format(m))
+ 
+             prefs = list(self.prefs_by_manifest[m])[0]
+             self.extraPrefs = origPrefs.copy()
+             if prefs:
+                 prefs = prefs.strip().split()
+                 self.log.info("The following extra prefs will be set:\n  {}".format(
+                     '\n  '.join(prefs)))
+-                self.extraPrefs.update(self.parseExtraPrefs(prefs))
++                self.extraPrefs.update(parse_preferences(prefs))
+ 
+             # If we are using --run-by-manifest, we should not use the profile path (if) provided
+             # by the user, since we need to create a new directory for each run. We would face
+             # problems if we use the directory provided by the user.
+             tests_in_manifest = [t['path'] for t in tests if t['manifest'] == m]
+             res = self.runMochitests(options, tests_in_manifest)
+             result = result or res
+ 
+diff --git a/testing/mozbase/mozprofile/mozprofile/cli.py b/testing/mozbase/mozprofile/mozprofile/cli.py
+--- a/testing/mozbase/mozprofile/mozprofile/cli.py
++++ b/testing/mozbase/mozprofile/mozprofile/cli.py
+@@ -13,17 +13,67 @@ resulting profile is printed.
+ from __future__ import absolute_import, print_function
+ 
+ import sys
+ from optparse import OptionParser
+ from .prefs import Preferences
+ from .profile import FirefoxProfile
+ from .profile import Profile
+ 
+-__all__ = ['MozProfileCLI', 'cli']
++__all__ = ['MozProfileCLI', 'cli', 'KeyValueParseError', 'parse_key_value', 'parse_preferences']
++
++
++class KeyValueParseError(Exception):
++    """Error when parsing strings of serialized key-values."""
++
++    def __init__(self, msg, errors=()):
++        self.errors = errors
++        Exception.__init__(self, msg)
++
++
++def parse_key_value(strings, separator='=', context='key, value: '):
++    """Parse string-serialized key-value pairs in the form of `key = value`.
++
++    Args:
++        strings (list): List of strings to parse.
++        separator (str): Identifier used to split the strings.
++
++    Returns:
++        list: A list of (<key>, <value>) tuples. Whitespace is not stripped.
++
++    Raises:
++        KeyValueParseError
++    """
++
++    # syntax check
++    missing = [string for string in strings if separator not in string]
++    if missing:
++        raise KeyValueParseError(
++            "Error: syntax error in %s" %
++            (context, ','.join(missing)), errors=missing)
++    return [string.split(separator, 1) for string in strings]
++
++
++def parse_preferences(prefs, context='--setpref='):
++    """Parse preferences specified on the command line.
++
++    Args:
++        prefs (list): A list of strings, usually of the form "<pref>=<value>".
++
++    Returns:
++        dict: A dictionary of the form {<pref>: <value>} where values have been
++              cast.
++    """
++    try:
++        prefs = dict(parse_key_value(prefs, context=context))
++    except KeyValueParseError as e:
++        print(str(e))
++        sys.exit(1)
++
++    return {k: Preferences.cast(v) for k, v in prefs.items()}
+ 
+ 
+ class MozProfileCLI(object):
+     """The Command Line Interface for ``mozprofile``."""
+ 
+     module = 'mozprofile'
+     profile_class = Profile
+ 
+@@ -65,23 +115,17 @@ class MozProfileCLI(object):
+         # object to hold preferences
+         prefs = Preferences()
+ 
+         # add preferences files
+         for prefs_file in self.options.prefs_files:
+             prefs.add_file(prefs_file)
+ 
+         # change CLI preferences into 2-tuples
+-        separator = ':'
+-        cli_prefs = []
+-        for pref in self.options.prefs:
+-            if separator not in pref:
+-                self.parser.error("Preference must be a key-value pair separated by "
+-                                  "a ':' (You gave: %s)" % pref)
+-            cli_prefs.append(pref.split(separator, 1))
++        cli_prefs = parse_key_value(self.options.prefs, separator=':')
+ 
+         # string preferences
+         prefs.add(cli_prefs, cast=True)
+ 
+         return prefs()
+ 
+     def profile(self, restore=False):
+         """create the profile"""

+ 3 - 2
mozilla-release/patches/1468273-1-63a1.patch

@@ -2,7 +2,7 @@
 # User Sylvestre Ledru <sledru@mozilla.com>
 # Date 1528632824 -7200
 # Node ID 11df5f8585e6f622c0387bd575e6081b5b2e0f4d
-# Parent  9bea482b71ba297ac512de21b7e8782ac63bc0bf
+# Parent  5ab6266f7b5748a4dd62b71558edc5f6321547d2
 Bug 1468273 - autopep8 on gfx/ r=ted
 
 MozReview-Commit-ID: 8j8EU3E08GP
@@ -10,7 +10,7 @@ MozReview-Commit-ID: 8j8EU3E08GP
 diff --git a/.flake8 b/.flake8
 --- a/.flake8
 +++ b/.flake8
-@@ -1,13 +1,17 @@
+@@ -1,14 +1,18 @@
  [flake8]
  # See http://pep8.readthedocs.io/en/latest/intro.html#configuration
  ignore = E121, E123, E126, E129, E133, E226, E241, E242, E704, W503, E402, E741
@@ -25,6 +25,7 @@ diff --git a/.flake8 b/.flake8
 +    glx/skia/,
      js/*.configure,
      memory/moz.configure,
+     node_modules,
      security/nss/,
      testing/mochitest/pywebsocket,
      tools/lint/test/files,

+ 3 - 2
mozilla-release/patches/1468273-5-63a1.patch

@@ -2,7 +2,7 @@
 # User Sylvestre Ledru <sledru@mozilla.com>
 # Date 1528763493 25200
 # Node ID 9f40b4b5e2600eac90c6b44a7058a4d883dc5a15
-# Parent  f45b0f9763030236f99c82af305bc0635d75f26a
+# Parent  85407c2666794498da0fb566b2d04d9b82541639
 Bug 1468273 - Ignore ipc/chromium r=ahal
 
 MozReview-Commit-ID: HhXbRSMrTLP
@@ -10,7 +10,7 @@ MozReview-Commit-ID: HhXbRSMrTLP
 diff --git a/.flake8 b/.flake8
 --- a/.flake8
 +++ b/.flake8
-@@ -5,13 +5,14 @@ max-line-length = 99
+@@ -5,14 +5,15 @@ max-line-length = 99
  exclude =
      browser/moz.configure,
      build/moz.configure/*.configure,
@@ -22,6 +22,7 @@ diff --git a/.flake8 b/.flake8
 +    ipc/chromium/,
      js/*.configure,
      memory/moz.configure,
+     node_modules,
      security/nss/,
      testing/mochitest/pywebsocket,
      tools/lint/test/files,

+ 3 - 2
mozilla-release/patches/1468273-6-63a1.patch

@@ -2,7 +2,7 @@
 # User Sylvestre Ledru <sledru@mozilla.com>
 # Date 1528870300 25200
 # Node ID 20274aa8fe9bb1e628d768b6013c200f74831b46
-# Parent  4846cb60e188c84cd2b61d2dbd6e92e094485bd8
+# Parent  46f7ad449d3f61d79e6217525031a39abdb5e437
 Bug 1468273 - Add closure-lib and intl/icu into the flake8 ignore list r=ahal
 
 MozReview-Commit-ID: A68UyXSHO9l
@@ -10,7 +10,7 @@ MozReview-Commit-ID: A68UyXSHO9l
 diff --git a/.flake8 b/.flake8
 --- a/.flake8
 +++ b/.flake8
-@@ -1,18 +1,20 @@
+@@ -1,19 +1,21 @@
  [flake8]
  # See http://pep8.readthedocs.io/en/latest/intro.html#configuration
  ignore = E121, E123, E126, E129, E133, E226, E241, E242, E704, W503, E402, E741
@@ -28,6 +28,7 @@ diff --git a/.flake8 b/.flake8
      ipc/chromium/,
      js/*.configure,
      memory/moz.configure,
+     node_modules,
      security/nss/,
      testing/mochitest/pywebsocket,
      tools/lint/test/files,

+ 0 - 0
mozilla-release/patches/1469027-3only-64a1.patch → mozilla-release/patches/1469027-3-64a1.patch


+ 247 - 0
mozilla-release/patches/1470266-6-64a1.patch

@@ -0,0 +1,247 @@
+# HG changeset patch
+# User Andrew Halberstadt <ahalberstadt@mozilla.com>
+# Date 1538766747 0
+# Node ID a3d2029e7b26c3ae312b17f7ab11916eec5de355
+# Parent  7a3d9b9a1a968f7d86d80bb134c4ab5abfbe5a2f
+Bug 1470266 - [ci] Schedule serviceworker-e10s mochitest tasks with linux64/debug on mozilla-central, r=jmaher
+
+This duplicates all the mochitest, based tests except with
+dom.serviceWorkers.parent_intercept set to true. For now they are only run on
+mozilla-central with linux64/debug.
+
+Differential Revision: https://phabricator.services.mozilla.com/D7641
+
+diff --git a/dom/push/test/mochitest.ini b/dom/push/test/mochitest.ini
+--- a/dom/push/test/mochitest.ini
++++ b/dom/push/test/mochitest.ini
+@@ -20,10 +20,11 @@ skip-if = os == "win" # Bug 1373346
+ [test_multiple_register_different_scope.html]
+ [test_subscription_change.html]
+ skip-if = os == "win" # Bug 1373346
+ [test_data.html]
+ skip-if = os == "win" # Bug 1373346
+ [test_try_registering_offline_disabled.html]
+ skip-if = os == "win" # Bug 1373346
+ [test_serviceworker_lifetime.html]
+-skip-if = os == "win" # Bug 1373346
++skip-if = serviceworker_e10s || !e10s || os == "win" # e10s: Bug 1433689, Windows: Bug 1373346
+ [test_error_reporting.html]
++skip-if = serviceworker_e10s
+diff --git a/dom/serviceworkers/test/browser.ini.1470266.later b/dom/serviceworkers/test/browser.ini.1470266.later
+new file mode 100644
+--- /dev/null
++++ b/dom/serviceworkers/test/browser.ini.1470266.later
+@@ -0,0 +1,24 @@
++--- browser.ini
+++++ browser.ini
++@@ -11,18 +11,20 @@ support-files =
++   file_userContextId_openWindow.js
++   force_refresh_browser_worker.js
++   empty.html
++   empty.js
++   storage_recovery_worker.sjs
++   utils.js
++ 
++ [browser_devtools_serviceworker_interception.js]
+++skip-if = serviceworker_e10s
++ [browser_force_refresh.js]
++ [browser_download.js]
++ [browser_download_canceled.js]
++ skip-if = verify
++ [browser_storage_permission.js]
++ skip-if = (verify && debug && (os == 'win' || os == 'mac'))
++ [browser_storage_recovery.js]
+++skip-if = serviceworker_e10s
++ [browser_unregister_with_containers.js]
++ [browser_userContextId_openWindow.js]
++-skip-if = !e10s
+++skip-if = !e10s || serviceworker_e10s
+diff --git a/dom/serviceworkers/test/mochitest.ini.1470266.later b/dom/serviceworkers/test/mochitest.ini.1470266.later
+new file mode 100644
+--- /dev/null
++++ b/dom/serviceworkers/test/mochitest.ini.1470266.later
+@@ -0,0 +1,14 @@
++--- mochitest.ini
+++++ mochitest.ini
++@@ -1,10 +1,11 @@
++ [DEFAULT]
++ 
+++skip-if = serviceworker_e10s
++ support-files =
++   worker.js
++   worker2.js
++   worker3.js
++   fetch_event_worker.js
++   parse_error_worker.js
++   activate_event_error_worker.js
++   install_event_worker.js
+diff --git a/testing/mochitest/runrobocop.py b/testing/mochitest/runrobocop.py
+--- a/testing/mochitest/runrobocop.py
++++ b/testing/mochitest/runrobocop.py
+@@ -237,16 +237,17 @@ class RobocopTestRunner(MochitestDesktop
+ 
+         self.options.extensionsToExclude.extend([
+             'mochikit@mozilla.org',
+             'worker-test@mozilla.org.xpi',
+             'workerbootstrap-test@mozilla.org.xpi',
+             'indexedDB-test@mozilla.org.xpi',
+         ])
+ 
++        self.extraPrefs = self.parseExtraPrefs(self.options.extraPrefs)
+         manifest = MochitestDesktop.buildProfile(self, self.options)
+         self.localProfile = self.options.profilePath
+         self.log.debug("Profile created at %s" % self.localProfile)
+         # some files are not needed for robocop; save time by not pushing
+         os.remove(os.path.join(self.localProfile, 'userChrome.css'))
+         try:
+             self.device.push(self.localProfile, self.remoteProfileCopy)
+         except Exception:
+diff --git a/testing/mochitest/runtests.py b/testing/mochitest/runtests.py
+--- a/testing/mochitest/runtests.py
++++ b/testing/mochitest/runtests.py
+@@ -910,17 +910,17 @@ class MochitestDesktop(object):
+         self.result = {}
+ 
+         self.start_script = os.path.join(here, 'start_desktop.js')
+ 
+     def environment(self, **kwargs):
+         kwargs['log'] = self.log
+         return test_environment(**kwargs)
+ 
+-    def extraPrefs(self, prefs):
++    def parseExtraPrefs(self, prefs):
+         """Interpolate extra preferences from option strings"""
+ 
+         try:
+             prefs = dict(parseKeyValue(prefs, context='--setpref='))
+         except KeyValueParseError as e:
+             print(str(e))
+             sys.exit(1)
+ 
+@@ -1944,17 +1944,17 @@ toolbar#nav-bar {
+         # See if we should use fake media devices.
+         if options.useTestMediaDevices:
+             prefs['media.audio_loopback_dev'] = self.mediaDevices['audio']
+             prefs['media.video_loopback_dev'] = self.mediaDevices['video']
+ 
+         self.profile.set_preferences(prefs)
+ 
+         # Extra prefs from --setpref
+-        self.profile.set_preferences(self.extraPrefs(options.extraPrefs))
++        self.profile.set_preferences(self.extraPrefs)
+         return manifest
+ 
+     def getGMPPluginPath(self, options):
+         if options.gmp_path:
+             return options.gmp_path
+ 
+         gmp_parentdirs = [
+             # For local builds, GMP plugins will be under dist/bin.
+@@ -2563,23 +2563,30 @@ toolbar#nav-bar {
+         self.log.info(':::')
+         self.log.info('::: Test verification %s' % finalResult)
+         self.log.info(':::')
+ 
+         return 0
+ 
+     def runTests(self, options):
+         """ Prepare, configure, run tests and cleanup """
++        self.extraPrefs = self.parseExtraPrefs(options.extraPrefs)
+ 
+         # a11y and chrome tests don't run with e10s enabled in CI. Need to set
+         # this here since |mach mochitest| sets the flavor after argument parsing.
+         if options.flavor in ('a11y', 'chrome'):
+             options.e10s = False
+-        mozinfo.update({"e10s": options.e10s})  # for test manifest parsing.
+-        mozinfo.update({"headless": options.headless})  # for test manifest parsing.
++
++        # for test manifest parsing.
++        mozinfo.update({
++            "e10s": options.e10s,
++            "headless": options.headless,
++            "serviceworker_e10s": self.extraPrefs.get(
++                'dom.serviceWorkers.parent_intercept', False),
++        })
+ 
+         self.setTestRoot(options)
+ 
+         # Despite our efforts to clean up servers started by this script, in practice
+         # we still see infrequent cases where a process is orphaned and interferes
+         # with future tests, typically because the old server is keeping the port in use.
+         # Try to avoid those failures by checking for and killing servers before
+         # trying to start new ones.
+@@ -2595,27 +2602,28 @@ toolbar#nav-bar {
+ 
+         # Until we have all green, this does not run on jetpack*, or a11y (for perf reasons)
+         if not options.runByManifest:
+             return self.runMochitests(options, [t['path'] for t in tests])
+ 
+         # code for --run-by-manifest
+         manifests = set(t['manifest'] for t in tests)
+         result = 0
+-        origPrefs = options.extraPrefs[:]
++
++        origPrefs = self.extraPrefs.copy()
+         for m in sorted(manifests):
+             self.log.info("Running manifest: {}".format(m))
+ 
+             prefs = list(self.prefs_by_manifest[m])[0]
+-            options.extraPrefs = origPrefs[:]
++            self.extraPrefs = origPrefs.copy()
+             if prefs:
+                 prefs = prefs.strip().split()
+                 self.log.info("The following extra prefs will be set:\n  {}".format(
+                     '\n  '.join(prefs)))
+-                options.extraPrefs.extend(prefs)
++                self.extraPrefs.update(self.parseExtraPrefs(prefs))
+ 
+             # If we are using --run-by-manifest, we should not use the profile path (if) provided
+             # by the user, since we need to create a new directory for each run. We would face
+             # problems if we use the directory provided by the user.
+             tests_in_manifest = [t['path'] for t in tests if t['manifest'] == m]
+             res = self.runMochitests(options, tests_in_manifest)
+             result = result or res
+ 
+@@ -2785,16 +2793,18 @@ toolbar#nav-bar {
+ 
+                 testURL = self.buildTestURL(options, scheme=scheme)
+ 
+                 self.buildURLOptions(options, self.browserEnv)
+                 if self.urlOpts:
+                     testURL += "?" + "&".join(self.urlOpts)
+ 
+                 self.log.info("runtests.py | Running with e10s: {}".format(options.e10s))
++                self.log.info("runtests.py | Running with serviceworker_e10s: {}".format(
++                    mozinfo.info.get('serviceworker_e10s', False)))
+                 self.log.info("runtests.py | Running tests: start.\n")
+                 ret, _ = self.runApp(
+                     testURL,
+                     self.browserEnv,
+                     options.app,
+                     profile=self.profile,
+                     extraArgs=options.browserArgs,
+                     utilityPath=options.utilityPath,
+diff --git a/testing/mochitest/tests/Harness_sanity/mochitest.ini b/testing/mochitest/tests/Harness_sanity/mochitest.ini
+--- a/testing/mochitest/tests/Harness_sanity/mochitest.ini
++++ b/testing/mochitest/tests/Harness_sanity/mochitest.ini
+@@ -5,18 +5,20 @@ skip-if = true #depends on fix for bug 1
+ [test_createFiles.html]
+ [test_importInMainProcess.html]
+ support-files = importtesting_chromescript.js
+ [test_sanity.html]
+ [test_sanityException.html]
+ [test_sanityException2.html]
+ [test_sanityParams.html]
+ [test_sanityRegisteredServiceWorker.html]
++skip-if = serviceworker_e10s
+ support-files = empty.js
+ [test_sanityRegisteredServiceWorker2.html]
++skip-if = verify || serviceworker_e10s
+ support-files = empty.js
+ [test_sanityWindowSnapshot.html]
+ [test_SpecialPowersExtension.html]
+ [test_SpecialPowersExtension2.html]
+ support-files = file_SpecialPowersFrame1.html
+ [test_SpecialPowersPushPermissions.html]
+ support-files =
+     specialPowers_framescript.js

+ 2 - 2
mozilla-release/patches/1471648-67a1.patch

@@ -2,7 +2,7 @@
 # User Pavel Slepushkin <slepushkin@yandex.ru>
 # Date 1549026489 0
 # Node ID 5cf0c9b4e97bb208a2eaa3fdb3ad641b3b224b7a
-# Parent  486069b3537b88379db3bcc41efc8bd4d66f5178
+# Parent  6301099b31e98881fa8f5d1ed516f2a3061f156f
 Bug 1471648 - [mozlog] Add support for Python 3; r=raphael
 
 Differential Revision: https://phabricator.services.mozilla.com/D18069
@@ -237,7 +237,7 @@ diff --git a/testing/mozbase/mozlog/tests/manifest.ini b/testing/mozbase/mozlog/
 +++ b/testing/mozbase/mozlog/tests/manifest.ini
 @@ -1,9 +1,6 @@
  [DEFAULT]
- subsuite = mozbase, os == "linux"
+ subsuite = mozbase
  [test_logger.py]
 -skip-if = python == 3
  [test_logtypes.py]

+ 71 - 0
mozilla-release/patches/1471916-68a1.patch

@@ -0,0 +1,71 @@
+# HG changeset patch
+# User Nikki S <nikkisharpley@gmail.com>
+# Date 1553521778 0
+# Node ID ac9b05fb0fdf1133e1093358d021c433143b44dd
+# Parent  85e59768dda3f2342158df4dfaea41721378ef91
+[mozsystemmonitor] Add test manifest to testing/mozbase/moz.build (bug 1471916) r=davehunt
+
+Currently, tests in mozsystemmonitor are skipped because the manifest is missing
+from mozbase/moz.build. This has now been added.
+
+For the moment, this patch also skips the test if run against Python 3. This is
+not ideal - a better fix may be setting the unittest.skipIf condition to skip
+if the there is simply a failure when run with Python 3.
+
+Differential Revision: https://phabricator.services.mozilla.com/D22426
+
+diff --git a/testing/mozbase/moz.build b/testing/mozbase/moz.build
+--- a/testing/mozbase/moz.build
++++ b/testing/mozbase/moz.build
+@@ -12,16 +12,17 @@ PYTHON_UNITTEST_MANIFESTS += [
+     'mozhttpd/tests/manifest.ini',
+     'mozinfo/tests/manifest.ini',
+     'mozinstall/tests/manifest.ini',
+     'mozlog/tests/manifest.ini',
+     'moznetwork/tests/manifest.ini',
+     'mozprocess/tests/manifest.ini',
+     'mozprofile/tests/manifest.ini',
+     'mozrunner/tests/manifest.ini',
++    'mozsystemmonitor/tests/manifest.ini',
+     'moztest/tests/manifest.ini',
+     'mozversion/tests/manifest.ini',
+ ]
+ 
+ python_modules = [
+     'manifestparser',
+     'mozcrash',
+     'mozdebug',
+diff --git a/testing/mozbase/mozsystemmonitor/tests/manifest.ini b/testing/mozbase/mozsystemmonitor/tests/manifest.ini
+--- a/testing/mozbase/mozsystemmonitor/tests/manifest.ini
++++ b/testing/mozbase/mozsystemmonitor/tests/manifest.ini
+@@ -1,3 +1,4 @@
+ [DEFAULT]
+ subsuite = mozbase
++skip-if = python == 3
+ [test_resource_monitor.py]
+diff --git a/testing/mozbase/mozsystemmonitor/tests/test_resource_monitor.py.1471916.later b/testing/mozbase/mozsystemmonitor/tests/test_resource_monitor.py.1471916.later
+new file mode 100644
+--- /dev/null
++++ b/testing/mozbase/mozsystemmonitor/tests/test_resource_monitor.py.1471916.later
+@@ -0,0 +1,21 @@
++--- test_resource_monitor.py
+++++ test_resource_monitor.py
++@@ -145,17 +145,17 @@ class TestResourceMonitor(unittest.TestC
++     def test_memory(self):
++         monitor = SystemResourceMonitor(poll_interval=0.25)
++ 
++         monitor.start()
++         time.sleep(1.0)
++         monitor.stop()
++ 
++         v = monitor.min_memory_available()
++-        self.assertIsInstance(v, long)
+++        self.assertIsInstance(v, (long, int))
++ 
++         v = monitor.max_memory_percent()
++         self.assertIsInstance(v, float)
++ 
++     def test_as_dict(self):
++         monitor = SystemResourceMonitor(poll_interval=0.25)
++ 
++         monitor.start()

+ 2 - 2
mozilla-release/patches/1471920-2-67a1.patch

@@ -2,7 +2,7 @@
 # User Dave Hunt <dhunt@mozilla.com>
 # Date 1549639680 0
 # Node ID 6837617a102430797443bc5e755d105e3a6e7e47
-# Parent  ecdae7135cf64b7eb2d1362fea1c589d20739b17
+# Parent  293004b30e88b4b3d94d757b5cdf605b8c3f20e3
 Bug 1471920 - Fix Python 3 support in mozversion; r=ahal
 
 Differential Revision: https://phabricator.services.mozilla.com/D18063
@@ -99,7 +99,7 @@ diff --git a/testing/mozbase/mozversion/tests/manifest.ini b/testing/mozbase/moz
 +++ b/testing/mozbase/mozversion/tests/manifest.ini
 @@ -1,6 +1,5 @@
  [DEFAULT]
- subsuite = mozbase, os == "linux"
+ subsuite = mozbase
  
  [test_binary.py]
  [test_apk.py]

+ 3 - 2
mozilla-release/patches/1473308-63a1.patch

@@ -2,7 +2,7 @@
 # User Andrew Halberstadt <ahalberstadt@mozilla.com>
 # Date 1530880779 0
 # Node ID b9e9d507a53cfb13c5183adba4cc4489f62e1cce
-# Parent  be487f23c0560841f48b94d2884910e49e361c1e
+# Parent  5be8fd5891ea7dcbffdd30ff9cda8cbc1c576d82
 Bug 1473308 - [flake8] Pass custom extension list into the flake8 binary r=marco
 
 We're supposed to be linting both .py and .configure files with flake8. However
@@ -26,7 +26,7 @@ Differential Revision: https://phabricator.services.mozilla.com/D1975
 diff --git a/.flake8 b/.flake8
 --- a/.flake8
 +++ b/.flake8
-@@ -1,9 +1,13 @@
+@@ -1,10 +1,14 @@
  [flake8]
  # See http://pep8.readthedocs.io/en/latest/intro.html#configuration
  ignore = E121, E123, E126, E129, E133, E226, E241, E242, E704, W503, E402, E741
@@ -37,6 +37,7 @@ diff --git a/.flake8 b/.flake8
      build/pymake/,
 +    js/*.configure,
 +    memory/moz.configure,
+     node_modules,
      security/nss/,
      testing/mochitest/pywebsocket,
      tools/lint/test/files,

+ 262 - 0
mozilla-release/patches/1490948-4-64a1.patch

@@ -0,0 +1,262 @@
+# HG changeset patch
+# User Benjamin Bouvier <benj@benj.me>
+# Date 1537882282 -7200
+#      Tue Sep 25 15:31:22 2018 +0200
+# Node ID 2225cbe1f042a75fc02177dd4daa86c3208997d7
+# Parent  cc5d2d333d5c03efa4925b7d0c9312c8704470d3
+Bug 1490948: Add support for extra bindgen flags when compiling Cranelift; r=froydnj
+
+Some build flags are being passed by the build system: they're passed in a text
+file called extra-bindgen-flags.in that's filled at configure time.
+
+Other flags have to be inferred from the current target/host combination, in
+Cranelift's build script directly. This is mostly cargo-culted from the
+ServoBindings.toml file, and should probably be merged in the build system at
+some point.
+
+Some Windows-specific adjustments were needed to provide access to libclang for
+bindgen support, by adding clang-cl to the plain Spidermonkey Windows builds.
+
+diff --git a/build/moz.configure/toolchain.configure b/build/moz.configure/toolchain.configure
+--- a/build/moz.configure/toolchain.configure
++++ b/build/moz.configure/toolchain.configure
+@@ -1144,20 +1144,20 @@ include('compile-checks.configure')
+          try_compile(body='static_assert(sizeof(void *) == 8, "")',
+                      check_msg='for 64-bit OS'))
+ def check_have_64_bit(have_64_bit, compiler_have_64_bit):
+     if have_64_bit != compiler_have_64_bit:
+         configure_error('The target compiler does not agree with configure '
+                         'about the target bitness.')
+ 
+ 
+-option(env='BINDGEN_CFLAGS',
+-       nargs=1,
+-       default=bindgen_cflags_defaults,
+-       help='Options bindgen should pass to the C/C++ parser')
++js_option(env='BINDGEN_CFLAGS',
++          nargs=1,
++          default=bindgen_cflags_defaults,
++          help='Options bindgen should pass to the C/C++ parser')
+ 
+ 
+ @depends('BINDGEN_CFLAGS')
+ @checking('bindgen cflags', lambda s: s if s else 'no')
+ def bindgen_cflags(value):
+     if value and len(value):
+         return value[0].split()
+ 
+diff --git a/js/src/old-configure.in b/js/src/old-configure.in
+--- a/js/src/old-configure.in
++++ b/js/src/old-configure.in
+@@ -1807,16 +1807,19 @@ fi
+ if test "$BUILDING_RELEASE"; then
+   # Override value in defines.sh, if any
+   EARLY_BETA_OR_EARLIER=
+ elif test "$EARLY_BETA_OR_EARLIER"; then
+   AC_DEFINE(EARLY_BETA_OR_EARLIER)
+ fi
+ AC_SUBST(EARLY_BETA_OR_EARLIER)
+ 
++BINDGEN_SYSTEM_FLAGS="$_BINDGEN_CFLAGS $NSPR_CFLAGS"
++AC_SUBST(BINDGEN_SYSTEM_FLAGS)
++
+ dnl ========================================================
+ dnl JavaScript shell
+ dnl ========================================================
+ 
+ MOZ_CHECK_ALLOCATOR
+ 
+ AC_CHECK_FUNCS(localeconv)
+ 
+diff --git a/js/src/rust/extra-bindgen-flags.in b/js/src/rust/extra-bindgen-flags.in
+new file mode 100644
+--- /dev/null
++++ b/js/src/rust/extra-bindgen-flags.in
+@@ -0,0 +1,1 @@
++@BINDGEN_SYSTEM_FLAGS@
+diff --git a/js/src/rust/moz.build.1490948-4.later b/js/src/rust/moz.build.1490948-4.later
+new file mode 100644
+--- /dev/null
++++ b/js/src/rust/moz.build.1490948-4.later
+@@ -0,0 +1,21 @@
++--- moz.build
+++++ moz.build
++@@ -1,16 +1,18 @@
++ # -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
++ # 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/.
++ 
++ RustLibrary('jsrust')
++ 
+++CONFIGURE_SUBST_FILES += ['extra-bindgen-flags']
+++
++ if CONFIG['JS_SHARED_LIBRARY']:
++     FINAL_LIBRARY = 'js'
++ 
++ if CONFIG['OS_ARCH'] == 'Darwin':
++     # The Rust standard library references libresolv on macOS, so we need to
++     # link it as a workaround. See also bug 1367932.
++     OS_LIBS += ['-lresolv']
++ elif CONFIG['OS_ARCH'] == 'WINNT':
+diff --git a/js/src/wasm/cranelift/build.rs.1490948-4.later b/js/src/wasm/cranelift/build.rs.1490948-4.later
+new file mode 100644
+--- /dev/null
++++ b/js/src/wasm/cranelift/build.rs.1490948-4.later
+@@ -0,0 +1,122 @@
++--- build.rs
+++++ build.rs
++@@ -17,36 +17,116 @@
++ //! Build script for the Baldr <-> Cranelift bindings.
++ //!
++ //! This file is executed by cargo when this crate is built. It generates the
++ //! `$OUT_DIR/bindings.rs` file which is then included by `src/baldrapi.rs`.
++ 
++ extern crate bindgen;
++ 
++ use std::env;
+++use std::fs::File;
+++use std::io::prelude::*;
++ use std::path::PathBuf;
++ 
+++enum Arch {
+++    X86,
+++    X64,
+++    Arm,
+++    Aarch64
+++}
+++
++ fn main() {
++     // Tell Cargo to regenerate the bindings if the header file changes.
++     println!("cargo:rerun-if-changed=baldrapi.h");
++ 
++-    let bindings = bindgen::builder()
+++    let mut bindings = bindgen::builder()
++         .disable_name_namespacing()
++         // We whitelist the Baldr C functions and get the associated types for free.
++         .whitelist_function("env_.*")
++         .whitelist_function("global_.*")
++         .whitelist_function("table_.*")
++         .whitelist_function("funcType_.*")
++         .whitelist_type("Cranelift.*")
++         // The enum classes defined in baldrapi.h and WasmBinaryConstants are all Rust-safe.
++         .rustified_enum("BD_.*|Trap|TypeCode|FuncTypeIdDescKind")
++         .whitelist_type("BD_.*|Trap|TypeCode|FuncTypeIdDescKind")
++         .header("baldrapi.h")
++-        .clang_args(&["-x", "c++", "-std=c++14"])
++-        .clang_arg("-I../..")
+++        .clang_args(&["-x", "c++", "-std=gnu++14", "-fno-sized-deallocation", "-DRUST_BINDGEN"])
+++        .clang_arg("-I../..");
+++
+++    let arch = {
+++        let target_arch = env::var("CARGO_CFG_TARGET_ARCH");
+++        match target_arch.as_ref().map(|x| x.as_str()) {
+++            Ok("aarch64") => Arch::Aarch64,
+++            Ok("arm") => Arch::Arm,
+++            Ok("x86") => Arch::X86,
+++            Ok("x86_64") => Arch::X64,
+++            _ => panic!("unknown arch")
+++        }
+++    };
+++
+++    match env::var("CARGO_CFG_TARGET_OS").as_ref().map(|x| x.as_str()) {
+++        Ok("android") => {
+++            bindings = bindings.clang_arg("-DOS_ANDROID=1");
+++            bindings = match arch {
+++                Arch::Aarch64 => { bindings.clang_arg("--target=aarch64-linux-android") }
+++                Arch::Arm => { bindings.clang_arg("--target=armv7-linux-androideabi") }
+++                Arch::X86 => { bindings.clang_arg("--target=i686-linux-android") }
+++                Arch::X64 => { bindings.clang_arg("--target=x86_64-linux-android") }
+++            };
+++        }
+++        Ok("linux") | Ok("freebsd") | Ok("dragonfly") | Ok("openbsd") | Ok("bitrig") | Ok("netbsd")
+++            | Ok("macos") | Ok("ios") => {
+++            // Nothing to do in particular for these OSes, until proven the contrary.
+++        }
+++        Ok("windows") => {
+++            bindings = bindings.clang_arg("-DOS_WIN=1")
+++                .clang_arg("-DWIN32=1");
+++            bindings = match env::var("CARGO_CFG_TARGET_ENV").as_ref().map(|x| x.as_str()) {
+++                Ok("msvc") => {
+++                    bindings = bindings.clang_arg("-fms-compatibility-version=19");
+++                    bindings = bindings.clang_arg("-D_CRT_USE_BUILTIN_OFFSETOF");
+++                    bindings = bindings.clang_arg("-DHAVE_VISIBILITY_HIDDEN_ATTRIBUTE=1");
+++                    match arch {
+++                        Arch::X86 => { bindings.clang_arg("--target=i686-pc-win32") },
+++                        Arch::X64 => { bindings.clang_arg("--target=x86_64-pc-win32") },
+++                        Arch::Aarch64 => { bindings.clang_arg("--target=aarch64-pc-windows-msvc") }
+++                        _ => panic!("unknown Windows architecture for msvc build")
+++                    }
+++                }
+++                Ok("gnu") => {
+++                    match arch {
+++                        Arch::X86 => { bindings.clang_arg("--target=i686-pc-mingw32") },
+++                        Arch::X64 => { bindings.clang_arg("--target=x86_64-w64-mingw32") },
+++                        _ => panic!("unknown Windows architecture for gnu build")
+++                    }
+++                }
+++                _ => panic!("unknown Windows build environment")
+++            };
+++        }
+++        os => panic!("unknown target os {:?}!", os)
+++    }
+++
+++    let path = PathBuf::from(env::var_os("MOZ_TOPOBJDIR").unwrap()).join("js/src/rust/extra-bindgen-flags");
+++
+++    let mut extra_flags = String::new();
+++        File::open(&path)
+++            .expect("Failed to open extra-bindgen-flags file")
+++            .read_to_string(&mut extra_flags)
+++            .expect("Failed to read extra-bindgen-flags file");
+++
+++    let display_path = path.to_str().expect("path is utf8 encoded");
+++    println!("cargo:rerun-if-changed={}", display_path);
+++
+++    let extra_flags: Vec<String> = extra_flags.split_whitespace().map(|s| s.to_owned()).collect();
+++    for flag in extra_flags {
+++        bindings = bindings.clang_arg(flag);
+++    }
+++
+++    let bindings = bindings
++         .generate()
++         .expect("Unable to generate baldrapi.h bindings");
++ 
++     // Write the bindings to the $OUT_DIR/bindings.rs file.
++     let out_path = PathBuf::from(env::var("OUT_DIR").unwrap());
++     bindings
++         .write_to_file(out_path.join("bindings.rs"))
++         .expect("Couldn't write bindings!");
+diff --git a/layout/style/bindgen.toml.in b/layout/style/bindgen.toml.in
+--- a/layout/style/bindgen.toml.in
++++ b/layout/style/bindgen.toml.in
+@@ -1,4 +1,4 @@
+ [build]
+ args = [
+-    @BINDGEN_SYSTEM_FLAGS@
++    @BINDGEN_SYSTEM_TOML_FLAGS@
+ ]
+diff --git a/old-configure.in b/old-configure.in
+--- a/old-configure.in
++++ b/old-configure.in
+@@ -3692,17 +3692,19 @@ esac
+ 
+ AC_SUBST(MOZ_TREE_CAIRO)
+ AC_SUBST_LIST(MOZ_CAIRO_CFLAGS)
+ AC_SUBST_LIST(MOZ_CAIRO_LIBS)
+ AC_SUBST_LIST(MOZ_CAIRO_OSLIBS)
+ AC_SUBST(MOZ_TREE_PIXMAN)
+ 
+ BINDGEN_SYSTEM_FLAGS="$_BINDGEN_CFLAGS $NSPR_CFLAGS $NSS_CFLAGS $MOZ_PIXMAN_CFLAGS $MOZ_CAIRO_CFLAGS"
+-AC_SUBST_TOML_LIST(BINDGEN_SYSTEM_FLAGS)
++AC_SUBST(BINDGEN_SYSTEM_FLAGS)
++BINDGEN_SYSTEM_TOML_FLAGS="$BINDGEN_SYSTEM_FLAGS"
++AC_SUBST_TOML_LIST(BINDGEN_SYSTEM_TOML_FLAGS)
+ 
+ dnl ========================================================
+ dnl disable xul
+ dnl ========================================================
+ MOZ_ARG_DISABLE_BOOL(xul,
+ [  --disable-xul           Disable XUL],
+     MOZ_XUL= )
+ if test "$MOZ_XUL"; then

+ 18 - 11
mozilla-release/patches/1491419-1-64a1.patch

@@ -2,7 +2,7 @@
 # User Nathan Froyd <froydnj@mozilla.com>
 # Date 1538419888 14400
 # Node ID 2a985dd40eba10801b2da141d1e8966b2ec060a5
-# Parent  1cc3e51fe4f7bdeaff696109e4d281442ec8268c
+# Parent  6d08503f33fba87a6b8f1fdab6c57f970d9f18c1
 Bug 1491419 - move --enable-maintenance-service to moz.configure; r=nalexander
 
 diff --git a/browser/confvars.sh b/browser/confvars.sh
@@ -50,7 +50,7 @@ diff --git a/build/moz.configure/old.configure b/build/moz.configure/old.configu
 diff --git a/old-configure.in b/old-configure.in
 --- a/old-configure.in
 +++ b/old-configure.in
-@@ -2918,33 +2918,16 @@ if test -n "$MOZ_TREE_FREETYPE" -a "$OS_
+@@ -2920,33 +2920,16 @@ if test -n "$MOZ_TREE_FREETYPE" -a "$OS_
     CAIRO_FT_CFLAGS="-I$_topsrcdir/modules/freetype2/include"
     AC_SUBST_LIST(CAIRO_FT_CFLAGS)
  fi
@@ -84,7 +84,7 @@ diff --git a/old-configure.in b/old-configure.in
      MOZ_BUNDLED_FONTS=1,
      MOZ_BUNDLED_FONTS=)
  
-@@ -3773,17 +3756,16 @@ AC_SUBST(MOZ_TOOLKIT_SEARCH)
+@@ -3788,17 +3771,16 @@ AC_SUBST(MOZ_TOOLKIT_SEARCH)
  AC_SUBST(MOZ_FEEDS)
  
  AC_SUBST(MOZ_UNIVERSALCHARDET)
@@ -105,16 +105,15 @@ diff --git a/old-configure.in b/old-configure.in
 diff --git a/toolkit/moz.configure b/toolkit/moz.configure
 --- a/toolkit/moz.configure
 +++ b/toolkit/moz.configure
-@@ -1093,8 +1093,21 @@ set_config('MOZ_UNSIGNED_SYSTEM_SCOPE', 
+@@ -1086,15 +1086,28 @@ def unsigned_addon_scopes(scopes):
+     return namespace(
+         app='app' in scopes or None,
+         system='system' in scopes or None,
+     )
  
- # Alternative Crashreporter setting
- option("--with-crashreporter-url", env="MOZ_CRASHREPORTER_URL",
-        default="https://crash-reports.mozilla.com/", nargs=1,
-        help="Set an alternative crashreporter url")
+ set_config('MOZ_UNSIGNED_APP_SCOPE', unsigned_addon_scopes.app)
+ set_config('MOZ_UNSIGNED_SYSTEM_SCOPE', unsigned_addon_scopes.system)
  
- set_config("MOZ_CRASHREPORTER_URL",
-            depends("--with-crashreporter-url")(lambda x: x[0].rstrip("/")))
-+
 +# Maintenance service (Windows only)
 +# ==============================================================
 +
@@ -127,3 +126,11 @@ diff --git a/toolkit/moz.configure b/toolkit/moz.configure
 +set_config('MOZ_MAINTENANCE_SERVICE',
 +           depends_if('--enable-maintenance-service',
 +                      when=target_is_windows)(lambda _: True))
++
+ # Alternative Crashreporter setting
+ option("--with-crashreporter-url", env="MOZ_CRASHREPORTER_URL",
+        default="https://crash-reports.mozilla.com/", nargs=1,
+        help="Set an alternative crashreporter url")
+ 
+ set_config("MOZ_CRASHREPORTER_URL",
+            depends("--with-crashreporter-url")(lambda x: x[0].rstrip("/")))

+ 12 - 5
mozilla-release/patches/1491419-2-64a1.patch

@@ -2,7 +2,7 @@
 # User Nathan Froyd <froydnj@mozilla.com>
 # Date 1538419888 14400
 # Node ID 61ab6941b46309f804ae444b42b2f705d44142d4
-# Parent  c3e671863a15552da31870c83d53f834272dd9d2
+# Parent  8e487e066df9888c0142ac52a9101fddb8b47ab8
 Bug 1491419 - move --enable-bundled-fonts to moz.configure; r=nalexander
 
 diff --git a/browser/confvars.sh b/browser/confvars.sh
@@ -54,7 +54,7 @@ diff --git a/build/moz.configure/old.configure b/build/moz.configure/old.configu
 diff --git a/old-configure.in b/old-configure.in
 --- a/old-configure.in
 +++ b/old-configure.in
-@@ -2918,29 +2918,16 @@ if test -n "$MOZ_TREE_FREETYPE" -a "$OS_
+@@ -2920,29 +2920,16 @@ if test -n "$MOZ_TREE_FREETYPE" -a "$OS_
     CAIRO_FT_CFLAGS="-I$_topsrcdir/modules/freetype2/include"
     AC_SUBST_LIST(CAIRO_FT_CFLAGS)
  fi
@@ -87,8 +87,7 @@ diff --git a/old-configure.in b/old-configure.in
 diff --git a/toolkit/moz.configure b/toolkit/moz.configure
 --- a/toolkit/moz.configure
 +++ b/toolkit/moz.configure
-@@ -1106,8 +1106,26 @@ option('--enable-maintenance-service', h
-        when=target_is_windows, default=target_is_windows)
+@@ -1099,15 +1099,33 @@ option('--enable-maintenance-service', h
  
  set_define('MOZ_MAINTENANCE_SERVICE',
             depends_if('--enable-maintenance-service',
@@ -96,7 +95,7 @@ diff --git a/toolkit/moz.configure b/toolkit/moz.configure
  set_config('MOZ_MAINTENANCE_SERVICE',
             depends_if('--enable-maintenance-service',
                        when=target_is_windows)(lambda _: True))
-+
+ 
 +# Bundled fonts on desktop platform
 +# ==============================================================
 +
@@ -114,3 +113,11 @@ diff --git a/toolkit/moz.configure b/toolkit/moz.configure
 +
 +set_define('MOZ_BUNDLED_FONTS',
 +           depends_if('--enable-bundled-fonts', when=allow_bundled_fonts)(lambda _: True))
++
+ # Alternative Crashreporter setting
+ option("--with-crashreporter-url", env="MOZ_CRASHREPORTER_URL",
+        default="https://crash-reports.mozilla.com/", nargs=1,
+        help="Set an alternative crashreporter url")
+ 
+ set_config("MOZ_CRASHREPORTER_URL",
+            depends("--with-crashreporter-url")(lambda x: x[0].rstrip("/")))

+ 13 - 6
mozilla-release/patches/1491419-3-64a1.patch

@@ -2,7 +2,7 @@
 # User Nathan Froyd <froydnj@mozilla.com>
 # Date 1538419888 14400
 # Node ID 4a6d50bdd4918c60974a18276122ae9ac39c4c4e
-# Parent  870a12c4b7e126a869d6d60997d0a1c52f2f92c3
+# Parent  1fcf72c20c7d924617be46160fb1d5d7b84adc0a
 Bug 1491419 - move --enable-verify-mar to moz.configure; r=nalexander
 
 diff --git a/build/moz.configure/old.configure b/build/moz.configure/old.configure
@@ -29,7 +29,7 @@ diff --git a/build/moz.configure/old.configure b/build/moz.configure/old.configu
 diff --git a/old-configure.in b/old-configure.in
 --- a/old-configure.in
 +++ b/old-configure.in
-@@ -2918,29 +2918,16 @@ if test -n "$MOZ_TREE_FREETYPE" -a "$OS_
+@@ -2920,29 +2920,16 @@ if test -n "$MOZ_TREE_FREETYPE" -a "$OS_
     CAIRO_FT_CFLAGS="-I$_topsrcdir/modules/freetype2/include"
     AC_SUBST_LIST(CAIRO_FT_CFLAGS)
  fi
@@ -59,7 +59,7 @@ diff --git a/old-configure.in b/old-configure.in
  dnl ========================================================
  
  MOZ_ARG_ENABLE_BOOL(signmar,
-@@ -3744,17 +3731,16 @@ AC_SUBST(MOZ_FEEDS)
+@@ -3759,17 +3746,16 @@ AC_SUBST(MOZ_FEEDS)
  
  AC_SUBST(MOZ_UNIVERSALCHARDET)
  AC_SUBST(ACCESSIBILITY)
@@ -80,8 +80,7 @@ diff --git a/old-configure.in b/old-configure.in
 diff --git a/toolkit/moz.configure b/toolkit/moz.configure
 --- a/toolkit/moz.configure
 +++ b/toolkit/moz.configure
-@@ -1124,8 +1124,18 @@ def allow_bundled_fonts(project):
-     return project == 'browser'
+@@ -1117,15 +1117,25 @@ def allow_bundled_fonts(project):
  
  option('--enable-bundled-fonts', default=bundled_fonts_default,
         when=allow_bundled_fonts,
@@ -89,7 +88,7 @@ diff --git a/toolkit/moz.configure b/toolkit/moz.configure
  
  set_define('MOZ_BUNDLED_FONTS',
             depends_if('--enable-bundled-fonts', when=allow_bundled_fonts)(lambda _: True))
-+
+ 
 +# Verify MAR signatures
 +# ==============================================================
 +
@@ -99,3 +98,11 @@ diff --git a/toolkit/moz.configure b/toolkit/moz.configure
 +           depends_if('--enable-verify-mar')(lambda _: True))
 +set_config('MOZ_VERIFY_MAR_SIGNATURE',
 +           depends_if('--enable-verify-mar')(lambda _: True))
++
+ # Alternative Crashreporter setting
+ option("--with-crashreporter-url", env="MOZ_CRASHREPORTER_URL",
+        default="https://crash-reports.mozilla.com/", nargs=1,
+        help="Set an alternative crashreporter url")
+ 
+ set_config("MOZ_CRASHREPORTER_URL",
+            depends("--with-crashreporter-url")(lambda x: x[0].rstrip("/")))

+ 13 - 6
mozilla-release/patches/1491419-8-64a1.patch

@@ -2,13 +2,13 @@
 # User Nathan Froyd <froydnj@mozilla.com>
 # Date 1538419887 14400
 # Node ID b257f734506bb147b64e7a443fd54609bbf343a3
-# Parent  6df763c48defc461a2d111fc9c8b31d7c55ebe6b
+# Parent  1fce80e43747d9ceaaa4e7997911ff8ddf8405be
 Bug 1491419 - move --enable-tasktracer to moz.configure; r=nalexander
 
 diff --git a/build/moz.configure/old.configure b/build/moz.configure/old.configure
 --- a/build/moz.configure/old.configure
 +++ b/build/moz.configure/old.configure
-@@ -203,17 +203,16 @@ def old_configure_options(*options):
+@@ -204,17 +204,16 @@ def old_configure_options(*options):
      '--enable-signmar',
      '--enable-startup-notification',
      '--enable-startupcache',
@@ -29,7 +29,7 @@ diff --git a/build/moz.configure/old.configure b/build/moz.configure/old.configu
 diff --git a/old-configure.in b/old-configure.in
 --- a/old-configure.in
 +++ b/old-configure.in
-@@ -3183,28 +3183,16 @@ AC_SUBST(DEBUG_JS_MODULES)
+@@ -3258,28 +3258,16 @@ AC_SUBST(DEBUG_JS_MODULES)
  dnl ========================================================
  dnl =
  dnl = Profiling and Instrumenting
@@ -61,8 +61,7 @@ diff --git a/old-configure.in b/old-configure.in
 diff --git a/toolkit/moz.configure b/toolkit/moz.configure
 --- a/toolkit/moz.configure
 +++ b/toolkit/moz.configure
-@@ -1220,8 +1220,16 @@ set_define('MOZ_BUNDLED_FONTS',
- # ==============================================================
+@@ -1155,15 +1155,23 @@ set_define('MOZ_BUNDLED_FONTS',
  
  option('--enable-verify-mar', help='Enable verifying MAR signatures')
  
@@ -70,7 +69,7 @@ diff --git a/toolkit/moz.configure b/toolkit/moz.configure
             depends_if('--enable-verify-mar')(lambda _: True))
  set_config('MOZ_VERIFY_MAR_SIGNATURE',
             depends_if('--enable-verify-mar')(lambda _: True))
-+
+ 
 +# TaskTracer
 +# ==============================================================
 +
@@ -78,3 +77,11 @@ diff --git a/toolkit/moz.configure b/toolkit/moz.configure
 +
 +set_define('MOZ_TASK_TRACER', depends_if('--enable-tasktracer')(lambda _: True))
 +set_config('MOZ_TASK_TRACER', depends_if('--enable-tasktracer')(lambda _: True))
++
+ # Alternative Crashreporter setting
+ option("--with-crashreporter-url", env="MOZ_CRASHREPORTER_URL",
+        default="https://crash-reports.mozilla.com/", nargs=1,
+        help="Set an alternative crashreporter url")
+ 
+ set_config("MOZ_CRASHREPORTER_URL",
+            depends("--with-crashreporter-url")(lambda x: x[0].rstrip("/")))

+ 15 - 8
mozilla-release/patches/1491419-9-64a1.patch

@@ -2,13 +2,13 @@
 # User Nathan Froyd <froydnj@mozilla.com>
 # Date 1538419887 14400
 # Node ID c6e9cfc12ec521a0ce9d29fe70c422534ff27145
-# Parent  a257120ddc90ff3edee5725c316345e2f81f3fdd
+# Parent  878d501475f916b582758aafbf1050eac245c981
 Bug 1491419 - move --enable-reflow-perf to moz.configure; r=nalexander
 
 diff --git a/build/moz.configure/old.configure b/build/moz.configure/old.configure
 --- a/build/moz.configure/old.configure
 +++ b/build/moz.configure/old.configure
-@@ -193,17 +193,16 @@ def old_configure_options(*options):
+@@ -194,17 +194,16 @@ def old_configure_options(*options):
      '--enable-negotiateauth',
      '--enable-nfc',
      '--enable-nspr-build',
@@ -29,7 +29,7 @@ diff --git a/build/moz.configure/old.configure b/build/moz.configure/old.configu
 diff --git a/old-configure.in b/old-configure.in
 --- a/old-configure.in
 +++ b/old-configure.in
-@@ -1842,17 +1842,16 @@ MOZ_AUTH_EXTENSION=1
+@@ -1876,17 +1876,16 @@ MOZ_AUTH_EXTENSION=1
  VPX_USE_YASM=
  VPX_ASFLAGS=
  VPX_AS_CONVERSION=
@@ -47,7 +47,7 @@ diff --git a/old-configure.in b/old-configure.in
  MOZ_NO_SMART_CARDS=
  NECKO_COOKIES=1
  MOZ_USE_NATIVE_POPUP_WINDOWS=
-@@ -3183,27 +3182,16 @@ AC_SUBST(DEBUG_JS_MODULES)
+@@ -3258,27 +3257,16 @@ AC_SUBST(DEBUG_JS_MODULES)
  dnl ========================================================
  dnl =
  dnl = Profiling and Instrumenting
@@ -75,7 +75,7 @@ diff --git a/old-configure.in b/old-configure.in
  [  --enable-startupcache          Enable startup cache ],
      MOZ_DISABLE_STARTUPCACHE=,)
  
-@@ -4013,21 +4001,16 @@ if test "$MOZ_X11"; then
+@@ -4094,21 +4082,16 @@ if test "$MOZ_X11"; then
  
  fi # MOZ_X11
  
@@ -100,8 +100,7 @@ diff --git a/old-configure.in b/old-configure.in
 diff --git a/toolkit/moz.configure b/toolkit/moz.configure
 --- a/toolkit/moz.configure
 +++ b/toolkit/moz.configure
-@@ -1228,8 +1228,24 @@ set_config('MOZ_VERIFY_MAR_SIGNATURE',
- 
+@@ -1163,15 +1163,31 @@ set_config('MOZ_VERIFY_MAR_SIGNATURE',
  # TaskTracer
  # ==============================================================
  
@@ -109,7 +108,7 @@ diff --git a/toolkit/moz.configure b/toolkit/moz.configure
  
  set_define('MOZ_TASK_TRACER', depends_if('--enable-tasktracer')(lambda _: True))
  set_config('MOZ_TASK_TRACER', depends_if('--enable-tasktracer')(lambda _: True))
-+
+ 
 +# Reflow counting
 +# ==============================================================
 +
@@ -125,3 +124,11 @@ diff --git a/toolkit/moz.configure b/toolkit/moz.configure
 +# in old-configure, which was unexplained there as well.
 +set_define('MOZ_REFLOW_PERF', depends_if('--enable-reflow-perf')(lambda _: True))
 +set_define('MOZ_REFLOW_PERF_DSP', reflow_perf)
++
+ # Alternative Crashreporter setting
+ option("--with-crashreporter-url", env="MOZ_CRASHREPORTER_URL",
+        default="https://crash-reports.mozilla.com/", nargs=1,
+        help="Set an alternative crashreporter url")
+ 
+ set_config("MOZ_CRASHREPORTER_URL",
+            depends("--with-crashreporter-url")(lambda x: x[0].rstrip("/")))

+ 58 - 0
mozilla-release/patches/1492716-1-65a1.patch

@@ -0,0 +1,58 @@
+# HG changeset patch
+# User Tooru Fujisawa <arai_a@mac.com>
+# Date 1539689292 -32400
+# Node ID 86217b31f832d3033916dfec6474ef5d673e218d
+# Parent  e6dac3ed2e65e8f00b204091407a204a464b24d0
+Bug 1492716 - Part 1: Stop using default=True for --enable-* or --with-* configure options. r=glandium
+
+Differential Revision: https://phabricator.services.mozilla.com/D8833
+
+diff --git a/build/moz.configure/toolchain.configure b/build/moz.configure/toolchain.configure
+--- a/build/moz.configure/toolchain.configure
++++ b/build/moz.configure/toolchain.configure
+@@ -26,20 +26,19 @@ set_config('DEVELOPER_OPTIONS', develope
+ js_option(env='MOZ_PGO', help='Build with profile guided optimizations')
+ 
+ set_config('MOZ_PGO', depends('MOZ_PGO')(lambda x: bool(x)))
+ add_old_configure_assignment('MOZ_PGO', depends('MOZ_PGO')(lambda x: bool(x)))
+ 
+ # Code optimization
+ # ==============================================================
+ 
+-js_option('--enable-optimize',
++js_option('--disable-optimize',
+           nargs='?',
+-          default=True,
+-          help='Enable optimizations via compiler flags')
++          help='Disable optimizations via compiler flags')
+ 
+ 
+ @depends('--enable-optimize')
+ def moz_optimize(option):
+     flags = None
+ 
+     if len(option):
+         val = '2'
+@@ -1169,20 +1168,19 @@ def default_debug_flags(compiler_info):
+ 
+ option(env='MOZ_DEBUG_FLAGS',
+        nargs=1,
+        help='Debug compiler flags')
+ 
+ imply_option('--enable-debug-symbols',
+              depends_if('--enable-debug')(lambda v: v))
+ 
+-js_option('--enable-debug-symbols',
++js_option('--disable-debug-symbols',
+           nargs='?',
+-          default=True,
+-          help='Enable debug symbols using the given compiler flags')
++          help='Disable debug symbols using the given compiler flags')
+ 
+ set_config('MOZ_DEBUG_SYMBOLS',
+            depends_if('--enable-debug-symbols')(lambda _: True))
+ 
+ 
+ @depends('MOZ_DEBUG_FLAGS', '--enable-debug-symbols', default_debug_flags)
+ def debug_flags(env_debug_flags, enable_debug_flags, default_debug_flags):
+     # If MOZ_DEBUG_FLAGS is set, and --enable-debug-symbols is set to a value,

+ 556 - 0
mozilla-release/patches/1492716-2-65a1.patch

@@ -0,0 +1,556 @@
+# HG changeset patch
+# User Tooru Fujisawa <arai_a@mac.com>
+# Date 1539689292 -32400
+#      Tue Oct 16 20:28:12 2018 +0900
+# Node ID e22dc234a52fe16f8ce2ae86b1b63b86211c1572
+# Parent  220ff89833e8fe5bc65d6f85db1fff0cc4e3f8dd
+Bug 1492716 - Part 2: Add formatting rule to help text for --{enable,disable,with,without}. r=glandium
+
+Differential Revision: https://phabricator.services.mozilla.com/D8834
+
+diff --git a/build/moz.configure/warnings.configure b/build/moz.configure/warnings.configure
+--- a/build/moz.configure/warnings.configure
++++ b/build/moz.configure/warnings.configure
+@@ -1,17 +1,17 @@
+ # -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
+ # 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/.
+ 
+ js_option('--enable-warnings-as-errors', env='MOZ_ENABLE_WARNINGS_AS_ERRORS',
+           default=depends('MOZ_AUTOMATION', '--help')(lambda x, _: bool(x)),
+-          help='Enable treating warnings as errors')
++          help='{Enable|Disable} treating warnings as errors')
+ 
+ add_old_configure_assignment(
+     'MOZ_ENABLE_WARNINGS_AS_ERRORS',
+     depends('--enable-warnings-as-errors')(lambda x: bool(x)))
+ 
+ 
+ # GCC/Clang warnings:
+ # https://gcc.gnu.org/onlinedocs/gcc-4.7.2/gcc/Warning-Options.html
+diff --git a/js/moz.configure b/js/moz.configure
+--- a/js/moz.configure
++++ b/js/moz.configure
+@@ -24,17 +24,17 @@ include('../build/moz.configure/rust.con
+ @depends('JS_STANDALONE')
+ def js_standalone(value):
+     if value:
+         return True
+ set_config('JS_STANDALONE', js_standalone)
+ set_define('JS_STANDALONE', js_standalone)
+ add_old_configure_assignment('JS_STANDALONE', js_standalone)
+ js_option('--disable-js-shell', default=building_js,
+-          help='Do not build the JS shell')
++          help='{Build|Do not build} the JS shell')
+ 
+ @depends('--disable-js-shell')
+ def js_disable_shell(value):
+     if not value:
+         return True
+ 
+ set_config('JS_DISABLE_SHELL', js_disable_shell)
+ 
+@@ -42,20 +42,20 @@ set_define('JS_64BIT', depends(target)(l
+ 
+ set_define('JS_PUNBOX64', depends(target)(lambda t: t.bitness == 64 or None))
+ set_define('JS_NUNBOX32', depends(target)(lambda t: t.bitness == 32 or None))
+ 
+ 
+ # SpiderMonkey as a shared library, and how its symbols are exported
+ # ==================================================================
+ js_option('--disable-shared-js', default=building_js,
+-          help='Do not create a shared library')
++          help='{Create|Do not create} a shared library')
+ 
+ js_option('--disable-export-js', default=building_js,
+-          help='Do not mark JS symbols as DLL exported/visible')
++          help='{Mark|Do not mark} JS symbols as DLL exported/visible')
+ 
+ @depends('--disable-shared-js', '--disable-export-js')
+ def shared_js(shared_js, export_js):
+     if shared_js:
+         if not export_js:
+             die('Must export JS symbols when building a shared library.')
+         return True
+ 
+@@ -110,17 +110,17 @@ def disable_export_js(value):
+ # =======================================================
+ @depends(target)
+ def ion_default(target):
+     if target.cpu in ('x86', 'x86_64', 'arm', 'aarch64', 'mips32', 'mips64'):
+         return True
+ 
+ js_option('--enable-ion',
+           default=ion_default,
+-          help='Enable use of the IonMonkey JIT')
++          help='{Enable|Disable} use of the IonMonkey JIT')
+ 
+ set_config('ENABLE_ION', depends_if('--enable-ion')(lambda x: True))
+ 
+ # JIT code simulator for cross compiles
+ # =======================================================
+ js_option('--enable-simulator', choices=('arm', 'arm64', 'mips32', 'mips64'),
+           nargs=1,
+           help='Enable a JIT code simulator for the specified architecture')
+@@ -242,18 +242,18 @@ def callgrind(value):
+ set_define('MOZ_CALLGRIND', callgrind)
+ imply_option('--enable-profiling', callgrind)
+ 
+ @depends(milestone, '--help')
+ def enable_profiling(milestone, help):
+     return milestone.is_nightly
+ 
+ js_option('--enable-profiling', env='MOZ_PROFILING', default=enable_profiling,
+-          help='Set compile flags necessary for using sampling profilers '
+-               '(e.g. shark, perf)')
++          help='{Set|Do not set} compile flags necessary for using sampling '
++                'profilers (e.g. shark, perf)')
+ 
+ @depends('--enable-profiling')
+ def profiling(value):
+     if value:
+         return True
+ 
+ add_old_configure_assignment('MOZ_PROFILING', profiling)
+ 
+@@ -290,17 +290,17 @@ def gc_trace(value):
+     if value:
+         return True
+ 
+ set_define('JS_GC_TRACE', gc_trace)
+ 
+ 
+ js_option('--enable-gczeal',
+           default=depends(when=moz_debug)(lambda: True),
+-          help='Enable zealous GCing')
++          help='{Enable|Disable} zealous GCing')
+ 
+ set_define('JS_GC_ZEAL',
+            depends_if('--enable-gczeal')(lambda _: True))
+ 
+ 
+ # Use a smaller chunk size for GC chunks
+ # ========================================================
+ # Use large (1MB) chunks by default.  This option can be used to give
+@@ -311,17 +311,17 @@ js_option('--enable-small-chunk-size',
+ set_define('JS_GC_SMALL_CHUNK_SIZE',
+            depends(when='--enable-small-chunk-size')(lambda: True))
+ 
+ 
+ # Trace logging.
+ # =======================================================
+ js_option('--enable-trace-logging',
+           default=depends(when=moz_debug)(lambda: True),
+-          help='Enable trace logging')
++          help='{Enable|Disable} trace logging')
+ 
+ set_config('ENABLE_TRACE_LOGGING',
+            depends_if('--enable-trace-logging')(lambda x: True))
+ set_define('JS_TRACE_LOGGING',
+            depends_if('--enable-trace-logging')(lambda x: True))
+ 
+ 
+ # Enable breakpoint for artificial OOMs
+@@ -341,17 +341,18 @@ def ion_perf(value):
+     if value:
+         return True
+ 
+ set_define('JS_ION_PERF', ion_perf)
+ 
+ 
+ js_option('--enable-jitspew',
+           default=depends(when=moz_debug)(lambda: True),
+-          help='Enable the Jit spew and IONFLAGS environment variable.')
++          help='{Enable|Disable} the Jit spew and IONFLAGS environment '
++               'variable')
+ 
+ set_define('JS_JITSPEW',
+            depends_if('--enable-jitspew')(lambda _: True))
+ set_config('JS_JITSPEW',
+            depends_if('--enable-jitspew')(lambda _: True))
+ 
+ 
+ js_option('--enable-more-deterministic', env='JS_MORE_DETERMINISTIC',
+@@ -366,18 +367,19 @@ set_define('JS_MORE_DETERMINISTIC', more
+ 
+ 
+ # CTypes
+ # =======================================================
+ @depends(building_js, '--help')
+ def ctypes_default(building_js, _):
+     return not building_js
+ 
+-js_option('--enable-ctypes', help='Enable js-ctypes',
+-          default=ctypes_default)
++js_option('--enable-ctypes',
++          default=ctypes_default,
++          help='{Enable|Disable} js-ctypes')
+ 
+ build_ctypes = depends_if('--enable-ctypes')(lambda _: True)
+ 
+ set_config('BUILD_CTYPES', build_ctypes)
+ set_define('BUILD_CTYPES', build_ctypes)
+ add_old_configure_assignment('BUILD_CTYPES', build_ctypes)
+ 
+ @depends(build_ctypes, building_js)
+diff --git a/js/moz.configure.1492716-2.later b/js/moz.configure.1492716-2.later
+new file mode 100644
+--- /dev/null
++++ b/js/moz.configure.1492716-2.later
+@@ -0,0 +1,34 @@
++--- moz.configure
+++++ moz.configure
++@@ -357,30 +357,31 @@ def ion_perf(value):
++ 
++ # When enabled, masm will generate assumeUnreachable calls that act as
++ # assertions in the generated code. This option is worth disabling when you
++ # have to track mutated values through the generated code, to avoid constantly
++ # dumping registers on and off the stack.
++ js_option('--enable-masm-verbose',
++           default=depends(when=moz_debug)(lambda: True),
++-          help='Enable MacroAssembler verbosity of generated code.')
+++          help='{Enable|Disable} MacroAssembler verbosity of generated code.')
++ set_define('JS_MASM_VERBOSE',
++            depends_if('--enable-masm-verbose')(lambda _: True))
++ set_config('JS_MASM_VERBOSE',
++            depends_if('--enable-masm-verbose')(lambda _: True))
++ 
++ 
++ js_option('--enable-more-deterministic', env='JS_MORE_DETERMINISTIC',
++           help='Enable changes that make the shell more deterministic')
++@@ -485,12 +487,12 @@ set_define('ENABLE_PIPELINE_OPERATOR', e
++ @depends(milestone.is_nightly)
++ def default_cranelift(is_nightly):
++     # return is_nightly
++     # Lets test it first
++     return False
++ 
++ js_option('--enable-cranelift',
++           default=default_cranelift,
++-          help='Enable Cranelift code generator for wasm')
+++          help='{Enable|Disable} Cranelift code generator for wasm')
++ 
++ set_config('ENABLE_WASM_CRANELIFT', depends_if('--enable-cranelift')(lambda x: True))
++ set_define('ENABLE_WASM_CRANELIFT', depends_if('--enable-cranelift')(lambda x: True))
+diff --git a/moz.configure b/moz.configure
+--- a/moz.configure
++++ b/moz.configure
+@@ -109,17 +109,18 @@ def moz_debug(debug):
+ set_config('MOZ_DEBUG', moz_debug)
+ set_define('MOZ_DEBUG', moz_debug)
+ # Override any value MOZ_DEBUG may have from the environment when passing it
+ # down to old-configure.
+ add_old_configure_assignment('MOZ_DEBUG',
+                              depends('--enable-debug')(lambda x: bool(x)))
+ 
+ js_option('--enable-rust-debug',
+-          help='Build Rust code with debug assertions turned on.')
++          help='{Build|Do not build} Rust code with debug assertions turned '
++               'on.')
+ 
+ @depends('--enable-rust-debug', '--enable-debug')
+ def debug_rust(value, debug):
+     if value.origin == 'default':
+         return bool(debug) or None
+     elif bool(value):
+         return True
+ 
+diff --git a/python/mozbuild/mozbuild/configure/help.py b/python/mozbuild/mozbuild/configure/help.py
+--- a/python/mozbuild/mozbuild/configure/help.py
++++ b/python/mozbuild/mozbuild/configure/help.py
+@@ -1,15 +1,16 @@
+ # 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/.
+ 
+ from __future__ import absolute_import, print_function, unicode_literals
+ 
+ import os
++import re
+ from mozbuild.configure.options import Option
+ 
+ 
+ class HelpFormatter(object):
+     def __init__(self, argv0):
+         self.intro = ['Usage: %s [options]' % os.path.basename(argv0)]
+         self.options = ['Options: [defaults in brackets after descriptions]']
+         self.env = ['Environment variables:']
+@@ -21,25 +22,49 @@ class HelpFormatter(object):
+             # Don't display help if our option can only be implied.
+             return
+ 
+         # TODO: improve formatting
+         target = self.options if option.name else self.env
+         opt = option.option
+         if option.choices:
+             opt += '={%s}' % ','.join(option.choices)
+-        help = option.help or ''
++        help = self.format_help(option)
+         if len(option.default):
+             if help:
+                 help += ' '
+             help += '[%s]' % ','.join(option.default)
+ 
+         if len(opt) > 24 or not help:
+             target.append('  %s' % opt)
+             if help:
+                 target.append('%s%s' % (' ' * 28, help))
+         else:
+             target.append('  %-24s  %s' % (opt, help))
+ 
++    RE_FORMAT = re.compile(r'{([^|}]+)\|([^|}]+)}')
++
++    # Return formatted help text for --{enable,disable,with,without}-* options.
++    #
++    # Format is the following syntax:
++    #   {String for --enable or --with|String for --disable or --without}
++    #
++    # For example, '{Enable|Disable} optimizations' will be formatted to
++    # 'Enable optimizations' if the options's prefix is 'enable' or 'with',
++    # and formatted to 'Disable optimizations' if the options's prefix is
++    # 'disable' or 'without'.
++    def format_help(self, option):
++        if not option.help:
++            return ''
++
++        if option.prefix in ('enable', 'with'):
++            replacement = r'\1'
++        elif option.prefix in ('disable', 'without'):
++            replacement = r'\2'
++        else:
++            return option.help
++
++        return self.RE_FORMAT.sub(replacement, option.help)
++
+     def usage(self, out):
+         print('\n\n'.join('\n'.join(t)
+                           for t in (self.intro, self.options, self.env)),
+               file=out)
+diff --git a/toolkit/moz.configure b/toolkit/moz.configure
+--- a/toolkit/moz.configure
++++ b/toolkit/moz.configure
+@@ -77,17 +77,17 @@ set_define('MOZ_JACK', depends_if(jack)(
+ 
+ # PulseAudio cubeb backend
+ # ==============================================================
+ @depends(target)
+ def pulseaudio_default(target):
+     return target.os not in ('WINNT', 'OSX', 'Android', 'OpenBSD')
+ 
+ option('--enable-pulseaudio', env='MOZ_PULSEAUDIO', default=pulseaudio_default,
+-       help='Enable PulseAudio audio backend.')
++       help='{Enable|Disable} PulseAudio audio backend.')
+ 
+ pulseaudio = pkg_check_modules('MOZ_PULSEAUDIO', 'libpulse', when='--enable-pulseaudio')
+ 
+ set_config('MOZ_PULSEAUDIO', depends_if(pulseaudio)(lambda _: True))
+ set_define('MOZ_PULSEAUDIO', depends_if(pulseaudio)(lambda _: True))
+ 
+ # Javascript engine
+ # ==============================================================
+@@ -758,17 +758,17 @@ def webspeech(value, _):
+ 
+ set_config('MOZ_WEBSPEECH', webspeech)
+ set_define('MOZ_WEBSPEECH', webspeech)
+ add_old_configure_assignment('MOZ_WEBSPEECH', webspeech)
+ 
+ # Speech API test backend
+ # ==============================================================
+ option('--enable-webspeechtestbackend', default=webspeech,
+-       help='Enable support for HTML Speech API Test Backend')
++       help='{Enable|Disable} support for HTML Speech API Test Backend')
+ 
+ @depends_if('--enable-webspeechtestbackend')
+ def webspeech_test_backend(value):
+     return True
+ 
+ set_config('MOZ_WEBSPEECH_TEST_BACKEND', webspeech_test_backend)
+ set_define('MOZ_WEBSPEECH_TEST_BACKEND', webspeech_test_backend)
+ 
+@@ -1005,17 +1005,17 @@ def webrtc_default(target):
+         target.cpu.startswith('ppc')):
+         cpu_match = True
+ 
+     if os_match and cpu_match:
+         return True
+     return False
+ 
+ option('--disable-webrtc', default=webrtc_default,
+-       help='Disable support for WebRTC')
++       help='{Enable|Disable} support for WebRTC')
+ 
+ @depends('--disable-webrtc')
+ def webrtc(enabled):
+     if enabled:
+         return True
+ 
+ set_config('MOZ_WEBRTC', webrtc)
+ set_define('MOZ_WEBRTC', webrtc)
+@@ -1046,18 +1046,19 @@ set_define('MOZ_WEBRTC_HARDWARE_AEC_NS',
+ 
+ @depends(target, webrtc)
+ def raw_media_default(target, webrtc):
+     if target.os == 'Android':
+         return True
+     if webrtc:
+         return True
+ 
+-option('--enable-raw', help='Enable support for RAW media',
+-       default=raw_media_default)
++option('--enable-raw',
++       default=raw_media_default,
++       help='{Enable|Disable} support for RAW media')
+ 
+ set_config('MOZ_RAW', depends_if('--enable-raw')(lambda _: True))
+ set_define('MOZ_RAW', depends_if('--enable-raw')(lambda _: True))
+ 
+ # Elfhack
+ # ==============================================================
+ with only_when('--enable-compile-environment'):
+     @depends(host, target)
+@@ -1066,17 +1067,17 @@ with only_when('--enable-compile-environ
+                target.cpu in ('arm', 'x86', 'x86_64')
+ 
+     @depends('--enable-release')
+     def default_elfhack(release):
+         return bool(release)
+ 
+     with only_when(has_elfhack):
+         option('--disable-elf-hack', default=default_elfhack,
+-               help='Disable elf hacks')
++               help='{Enable|Disable} elf hacks')
+ 
+         set_config('USE_ELF_HACK',
+                    depends_if('--enable-elf-hack')(lambda _: True))
+ 
+ 
+ @depends(check_build_environment)
+ def idl_roots(build_env):
+     return namespace(ipdl_root=os.path.join(build_env.topobjdir, 'ipc', 'ipdl'),
+@@ -1175,18 +1176,19 @@ def unsigned_addon_scopes(scopes):
+     )
+ 
+ set_config('MOZ_UNSIGNED_APP_SCOPE', unsigned_addon_scopes.app)
+ set_config('MOZ_UNSIGNED_SYSTEM_SCOPE', unsigned_addon_scopes.system)
+ 
+ # Maintenance service (Windows only)
+ # ==============================================================
+ 
+-option('--enable-maintenance-service', help='Enable building of maintenance service',
+-       when=target_is_windows, default=target_is_windows)
++option('--enable-maintenance-service',
++       when=target_is_windows, default=target_is_windows,
++       help='{Enable|Disable} building of maintenance service')
+ 
+ set_define('MOZ_MAINTENANCE_SERVICE',
+            depends_if('--enable-maintenance-service',
+                       when=target_is_windows)(lambda _: True))
+ set_config('MOZ_MAINTENANCE_SERVICE',
+            depends_if('--enable-maintenance-service',
+                       when=target_is_windows)(lambda _: True))
+ 
+@@ -1198,17 +1200,17 @@ def bundled_fonts_default(target):
+     return target.os == 'WINNT' or target.kernel == 'Linux'
+ 
+ @depends(build_project)
+ def allow_bundled_fonts(project):
+     return project == 'browser'
+ 
+ option('--enable-bundled-fonts', default=bundled_fonts_default,
+        when=allow_bundled_fonts,
+-       help='Enable support for bundled fonts on desktop platforms')
++       help='{Enable|Disable} support for bundled fonts on desktop platforms')
+ 
+ set_define('MOZ_BUNDLED_FONTS',
+            depends_if('--enable-bundled-fonts', when=allow_bundled_fonts)(lambda _: True))
+ 
+ # Verify MAR signatures
+ # ==============================================================
+ 
+ option('--enable-verify-mar', help='Enable verifying MAR signatures')
+@@ -1229,18 +1231,19 @@ set_config('MOZ_TASK_TRACER', depends_if
+ # Reflow counting
+ # ==============================================================
+ 
+ @depends(moz_debug, '--help')
+ def reflow_perf(debug, _):
+     if debug:
+         return True
+ 
+-option('--enable-reflow-perf', help='Enable reflow performance tracing',
+-       default=reflow_perf)
++option('--enable-reflow-perf',
++       default=reflow_perf,
++       help='{Enable|Disable} reflow performance tracing')
+ 
+ # The difference in conditions here comes from the initial implementation
+ # in old-configure, which was unexplained there as well.
+ set_define('MOZ_REFLOW_PERF', depends_if('--enable-reflow-perf')(lambda _: True))
+ set_define('MOZ_REFLOW_PERF_DSP', reflow_perf)
+ 
+ # Alternative Crashreporter setting
+ option("--with-crashreporter-url", env="MOZ_CRASHREPORTER_URL",
+diff --git a/toolkit/moz.configure.1492716-2.later b/toolkit/moz.configure.1492716-2.later
+new file mode 100644
+--- /dev/null
++++ b/toolkit/moz.configure.1492716-2.later
+@@ -0,0 +1,40 @@
++--- moz.configure
+++++ moz.configure
++@@ -922,17 +922,17 @@ def geckodriver_default(enable_tests, ta
++     if target.os == 'WINNT' and target.cpu == 'aarch64':
++         return False
++     if hazard or target.os == 'Android' or (asan and cross_compile):
++         return False
++     return True
++ 
++ option('--enable-geckodriver', default=geckodriver_default,
++        when='--enable-compile-environment',
++-       help='Build geckodriver')
+++       help='{Build|Do not build} geckodriver')
++ 
++ @depends('--enable-geckodriver', when='--enable-compile-environment')
++ def geckodriver(enabled):
++     if enabled:
++         return True
++ 
++ set_config('ENABLE_GECKODRIVER', geckodriver)
++ 
++@@ -1156,17 +1157,17 @@ set_config('MOZ_UNSIGNED_SYSTEM_SCOPE', 
++ # Launcher process (Windows only)
++ # ==============================================================
++ 
++ @depends(target, milestone)
++ def launcher_process_default(target, milestone):
++     return target.os == 'WINNT' and milestone.is_nightly
++ 
++ option('--enable-launcher-process', default=launcher_process_default,
++-       help='Enable launcher process by default')
+++       help='{Enable|Disable} launcher process by default')
++ 
++ @depends('--enable-launcher-process', target)
++ def launcher(value, target):
++     enabled = bool(value)
++     if enabled and target.os != 'WINNT':
++         die('Cannot enable launcher process on %s', target.os)
++     if enabled:
++         return True
+diff --git a/toolkit/nss.configure b/toolkit/nss.configure
+--- a/toolkit/nss.configure
++++ b/toolkit/nss.configure
+@@ -6,11 +6,12 @@
+ 
+ 
+ # DBM support in NSS
+ # ==============================================================
+ @depends(build_project, '--help')
+ def dbm_default(build_project, _):
+     return build_project != 'mobile/android'
+ 
+-option('--enable-dbm', default=dbm_default, help='Enable building DBM')
++option('--enable-dbm', default=dbm_default,
++       help='{Enable|Disable} building DBM')
+ 
+ set_config('NSS_DISABLE_DBM', depends('--enable-dbm')(lambda x: not x))

+ 99 - 0
mozilla-release/patches/1492716-2_1-65a1.patch

@@ -0,0 +1,99 @@
+# HG changeset patch
+# User Tooru Fujisawa <arai_a@mac.com>
+# Date 1540371840 -32400
+# Node ID 561373eda70f3fafcbea47304fcdd106aba12a83
+# Parent  579209e7f3a4d8456d533d59efb22581ff5801bb
+Bug 1492716 - Part 2.1: Support empty string in help formatting rule and fixed some more cases. r=glandium
+
+Differential Revision: https://phabricator.services.mozilla.com/D9631
+
+diff --git a/build/moz.configure/android-ndk.configure b/build/moz.configure/android-ndk.configure
+--- a/build/moz.configure/android-ndk.configure
++++ b/build/moz.configure/android-ndk.configure
+@@ -17,17 +17,17 @@ def min_android_version(target):
+     if target.cpu in ['aarch64', 'x86_64', 'mips64']:
+         # 64-bit support was added in API 21.
+         return '21'
+     return '9'
+ 
+ 
+ js_option('--with-android-version',
+           nargs=1,
+-          help='android platform version',
++          help='android platform version{|}',
+           default=min_android_version)
+ 
+ 
+ @depends('--with-android-version', min_android_version, '--help')
+ @imports(_from='__builtin__', _import='ValueError')
+ def android_version(value, min_version, _):
+     if not value:
+         # Someone has passed --without-android-version.
+diff --git a/build/moz.configure/toolchain.configure b/build/moz.configure/toolchain.configure
+--- a/build/moz.configure/toolchain.configure
++++ b/build/moz.configure/toolchain.configure
+@@ -3,18 +3,18 @@
+ # 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/.
+ 
+ imply_option('--enable-release', mozilla_official)
+ imply_option('--enable-release', depends_if('MOZ_AUTOMATION')(lambda x: True))
+ 
+ js_option('--enable-release',
+-          help='Build with more conservative, release engineering-oriented '
+-               'options. This may slow down builds.')
++          help='{Build|Do not build} with more conservative, release '
++               'engineering-oriented options.{ This may slow down builds.|}')
+ 
+ 
+ @depends('--enable-release')
+ def developer_options(value):
+     if not value:
+         return True
+ 
+ 
+diff --git a/python/mozbuild/mozbuild/configure/help.py b/python/mozbuild/mozbuild/configure/help.py
+--- a/python/mozbuild/mozbuild/configure/help.py
++++ b/python/mozbuild/mozbuild/configure/help.py
+@@ -35,17 +35,17 @@ class HelpFormatter(object):
+ 
+         if len(opt) > 24 or not help:
+             target.append('  %s' % opt)
+             if help:
+                 target.append('%s%s' % (' ' * 28, help))
+         else:
+             target.append('  %-24s  %s' % (opt, help))
+ 
+-    RE_FORMAT = re.compile(r'{([^|}]+)\|([^|}]+)}')
++    RE_FORMAT = re.compile(r'{([^|}]*)\|([^|}]*)}')
+ 
+     # Return formatted help text for --{enable,disable,with,without}-* options.
+     #
+     # Format is the following syntax:
+     #   {String for --enable or --with|String for --disable or --without}
+     #
+     # For example, '{Enable|Disable} optimizations' will be formatted to
+     # 'Enable optimizations' if the options's prefix is 'enable' or 'with',
+diff --git a/toolkit/moz.configure b/toolkit/moz.configure
+--- a/toolkit/moz.configure
++++ b/toolkit/moz.configure
+@@ -440,17 +440,17 @@ set_config('MOZ_TREMOR', sample_type_is_
+ def eme_default(build_project, help):
+     if build_project == 'browser':
+         return 'widevine'
+ 
+ option('--enable-eme',
+        nargs='*',
+        choices=('widevine',),
+        default=eme_default,
+-       help='Enable support for Encrypted Media Extensions')
++       help='{Enable|Disable} support for Encrypted Media Extensions')
+ 
+ @depends('--enable-eme', target)
+ def enable_eme(value, target):
+     # Widevine EME by default enabled on desktop Windows, MacOS and Linux,
+     # x86 and x64 builds.
+     if (target.kernel in ('Darwin', 'WINNT', 'Linux') and
+         target.os != 'Android' and
+         target.cpu in ('x86', 'x86_64')):

+ 500 - 0
mozilla-release/patches/1495669-64a1.patch

@@ -0,0 +1,500 @@
+# HG changeset patch
+# User Benjamin Bouvier <benj@benj.me>
+# Date 1539090112 -7200
+#      Tue Oct 09 15:01:52 2018 +0200
+# Node ID 1f5478a63db8a1f606ad2fd6ead34b5d91712357
+# Parent  a1fbf496ba886d4c00a30bf40766ee486532f5fd
+Bug 1495669: Share bindgen flags globally; r=emilio, r=froydnj
+
+diff --git a/build/moz.configure/android-ndk.configure b/build/moz.configure/android-ndk.configure
+--- a/build/moz.configure/android-ndk.configure
++++ b/build/moz.configure/android-ndk.configure
+@@ -258,30 +258,30 @@ def android_toolchain_prefix(prefix_base
+ 
+ imply_option('--with-toolchain-prefix', android_toolchain_prefix,
+              reason='--with-android-ndk')
+ 
+ 
+ @depends(extra_toolchain_flags, android_toolchain,
+          android_toolchain_prefix_base, '--help')
+ @imports(_from='os.path', _import='isdir')
+-def bindgen_cflags_defaults(toolchain_flags, toolchain, toolchain_prefix, _):
++def bindgen_cflags_android(toolchain_flags, toolchain, toolchain_prefix, _):
+     if not toolchain_flags:
+         return
+ 
+     gcc_include = os.path.join(
+         toolchain, 'lib', 'gcc', toolchain_prefix, '4.9.x')
+     if not isdir(gcc_include):
+         gcc_include = os.path.join(
+             toolchain, 'lib', 'gcc', toolchain_prefix, '4.9')
+ 
+-    cflags_format = "%s -I%s -I%s"
+-    return cflags_format % (' '.join(toolchain_flags),
+-                            os.path.join(gcc_include, 'include'),
+-                            os.path.join(gcc_include, 'include-fixed'))
++    return toolchain_flags + [
++        '-I%s' % os.path.join(gcc_include, 'include'),
++        '-I%s' % os.path.join(gcc_include, 'include-fixed'),
++    ]
+ 
+ 
+ @depends(host, ndk)
+ @imports(_from='os.path', _import='exists')
+ @imports(_from='os.path', _import='isdir')
+ def android_clang_compiler(host, ndk):
+     if not ndk:
+         return
+diff --git a/build/moz.configure/bindgen.configure b/build/moz.configure/bindgen.configure
+--- a/build/moz.configure/bindgen.configure
++++ b/build/moz.configure/bindgen.configure
+@@ -207,8 +207,136 @@ def bindgen_config_paths(llvm_config, li
+ 
+     return namespace(
+         libclang_path=libclang_path,
+         clang_path=clang_resolved,
+     )
+ 
+ set_config('MOZ_LIBCLANG_PATH', bindgen_config_paths.libclang_path)
+ set_config('MOZ_CLANG_PATH', bindgen_config_paths.clang_path)
++
++
++@depends(host, target, target_is_unix, c_compiler, bindgen_cflags_android)
++def basic_bindgen_cflags(host, target, is_unix, compiler_info, android_cflags):
++    args = [
++        '-x', 'c++', '-std=gnu++14', '-fno-sized-deallocation',
++        '-DTRACING=1', '-DIMPL_LIBXUL', '-DMOZILLA_INTERNAL_API',
++        '-DRUST_BINDGEN'
++    ]
++
++    if is_unix:
++        args += ['-DOS_POSIX=1']
++
++    if target.os == 'Android':
++        args += android_cflags
++
++    def handle_cpu(obj):
++        if 'cpu' in obj and target.cpu in obj['cpu']:
++            return obj['cpu'][target.cpu]
++        return []
++
++    if target.os == 'WINNT' and host.raw_os.startswith('gnu'):
++        args += handle_cpu({
++            'cpu': {
++                'x86': ['--target=i686-pc-mingw32'],
++                'x86_64': ['--target=x86_64-w64-mingw32'],
++            },
++        })
++
++    os_dict = {
++        'Android': {
++            'default': ['-DOS_ANDROID=1'],
++            'cpu': {
++                'aarch64': ['--target=aarch64-linux-android'],
++                'arm': ['--target=armv7-linux-androideabi'],
++                'x86': ['--target=i686-linux-android'],
++                'x86_64': ['--target=x86_64-linux-android'],
++            },
++        },
++        'DragonFly': {
++            'default': ['-DOS_BSD=1', '-DOS_DRAGONFLY=1'],
++        },
++        'FreeBSD': {
++            'default': ['-DOS_BSD=1', '-DOS_FREEBSD=1'],
++        },
++        'GNU': {
++            'default': ['-DOS_LINUX=1'],
++            'cpu': {
++                'x86': ['-m32'],
++                'x86_64': ['-m64'],
++            },
++        },
++        'NetBSD': {
++            'default': ['-DOS_BSD=1', '-DOS_NETBSD=1'],
++        },
++        'OpenBSD': {
++            'default': ['-DOS_BSD=1', '-DOS_OPENBSD=1'],
++        },
++        'OSX': {
++            'default': [
++                '-DOS_MACOSX=1',
++                '-stdlib=libc++',
++                # To disable the fixup bindgen applies which adds search
++                # paths from clang command line in order to avoid potential
++                # conflict with -stdlib=libc++.
++                '--target=x86_64-apple-darwin',
++            ],
++        },
++        'SunOS': {
++            'default': ['-DOS_SOLARIS=1'],
++        },
++        'WINNT': {
++            'default': [
++                '-DOS_WIN=1',
++                '-DWIN32=1',
++            ],
++            'compiler': {
++                'msvc': {
++                    'default': [
++                        # For compatibility with MSVC 2015
++                        '-fms-compatibility-version=19',
++                        # To enable the builtin __builtin_offsetof so that CRT wouldn't
++                        # use reinterpret_cast in offsetof() which is not allowed inside
++                        # static_assert().
++                        '-D_CRT_USE_BUILTIN_OFFSETOF',
++                        # Enable hidden attribute (which is not supported by MSVC and
++                        # thus not enabled by default with a MSVC-compatibile build)
++                        # to exclude hidden symbols from the generated file.
++                        '-DHAVE_VISIBILITY_HIDDEN_ATTRIBUTE=1',
++                    ],
++                    'cpu': {
++                        'x86': ['--target=i686-pc-win32'],
++                        'x86_64': ['--target=x86_64-pc-win32'],
++                        'aarch64': ['--target=aarch64-pc-windows-msvc'],
++                    },
++                },
++            },
++        },
++    }.get(target.os, {})
++
++    if 'default' in os_dict:
++        args += os_dict['default']
++
++    args += handle_cpu(os_dict)
++    if 'compiler' in os_dict and compiler_info and compiler_info in os_dict['compiler']:
++        compiler_dict = os_dict['compiler'].get(compiler_info)
++        if 'default' in compiler_dict:
++            args += compiler_dict['default']
++        args += handle_cpu(compiler_dict)
++
++    return args
++
++
++js_option(env='BINDGEN_CFLAGS',
++          nargs=1,
++          help='Options bindgen should pass to the C/C++ parser')
++
++
++@depends(basic_bindgen_cflags, 'BINDGEN_CFLAGS')
++@checking('bindgen cflags', lambda s: s if s else 'no')
++def bindgen_cflags(base_flags, extra_flags):
++    flags = base_flags
++    if extra_flags and len(extra_flags):
++        flags += extra_flags[0].split()
++    return ' '.join(flags)
++
++
++add_old_configure_assignment('_BINDGEN_CFLAGS', bindgen_cflags)
+diff --git a/build/moz.configure/toolchain.configure b/build/moz.configure/toolchain.configure
+--- a/build/moz.configure/toolchain.configure
++++ b/build/moz.configure/toolchain.configure
+@@ -1154,32 +1154,16 @@ include('compile-checks.configure')
+          try_compile(body='static_assert(sizeof(void *) == 8, "")',
+                      check_msg='for 64-bit OS'))
+ def check_have_64_bit(have_64_bit, compiler_have_64_bit):
+     if have_64_bit != compiler_have_64_bit:
+         configure_error('The target compiler does not agree with configure '
+                         'about the target bitness.')
+ 
+ 
+-js_option(env='BINDGEN_CFLAGS',
+-          nargs=1,
+-          default=bindgen_cflags_defaults,
+-          help='Options bindgen should pass to the C/C++ parser')
+-
+-
+-@depends('BINDGEN_CFLAGS')
+-@checking('bindgen cflags', lambda s: s if s else 'no')
+-def bindgen_cflags(value):
+-    if value and len(value):
+-        return value[0].split()
+-
+-
+-add_old_configure_assignment('_BINDGEN_CFLAGS', bindgen_cflags)
+-
+-
+ @depends(c_compiler)
+ def default_debug_flags(compiler_info):
+     # Debug info is ON by default.
+     if compiler_info.type in ('msvc', 'clang-cl'):
+         return '-Zi'
+     return '-g'
+ 
+ 
+diff --git a/js/src/wasm/cranelift/build.rs.1495669.later b/js/src/wasm/cranelift/build.rs.1495669.later
+new file mode 100644
+--- /dev/null
++++ b/js/src/wasm/cranelift/build.rs.1495669.later
+@@ -0,0 +1,106 @@
++--- build.rs
+++++ build.rs
++@@ -21,23 +21,16 @@
++ 
++ extern crate bindgen;
++ 
++ use std::env;
++ use std::fs::File;
++ use std::io::prelude::*;
++ use std::path::PathBuf;
++ 
++-enum Arch {
++-    X86,
++-    X64,
++-    Arm,
++-    Aarch64
++-}
++-
++ fn main() {
++     // Tell Cargo to regenerate the bindings if the header file changes.
++     println!("cargo:rerun-if-changed=baldrapi.h");
++ 
++     let mut bindings = bindgen::builder()
++         .disable_name_namespacing()
++         // We whitelist the Baldr C functions and get the associated types for free.
++         .whitelist_function("env_.*")
++@@ -47,79 +40,16 @@ fn main() {
++         .whitelist_type("Cranelift.*")
++         // The enum classes defined in baldrapi.h and WasmBinaryConstants are all Rust-safe.
++         .rustified_enum("BD_.*|Trap|TypeCode|FuncTypeIdDescKind")
++         .whitelist_type("BD_.*|Trap|TypeCode|FuncTypeIdDescKind")
++         .header("baldrapi.h")
++         .clang_args(&["-x", "c++", "-std=gnu++14", "-fno-sized-deallocation", "-DRUST_BINDGEN"])
++         .clang_arg("-I../..");
++ 
++-    let arch = {
++-        let target_arch = env::var("CARGO_CFG_TARGET_ARCH");
++-        match target_arch.as_ref().map(|x| x.as_str()) {
++-            Ok("aarch64") => Some(Arch::Aarch64),
++-            Ok("arm") => Some(Arch::Arm),
++-            Ok("x86") => Some(Arch::X86),
++-            Ok("x86_64") => Some(Arch::X64),
++-            _ => None
++-        }
++-    };
++-
++-    match env::var("CARGO_CFG_TARGET_OS").as_ref().map(|x| x.as_str()) {
++-        Ok("android") => {
++-            bindings = bindings.clang_arg("-DOS_ANDROID=1");
++-            bindings = match arch.expect("unknown android architecture") {
++-                Arch::Aarch64 => { bindings.clang_arg("--target=aarch64-linux-android") }
++-                Arch::Arm => { bindings.clang_arg("--target=armv7-linux-androideabi") }
++-                Arch::X86 => { bindings.clang_arg("--target=i686-linux-android") }
++-                Arch::X64 => { bindings.clang_arg("--target=x86_64-linux-android") }
++-            };
++-        }
++-
++-        Ok("linux") | Ok("freebsd") | Ok("dragonfly") | Ok("openbsd") | Ok("bitrig") | Ok("netbsd")
++-            | Ok("ios") => {
++-            // Nothing to do in particular for these OSes, until proven the contrary.
++-        }
++-
++-        Ok("macos") => {
++-            bindings = bindings.clang_arg("-DOS_MACOSX=1");
++-            bindings = bindings.clang_arg("-stdlib=libc++");
++-            bindings = bindings.clang_arg("--target=x86_64-apple-darwin");
++-        }
++-
++-        Ok("windows") => {
++-            let arch = arch.expect("unknown Windows architecture");
++-            bindings = bindings.clang_arg("-DOS_WIN=1")
++-                .clang_arg("-DWIN32=1");
++-            bindings = match env::var("CARGO_CFG_TARGET_ENV").as_ref().map(|x| x.as_str()) {
++-                Ok("msvc") => {
++-                    bindings = bindings.clang_arg("-fms-compatibility-version=19");
++-                    bindings = bindings.clang_arg("-D_CRT_USE_BUILTIN_OFFSETOF");
++-                    bindings = bindings.clang_arg("-DHAVE_VISIBILITY_HIDDEN_ATTRIBUTE=1");
++-                    match arch {
++-                        Arch::X86 => { bindings.clang_arg("--target=i686-pc-win32") },
++-                        Arch::X64 => { bindings.clang_arg("--target=x86_64-pc-win32") },
++-                        Arch::Aarch64 => { bindings.clang_arg("--target=aarch64-pc-windows-msvc") }
++-                        _ => panic!("unknown Windows architecture for msvc build")
++-                    }
++-                }
++-                Ok("gnu") => {
++-                    match arch {
++-                        Arch::X86 => { bindings.clang_arg("--target=i686-pc-mingw32") },
++-                        Arch::X64 => { bindings.clang_arg("--target=x86_64-w64-mingw32") },
++-                        _ => panic!("unknown Windows architecture for gnu build")
++-                    }
++-                }
++-                _ => panic!("unknown Windows build environment")
++-            };
++-        }
++-
++-        os => panic!("unknown target os {:?}!", os)
++-    }
++-
++     let path = PathBuf::from(env::var_os("MOZ_TOPOBJDIR").unwrap()).join("js/src/rust/extra-bindgen-flags");
++ 
++     let mut extra_flags = String::new();
++         File::open(&path)
++             .expect("Failed to open extra-bindgen-flags file")
++             .read_to_string(&mut extra_flags)
++             .expect("Failed to read extra-bindgen-flags file");
++ 
+diff --git a/layout/style/ServoBindings.toml b/layout/style/ServoBindings.toml
+--- a/layout/style/ServoBindings.toml
++++ b/layout/style/ServoBindings.toml
+@@ -1,48 +1,8 @@
+-[build]
+-args = [
+-    "-x", "c++", "-std=c++14", "-fno-sized-deallocation",
+-    "-DTRACING=1", "-DIMPL_LIBXUL", "-DMOZ_STYLO_BINDINGS=1",
+-    "-DMOZILLA_INTERNAL_API", "-DRUST_BINDGEN", "-DMOZ_STYLO"
+-]
+-"family=unix" = ["-DOS_POSIX=1"]
+-"os=solaris" = ["-DOS_SOLARIS=1"]
+-"os=dragonfly" = ["-DOS_BSD=1", "-DOS_DRAGONFLY=1"]
+-"os=freebsd" = ["-DOS_BSD=1", "-DOS_FREEBSD=1"]
+-"os=netbsd" = ["-DOS_BSD=1", "-DOS_NETBSD=1"]
+-"os=openbsd" = ["-DOS_BSD=1", "-DOS_OPENBSD=1"]
+-"os=macos" = [
+-    "-DOS_MACOSX=1", "-stdlib=libc++",
+-    # To disable the fixup bindgen applies which adds search
+-    # paths from clang command line in order to avoid potential
+-    # conflict with -stdlib=libc++.
+-    "--target=x86_64-apple-darwin",
+-]
+-
+-[build."os=linux"]
+-args = ["-DOS_LINUX=1"]
+-"arch=x86" = ["-m32"]
+-"arch=x86_64" = ["-m64"]
+-
+-[build."os=windows"."env=msvc"]
+-args = [
+-    "-DOS_WIN=1", "-DWIN32=1",
+-    # To enable the builtin __builtin_offsetof so that CRT wouldn't
+-    # use reinterpret_cast in offsetof() which is not allowed inside
+-    # static_assert().
+-    "-D_CRT_USE_BUILTIN_OFFSETOF",
+-    # Enable hidden attribute (which is not supported by MSVC and
+-    # thus not enabled by default with a MSVC-compatibile build)
+-    # to exclude hidden symbols from the generated file.
+-    "-DHAVE_VISIBILITY_HIDDEN_ATTRIBUTE=1",
+-]
+-"arch=x86" = ["--target=i686-pc-win32"]
+-"arch=x86_64" = ["--target=x86_64-pc-win32"]
+-
+ [structs]
+ headers = [
+     "nsStyleStruct.h",
+     "mozilla/ServoPropPrefList.h",
+     "mozilla/StyleAnimationValue.h",
+     "gfxFontConstants.h",
+     "gfxFontFeatures.h",
+     "nsThemeConstants.h",
+diff --git a/servo/components/style/build_gecko.rs b/servo/components/style/build_gecko.rs
+--- a/servo/components/style/build_gecko.rs
++++ b/servo/components/style/build_gecko.rs
+@@ -65,32 +65,20 @@ mod bindings {
+         static ref CONFIG: Table = {
+             // Load Gecko's binding generator config from the source tree.
+             let path = PathBuf::from(env::var_os("MOZ_SRC").unwrap())
+                 .join("layout/style/ServoBindings.toml");
+             read_config(&path)
+         };
+         static ref BUILD_CONFIG: Table = {
+             // Load build-specific config overrides.
+-            // FIXME: We should merge with CONFIG above instead of
+-            // forcing callers to do it.
+             let path = PathBuf::from(env::var_os("MOZ_TOPOBJDIR").unwrap())
+                 .join("layout/style/bindgen.toml");
+             read_config(&path)
+         };
+-        static ref TARGET_INFO: HashMap<String, String> = {
+-            const TARGET_PREFIX: &'static str = "CARGO_CFG_TARGET_";
+-            let mut result = HashMap::new();
+-            for (k, v) in env::vars() {
+-                if k.starts_with(TARGET_PREFIX) {
+-                    result.insert(k[TARGET_PREFIX.len()..].to_lowercase(), v);
+-                }
+-            }
+-            result
+-        };
+         static ref INCLUDE_RE: Regex = Regex::new(r#"#include\s*"(.+?)""#).unwrap();
+         static ref DISTDIR_PATH: PathBuf = {
+             let path = PathBuf::from(env::var_os("MOZ_DIST").unwrap());
+             if !path.is_absolute() || !path.is_dir() {
+                 panic!("MOZ_DIST must be an absolute directory, was: {}", path.display());
+             }
+             path
+         };
+@@ -154,45 +142,16 @@ mod bindings {
+     trait BuilderExt {
+         fn get_initial_builder() -> Builder;
+         fn include<T: Into<String>>(self, file: T) -> Builder;
+         fn zero_size_type(self, ty: &str, structs_list: &HashSet<&str>) -> Builder;
+         fn borrowed_type(self, ty: &str) -> Builder;
+         fn mutable_borrowed_type(self, ty: &str) -> Builder;
+     }
+ 
+-    fn add_clang_args(mut builder: Builder, config: &Table, matched_os: &mut bool) -> Builder {
+-        fn add_args(mut builder: Builder, values: &[toml::Value]) -> Builder {
+-            for item in values.iter() {
+-                builder = builder.clang_arg(item.as_str().expect("Expect string in list"));
+-            }
+-            builder
+-        }
+-        for (k, v) in config.iter() {
+-            if k == "args" {
+-                builder = add_args(builder, v.as_array().unwrap().as_slice());
+-                continue;
+-            }
+-            let equal_idx = k.find('=').expect(&format!("Invalid key: {}", k));
+-            let (target_type, target_value) = k.split_at(equal_idx);
+-            if TARGET_INFO[target_type] != target_value[1..] {
+-                continue;
+-            }
+-            if target_type == "os" {
+-                *matched_os = true;
+-            }
+-            builder = match *v {
+-                toml::Value::Table(ref table) => add_clang_args(builder, table, matched_os),
+-                toml::Value::Array(ref array) => add_args(builder, array),
+-                _ => panic!("Unknown type"),
+-            };
+-        }
+-        builder
+-    }
+-
+     impl BuilderExt for Builder {
+         fn get_initial_builder() -> Builder {
+             use bindgen::RustTarget;
+ 
+             // Disable rust unions, because we replace some types inside of
+             // them.
+             let mut builder = Builder::default()
+                 .rust_target(RustTarget::Stable_1_0);
+@@ -214,24 +173,24 @@ mod bindings {
+             }
+ 
+             builder = builder.include(add_include("mozilla-config.h"));
+ 
+             if env::var("CARGO_FEATURE_GECKO_DEBUG").is_ok() {
+                 builder = builder.clang_arg("-DDEBUG=1").clang_arg("-DJS_DEBUG=1");
+             }
+ 
+-            let mut matched_os = false;
+-            let build_config = CONFIG["build"].as_table().expect("Malformed config file");
+-            builder = add_clang_args(builder, build_config, &mut matched_os);
+-            let build_config = BUILD_CONFIG["build"].as_table().expect("Malformed config file");
+-            builder = add_clang_args(builder, build_config, &mut matched_os);
+-            if !matched_os {
+-                panic!("Unknown platform");
++            let build_config = BUILD_CONFIG["build"]
++                .as_table()
++                .expect("Malformed config file");
++            let extra_bindgen_flags = build_config["args"].as_array().unwrap().as_slice();
++            for item in extra_bindgen_flags.iter() {
++                builder = builder.clang_arg(item.as_str().expect("Expect string in list"));
+             }
++
+             builder
+         }
+         fn include<T: Into<String>>(self, file: T) -> Builder {
+             self.clang_arg("-include").clang_arg(file)
+         }
+         // This makes an FFI-safe void type that can't be matched on
+         // &VoidType is UB to have, because you can match on it
+         // to produce a reachable unreachable. If it's wrapped in

+ 292 - 0
mozilla-release/patches/1496791-64a1.patch

@@ -0,0 +1,292 @@
+# HG changeset patch
+# User Gregory Mierzwinski <gmierz2@outlook.com>
+# Date 1538773585 0
+#      Fri Oct 05 21:06:25 2018 +0000
+# Node ID 2d5a9a9d3baa744707c58eec07f9c20e65869d30
+# Parent  1eb7743d2ba01e78cfd263648e9b1484e426673f
+Bug 1496791 - Disable linux64-jsdcov completely. r=jmaher
+
+This patch removes linux64-jsdcov from the available builds on taskcluster along with any hacks used to run it. It also removes any 'coverage' entries that were added to skip tests.
+
+Differential Revision: https://phabricator.services.mozilla.com/D7919
+
+diff --git a/browser/base/content/test/general/browser.ini.1496791.later b/browser/base/content/test/general/browser.ini.1496791.later
+new file mode 100644
+--- /dev/null
++++ b/browser/base/content/test/general/browser.ini.1496791.later
+@@ -0,0 +1,20 @@
++--- browser.ini
+++++ browser.ini
++@@ -131,17 +131,16 @@ skip-if = toolkit == "cocoa"
++ # DO NOT ADD MORE TESTS HERE. USE A TOPICAL DIRECTORY INSTEAD.
++ [browser_bug481560.js]
++ # DO NOT ADD MORE TESTS HERE. USE A TOPICAL DIRECTORY INSTEAD.
++ [browser_bug484315.js]
++ # DO NOT ADD MORE TESTS HERE. USE A TOPICAL DIRECTORY INSTEAD.
++ [browser_bug491431.js]
++ # DO NOT ADD MORE TESTS HERE. USE A TOPICAL DIRECTORY INSTEAD.
++ [browser_bug495058.js]
++-skip-if = coverage # Bug 1439493
++ # DO NOT ADD MORE TESTS HERE. USE A TOPICAL DIRECTORY INSTEAD.
++ [browser_bug519216.js]
++ skip-if = true # Bug 1478159
++ # DO NOT ADD MORE TESTS HERE. USE A TOPICAL DIRECTORY INSTEAD.
++ [browser_bug520538.js]
++ # DO NOT ADD MORE TESTS HERE. USE A TOPICAL DIRECTORY INSTEAD.
++ [browser_bug521216.js]
++ # DO NOT ADD MORE TESTS HERE. USE A TOPICAL DIRECTORY INSTEAD.
+diff --git a/devtools/client/aboutdebugging/test/browser.ini b/devtools/client/aboutdebugging/test/browser.ini
+--- a/devtools/client/aboutdebugging/test/browser.ini
++++ b/devtools/client/aboutdebugging/test/browser.ini
+@@ -17,26 +17,25 @@ support-files =
+   service-workers/empty-sw.js
+   service-workers/fetch-sw.html
+   service-workers/fetch-sw.js
+   service-workers/push-sw.html
+   service-workers/push-sw.js
+   !/devtools/client/shared/test/shared-head.js
+ 
+ [browser_addons_debug_bootstrapped.js]
+-skip-if = coverage # Bug 1387827
+ [browser_addons_debug_info.js]
+ [browser_addons_debug_webextension.js]
+ tags = webextensions
+ [browser_addons_debug_webextension_inspector.js]
+ tags = webextensions
+ [browser_addons_debug_webextension_nobg.js]
+ tags = webextensions
+ [browser_addons_debug_webextension_popup.js]
+-skip-if = coverage || (verify && debug) # coverage: Bug 1387827, verify: crashes on shutdown
++skip-if = (verify && debug) # verify: crashes on shutdown
+ tags = webextensions
+ [browser_addons_debugging_initial_state.js]
+ [browser_addons_install.js]
+ [browser_addons_reload.js]
+ [browser_addons_remove.js]
+ [browser_addons_toggle_debug.js]
+ [browser_page_not_found.js]
+ [browser_service_workers.js]
+diff --git a/dom/indexedDB/test/unit/xpcshell-parent-process.ini b/dom/indexedDB/test/unit/xpcshell-parent-process.ini
+--- a/dom/indexedDB/test/unit/xpcshell-parent-process.ini
++++ b/dom/indexedDB/test/unit/xpcshell-parent-process.ini
+@@ -61,17 +61,13 @@ skip-if = true
+ [test_snappyUpgrade.js]
+ [test_storagePersistentUpgrade.js]
+ [test_temporary_storage.js]
+ # bug 951017: intermittent failure on Android x86 emulator
+ skip-if = os == "android" && processor == "x86"
+ [test_view_put_get_values.js]
+ [test_wasm_cursors.js]
+ [test_wasm_getAll.js]
+-skip-if = coverage # bug 1336727
+ [test_wasm_index_getAllObjects.js]
+ [test_wasm_indexes.js]
+ [test_wasm_put_get_values.js]
+-skip-if = coverage # bug 1336727
+ [test_wasm_recompile.js]
+-skip-if = coverage # bug 1336727
+ [test_wasm_serialize_tiering.js]
+-skip-if = coverage # bug 1336727
+diff --git a/js/src/jit-test/jit_test.py b/js/src/jit-test/jit_test.py
+--- a/js/src/jit-test/jit_test.py
++++ b/js/src/jit-test/jit_test.py
+@@ -232,17 +232,17 @@ def main(argv):
+                 traceback.print_exc()
+                 sys.stderr.write('---\n')
+ 
+     if read_all:
+         test_list = jittests.find_tests()
+ 
+     # Exclude tests when code coverage is enabled.
+     # This part is equivalent to:
+-    # skip-if = coverage
++    # skip-if = ccov
+     if os.getenv('GCOV_PREFIX') is not None:
+         # GCOV errors.
+         options.exclude += [os.path.join('asm.js', 'testSIMD.js')]               # Bug 1347245
+ 
+         # JSVM errors.
+         options.exclude += [os.path.join('basic', 'functionnames.js')]           # Bug 1369783
+         options.exclude += [os.path.join('debug', 'Debugger-findScripts-23.js')]
+         options.exclude += [os.path.join('debug', 'bug1160182.js')]
+diff --git a/security/manager/ssl/tests/unit/xpcshell-smartcards.ini b/security/manager/ssl/tests/unit/xpcshell-smartcards.ini
+--- a/security/manager/ssl/tests/unit/xpcshell-smartcards.ini
++++ b/security/manager/ssl/tests/unit/xpcshell-smartcards.ini
+@@ -3,12 +3,11 @@ head = head_psm.js
+ tail =
+ tags = psm
+ skip-if = toolkit == 'android'
+ support-files =
+ 
+ [test_pkcs11_module.js]
+ [test_pkcs11_moduleDB.js]
+ [test_pkcs11_safe_mode.js]
+-skip-if = coverage # bug 1336728
+ [test_pkcs11_slot.js]
+ [test_pkcs11_token.js]
+ [test_pkcs11_tokenDB.js]
+diff --git a/testing/mochitest/runtests.py b/testing/mochitest/runtests.py
+--- a/testing/mochitest/runtests.py
++++ b/testing/mochitest/runtests.py
+@@ -2571,19 +2571,16 @@ toolbar#nav-bar {
+ 
+         # a11y and chrome tests don't run with e10s enabled in CI. Need to set
+         # this here since |mach mochitest| sets the flavor after argument parsing.
+         if options.flavor in ('a11y', 'chrome'):
+             options.e10s = False
+         mozinfo.update({"e10s": options.e10s})  # for test manifest parsing.
+         mozinfo.update({"headless": options.headless})  # for test manifest parsing.
+ 
+-        if options.jscov_dir_prefix is not None:
+-            mozinfo.update({'coverage': True})
+-
+         self.setTestRoot(options)
+ 
+         # Despite our efforts to clean up servers started by this script, in practice
+         # we still see infrequent cases where a process is orphaned and interferes
+         # with future tests, typically because the old server is keeping the port in use.
+         # Try to avoid those failures by checking for and killing servers before
+         # trying to start new ones.
+         self.killNamedProc('ssltunnel')
+diff --git a/testing/mozharness/mozharness/mozilla/testing/codecoverage.py b/testing/mozharness/mozharness/mozilla/testing/codecoverage.py
+--- a/testing/mozharness/mozharness/mozilla/testing/codecoverage.py
++++ b/testing/mozharness/mozharness/mozilla/testing/codecoverage.py
+@@ -9,22 +9,16 @@ import tempfile
+ 
+ from mozharness.base.script import (
+     PreScriptAction,
+     PostScriptAction,
+ )
+ from mozharness.mozilla.tooltool import TooltoolMixin
+ 
+ code_coverage_config_options = [
+-    [["--code-coverage"],
+-     {"action": "store_true",
+-      "dest": "code_coverage",
+-      "default": False,
+-      "help": "Whether gcov c++ code coverage should be run."
+-      }],
+     [["--disable-ccov-upload"],
+      {"action": "store_true",
+       "dest": "disable_ccov_upload",
+       "default": False,
+       "help": "Whether test run should package and upload code coverage data."
+       }],
+     [["--jsd-code-coverage"],
+      {"action": "store_true",
+@@ -102,34 +96,16 @@ class CodeCoverageMixin(object):
+         cmd = [tooltool_path, '--url', 'https://tooltool.mozilla-releng.net/', 'fetch', \
+             '-m', manifest, '-o', '-c', '/builds/worker/tooltool-cache']
+         self.run_command(cmd, cwd=self.grcov_dir)
+         self.run_command(['tar', '-jxvf', os.path.join(self.grcov_dir, 'grcov-linux-standalone-x86_64.tar.bz2'), \
+             '-C', self.grcov_dir], cwd=self.grcov_dir)
+ 
+     @PostScriptAction('run-tests')
+     def _package_coverage_data(self, action, success=None):
+-        if self.jsd_code_coverage_enabled:
+-            # Setup the command for compression
+-            dirs = self.query_abs_dirs()
+-            jsdcov_dir = dirs['abs_blob_upload_dir']
+-            zipFile = os.path.join(jsdcov_dir, "jsdcov_artifacts.zip")
+-            command = ["zip", "-r", zipFile, ".", "-i", "jscov*.json"]
+-
+-            self.info("Beginning compression of JSDCov artifacts...")
+-            self.run_command(command, cwd=jsdcov_dir)
+-
+-            # Delete already compressed JSCov artifacts.
+-            for filename in os.listdir(jsdcov_dir):
+-                if filename.startswith("jscov") and filename.endswith(".json"):
+-                    os.remove(os.path.join(jsdcov_dir, filename))
+-
+-            self.info("Completed compression of JSDCov artifacts!")
+-            self.info("Path to JSDCov compressed artifacts: " + zipFile)
+-
+         if not self.code_coverage_enabled:
+             return
+         del os.environ['GCOV_PREFIX']
+         del os.environ['JS_CODE_COVERAGE_OUTPUT_DIR']
+ 
+         if not self.ccov_upload_disabled:
+             # TODO This is fragile, find rel_topsrcdir properly somehow
+             # We need to find the path relative to the gecko topsrcdir. Use
+diff --git a/testing/xpcshell/runxpcshelltests.py b/testing/xpcshell/runxpcshelltests.py
+--- a/testing/xpcshell/runxpcshelltests.py
++++ b/testing/xpcshell/runxpcshelltests.py
+@@ -1137,20 +1137,16 @@ class XPCShellTests(object):
+         for k, v in self.mozInfo.items():
+             if isinstance(k, unicode):
+                 k = k.encode('ascii')
+             fixedInfo[k] = v
+         self.mozInfo = fixedInfo
+ 
+         mozinfo.update(self.mozInfo)
+ 
+-        # Add a flag to mozinfo to indicate that code coverage is enabled.
+-        if self.jscovdir:
+-            mozinfo.update({"coverage": True})
+-
+         return True
+ 
+     def runTests(self, options, testClass=XPCShellTestThread, mobileArgs=None):
+         """
+           Run xpcshell tests.
+         """
+ 
+         global gotSIGINT
+diff --git a/toolkit/components/osfile/tests/xpcshell/xpcshell.ini b/toolkit/components/osfile/tests/xpcshell/xpcshell.ini
+--- a/toolkit/components/osfile/tests/xpcshell/xpcshell.ini
++++ b/toolkit/components/osfile/tests/xpcshell/xpcshell.ini
+@@ -42,10 +42,9 @@ skip-if = os != "win"
+ requesttimeoutfactor = 4
+ [test_remove.js]
+ [test_removeDir.js]
+ requesttimeoutfactor = 4
+ [test_removeEmptyDir.js]
+ [test_reset.js]
+ [test_shutdown.js]
+ [test_telemetry.js]
+-skip-if = coverage # bug 1336672
+ [test_unique.js]
+diff --git a/toolkit/components/startup/tests/unit/xpcshell.ini b/toolkit/components/startup/tests/unit/xpcshell.ini
+--- a/toolkit/components/startup/tests/unit/xpcshell.ini
++++ b/toolkit/components/startup/tests/unit/xpcshell.ini
+@@ -1,6 +1,5 @@
+ [DEFAULT]
+ head = head_startup.js
+ skip-if = toolkit == 'android'
+ 
+ [test_startup_crash.js]
+-skip-if = coverage # bug 1336673
+diff --git a/toolkit/modules/subprocess/test/xpcshell/xpcshell.ini.1496791.later b/toolkit/modules/subprocess/test/xpcshell/xpcshell.ini.1496791.later
+new file mode 100644
+--- /dev/null
++++ b/toolkit/modules/subprocess/test/xpcshell/xpcshell.ini.1496791.later
+@@ -0,0 +1,15 @@
++--- xpcshell.ini
+++++ xpcshell.ini
++@@ -3,12 +3,10 @@ head = head.js
++ firefox-appdir = browser
++ skip-if = os == 'android'
++ subprocess = true
++ support-files =
++   data_text_file.txt
++   data_test_script.py
++ 
++ [test_subprocess.js]
++-skip-if = coverage
++ [test_subprocess_getEnvironment.js]
++-skip-if = coverage
++ [test_subprocess_pathSearch.js]
+diff --git a/tools/profiler/tests/xpcshell.ini b/tools/profiler/tests/xpcshell.ini
+--- a/tools/profiler/tests/xpcshell.ini
++++ b/tools/profiler/tests/xpcshell.ini
+@@ -10,9 +10,8 @@ skip-if = true
+ skip-if = true
+ [test_pause.js]
+ [test_enterjit_osr.js]
+ [test_enterjit_osr_disabling.js]
+ skip-if = !debug
+ [test_enterjit_osr_enabling.js]
+ skip-if = !debug
+ [test_asm.js]
+-skip-if = coverage # bug 1336674

+ 30 - 0
mozilla-release/patches/1496828-64a1.patch

@@ -0,0 +1,30 @@
+# HG changeset patch
+# User Andrew Halberstadt <ahalberstadt@mozilla.com>
+# Date 1539095077 0
+# Node ID f81c0fafcb2fe5c1bce5e4736dda88a1aedde204
+# Parent  3b6095ab32cc8b4e7261b0dc5fecb93c6b6f49dc
+Bug 1496828 - [mochitest] Fix mochitest selftest regression by always instantiating self.extraPrefs, r=jmaher
+
+Differential Revision: https://phabricator.services.mozilla.com/D8087
+
+diff --git a/testing/mochitest/runtests.py b/testing/mochitest/runtests.py
+--- a/testing/mochitest/runtests.py
++++ b/testing/mochitest/runtests.py
+@@ -872,16 +872,17 @@ class MochitestDesktop(object):
+         self._active_tests = None
+         self._locations = None
+ 
+         self.marionette = None
+         self.start_script = None
+         self.mozLogs = None
+         self.start_script_kwargs = {}
+         self.urlOpts = []
++        self.extraPrefs = {}
+ 
+         if logger_options.get('log'):
+             self.log = logger_options['log']
+         else:
+             commandline.log_formatters["tbpl"] = (
+                 MochitestFormatter,
+                 "Mochitest specific tbpl formatter")
+             self.log = commandline.setup_logging("mochitest", logger_options, {"tbpl": sys.stdout})

+ 268 - 0
mozilla-release/patches/1498636-67a1.patch

@@ -0,0 +1,268 @@
+# HG changeset patch
+# User Rob Wu <rob@robwu.nl>
+# Date 1549552225 0
+# Node ID 314d2252630075bd090f39c3451450a2ce68818a
+# Parent  746123d8ead51c73a5be774165e6547b5b626fe2
+Bug 1498636 - Separate "include" variables from manifest defaults r=ahal
+
+Test manifests may be included by multiple other manifests, optionally
+with additional variables below the `[include:...]` section header.
+These additional variables are specific to the manifest that contained
+the "include" section, and should not inadvertently be shared with other
+manifests that also happen to include this manifest.
+
+To achieve that, store the defaults for included manifests in a (path to
+parent manifest, path to included manifest) tuple instead of just the
+included manifest.
+
+Differential Revision: https://phabricator.services.mozilla.com/D18086
+
+diff --git a/testing/mozbase/manifestparser/manifestparser/manifestparser.py b/testing/mozbase/manifestparser/manifestparser/manifestparser.py
+--- a/testing/mozbase/manifestparser/manifestparser/manifestparser.py
++++ b/testing/mozbase/manifestparser/manifestparser/manifestparser.py
+@@ -145,17 +145,30 @@ class ManifestParser(object):
+             rootdir = ""
+         else:
+             assert os.path.isabs(self.rootdir)
+             rootdir = self.rootdir + os.path.sep
+ 
+         # read the configuration
+         sections = read_ini(fp=fp, variables=defaults, strict=self.strict,
+                             handle_defaults=self._handle_defaults)
+-        self.manifest_defaults[filename] = defaults
++        if parentmanifest and filename:
++            # A manifest can be read multiple times, via "include:", optionally
++            # with section-specific variables. These variables only apply to
++            # the included manifest when included via the same parent manifest,
++            # so they must be associated with (parentmanifest, filename).
++            #
++            # |defaults| is a combination of variables, in the following order:
++            # - The defaults of the ancestor manifests if self._handle_defaults
++            #   is True.
++            # - Any variables from the "[include:...]" section.
++            # - The defaults of the included manifest.
++            self.manifest_defaults[(parentmanifest, filename)] = defaults
++        else:
++            self.manifest_defaults[filename] = defaults
+ 
+         parent_section_found = False
+ 
+         # get the tests
+         for section, data in sections:
+             # In case of defaults only, no other section than parent: has to
+             # be processed.
+             if defaults_only and not section.startswith('parent:'):
+@@ -336,20 +349,27 @@ class ManifestParser(object):
+             return [test[_key] for test in tests]
+ 
+         # return the tests
+         return tests
+ 
+     def manifests(self, tests=None):
+         """
+         return manifests in order in which they appear in the tests
++        If |tests| is not set, the order of the manifests is unspecified.
+         """
+         if tests is None:
++            manifests = []
+             # Make sure to return all the manifests, even ones without tests.
+-            return self.manifest_defaults.keys()
++            for manifest in self.manifest_defaults.keys():
++                if isinstance(manifest, tuple):
++                    parentmanifest, manifest = manifest
++                if manifest not in manifests:
++                    manifests.append(manifest)
++            return manifests
+ 
+         manifests = []
+         for test in tests:
+             manifest = test.get('manifest')
+             if not manifest:
+                 continue
+             if manifest not in manifests:
+                 manifests.append(manifest)
+diff --git a/testing/mozbase/manifestparser/tests/test_manifestparser.py b/testing/mozbase/manifestparser/tests/test_manifestparser.py
+--- a/testing/mozbase/manifestparser/tests/test_manifestparser.py
++++ b/testing/mozbase/manifestparser/tests/test_manifestparser.py
+@@ -123,16 +123,157 @@ foo = bar
+ [include/flowers]
+ blue = ocean
+ red = roses
+ yellow = submarine"""  # noqa
+ 
+         self.assertEqual(buffer.getvalue().strip(),
+                          expected_output)
+ 
++    def test_include_manifest_defaults(self):
++        """
++        Test that manifest_defaults and manifests() are correctly populated
++        when includes are used.
++        """
++
++        include_example = os.path.join(here, 'include-example.ini')
++        noinclude_example = os.path.join(here, 'just-defaults.ini')
++        bar_path = os.path.join(here, 'include', 'bar.ini')
++        foo_path = os.path.join(here, 'include', 'foo.ini')
++
++        parser = ManifestParser(manifests=(include_example, noinclude_example))
++
++        # Standalone manifests must be appear as-is.
++        self.assertTrue(include_example in parser.manifest_defaults)
++        self.assertTrue(noinclude_example in parser.manifest_defaults)
++
++        # Included manifests must only appear together with the parent manifest
++        # that included the manifest.
++        self.assertFalse(bar_path in parser.manifest_defaults)
++        self.assertFalse(foo_path in parser.manifest_defaults)
++        self.assertTrue((include_example, bar_path) in parser.manifest_defaults)
++        self.assertTrue((include_example, foo_path) in parser.manifest_defaults)
++
++        # manifests() must only return file paths (strings).
++        manifests = parser.manifests()
++        self.assertEqual(len(manifests), 4)
++        self.assertIn(foo_path, manifests)
++        self.assertIn(bar_path, manifests)
++        self.assertIn(include_example, manifests)
++        self.assertIn(noinclude_example, manifests)
++
++    def test_include_handle_defaults_False(self):
++        """
++        Test that manifest_defaults and manifests() are correct even when
++        handle_defaults is set to False.
++        """
++        manifest = os.path.join(here, 'include-example.ini')
++        foo_path = os.path.join(here, 'include', 'foo.ini')
++
++        parser = ManifestParser(manifests=(manifest,), handle_defaults=False)
++
++        self.assertIn(manifest, parser.manifest_defaults)
++        self.assertNotIn(foo_path, parser.manifest_defaults)
++        self.assertIn((manifest, foo_path), parser.manifest_defaults)
++        self.assertEqual(parser.manifest_defaults[manifest],
++                         {
++                             'foo': 'bar',
++                             'here': here,
++                         })
++        self.assertEqual(parser.manifest_defaults[(manifest, foo_path)],
++                         {
++                             'here': os.path.join(here, 'include'),
++                             'red': 'roses',
++                             'blue': 'ocean',
++                             'yellow': 'daffodils',
++                         })
++
++    def test_include_repeated(self):
++        """
++        Test that repeatedly included manifests are independent of each other.
++        """
++        include_example = os.path.join(here, 'include-example.ini')
++        included_foo = os.path.join(here, 'include', 'foo.ini')
++
++        # In the expected output, blue and yellow have the values from foo.ini
++        # (ocean, submarine) instead of the ones from include-example.ini
++        # (violets, daffodils), because the defaults in the included file take
++        # precedence over the values from the parent.
++        include_output = """[include/crash-handling]
++foo = fleem
++
++[fleem]
++foo = bar
++
++[include/flowers]
++blue = ocean
++foo = bar
++red = roses
++yellow = submarine
++
++"""
++        included_output = """[include/flowers]
++blue = ocean
++yellow = submarine
++
++"""
++
++        parser = ManifestParser(manifests=(include_example, included_foo),
++                                rootdir=here)
++        self.assertEqual(parser.get('name'),
++                         ['crash-handling', 'fleem', 'flowers', 'flowers'])
++        self.assertEqual([(test['name'], os.path.basename(test['manifest']))
++                          for test in parser.tests],
++                         [('crash-handling', 'bar.ini'),
++                          ('fleem', 'include-example.ini'),
++                          ('flowers', 'foo.ini'),
++                          ('flowers', 'foo.ini')])
++        self.check_included_repeat(parser, parser.tests[3], parser.tests[2],
++                                   "%s%s" % (include_output, included_output))
++
++        # Same tests, but with the load order of the manifests swapped.
++        parser = ManifestParser(manifests=(included_foo, include_example),
++                                rootdir=here)
++        self.assertEqual(parser.get('name'),
++                         ['flowers', 'crash-handling', 'fleem', 'flowers'])
++        self.assertEqual([(test['name'], os.path.basename(test['manifest']))
++                          for test in parser.tests],
++                         [('flowers', 'foo.ini'),
++                          ('crash-handling', 'bar.ini'),
++                          ('fleem', 'include-example.ini'),
++                          ('flowers', 'foo.ini')])
++        self.check_included_repeat(parser, parser.tests[0], parser.tests[3],
++                                   "%s%s" % (included_output, include_output))
++
++    def check_included_repeat(self, parser, isolated_test, included_test,
++                              expected_output):
++        include_example = os.path.join(here, 'include-example.ini')
++        included_foo = os.path.join(here, 'include', 'foo.ini')
++        manifest_default_key = (include_example, included_foo)
++
++        self.assertFalse('ancestor-manifest' in isolated_test)
++        self.assertEqual(included_test['ancestor-manifest'],
++                         os.path.join(here, 'include-example.ini'))
++
++        self.assertTrue(include_example in parser.manifest_defaults)
++        self.assertTrue(included_foo in parser.manifest_defaults)
++        self.assertTrue(manifest_default_key in parser.manifest_defaults)
++        self.assertEqual(parser.manifest_defaults[manifest_default_key],
++                         {
++                             'foo': 'bar',
++                             'here': os.path.join(here, 'include'),
++                             'red': 'roses',
++                             'blue': 'ocean',
++                             'yellow': 'daffodils',
++                         })
++
++        buffer = StringIO()
++        parser.write(fp=buffer)
++        self.assertEqual(buffer.getvalue(), expected_output)
++
+     def test_invalid_path(self):
+         """
+         Test invalid path should not throw when not strict
+         """
+         manifest = os.path.join(here, 'include-invalid.ini')
+         ManifestParser(manifests=(manifest,), strict=False)
+ 
+     def test_parent_inheritance(self):
+diff --git a/testing/mozbase/moztest/moztest/resolve.py b/testing/mozbase/moztest/moztest/resolve.py
+--- a/testing/mozbase/moztest/moztest/resolve.py
++++ b/testing/mozbase/moztest/moztest/resolve.py
+@@ -265,16 +265,20 @@ class TestMetadata(object):
+                 defaults = pickle.load(fh)
+         for path, tests in test_data.items():
+             for metadata in tests:
+                 if defaults:
+                     defaults_manifests = [metadata['manifest']]
+ 
+                     ancestor_manifest = metadata.get('ancestor-manifest')
+                     if ancestor_manifest:
++                        # The (ancestor manifest, included manifest) tuple
++                        # contains the defaults of the included manifest, so
++                        # use it instead of [metadata['manifest']].
++                        defaults_manifests[0] = (ancestor_manifest, metadata['manifest'])
+                         defaults_manifests.append(ancestor_manifest)
+ 
+                     for manifest in defaults_manifests:
+                         manifest_defaults = defaults.get(manifest)
+                         if manifest_defaults:
+                             metadata = manifestparser.combine_fields(manifest_defaults,
+                                                                      metadata)
+                 self._tests_by_path[path].append(metadata)

+ 30 - 0
mozilla-release/patches/1502358-65a1.patch

@@ -0,0 +1,30 @@
+# HG changeset patch
+# User Bob Clary <bclary@bclary.com>
+# Date 1540581961 25200
+# Node ID 859c3fd87f9371916f7f0e03ddb2260f21c6585b
+# Parent  19c3422995b8acfd33746ad7b2001d215865db4a
+Bug 1502358 - release mozsystemmonitor 0.4, r=ahal
+
+diff --git a/testing/mozbase/mozsystemmonitor/setup.py b/testing/mozbase/mozsystemmonitor/setup.py
+--- a/testing/mozbase/mozsystemmonitor/setup.py
++++ b/testing/mozbase/mozsystemmonitor/setup.py
+@@ -3,17 +3,17 @@
+ # file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ 
+ from __future__ import absolute_import
+ 
+ import os
+ 
+ from setuptools import setup
+ 
+-PACKAGE_VERSION = '0.3'
++PACKAGE_VERSION = '0.4'
+ 
+ try:
+     pwd = os.path.dirname(os.path.abspath(__file__))
+     description = open(os.path.join(pwd, 'README.rst')).read()
+ except Exception:
+     description = ''
+ 
+ setup(
+

+ 2 - 2
mozilla-release/patches/1508927-65a1.patch

@@ -3,7 +3,7 @@
 # Date 1543284108 0
 #      Tue Nov 27 02:01:48 2018 +0000
 # Node ID 6feb94524b7e519e720d7cccc3fa9cccc51f904e
-# Parent  5a92fa8dfca280cdf3f7b5d0cc3f658a44a178bc
+# Parent  437a7be90c99de77bf22b4dfb3a0c8caa305ef26
 Bug 1508927 - Enable clang's -Wbitfield-enum-conversion warnings. r=glandium
 
 https://clang.llvm.org/docs/DiagnosticsReference.html#wbitfield-enum-conversion
@@ -23,7 +23,7 @@ diff --git a/build/moz.configure/warnings.configure b/build/moz.configure/warnin
 --- a/build/moz.configure/warnings.configure
 +++ b/build/moz.configure/warnings.configure
 @@ -9,21 +9,25 @@ js_option('--enable-warnings-as-errors',
-           help='Enable treating warnings as errors')
+           help='{Enable|Disable} treating warnings as errors')
  
  add_old_configure_assignment(
      'MOZ_ENABLE_WARNINGS_AS_ERRORS',

+ 4 - 4
mozilla-release/patches/1513009-2-66a1.patch

@@ -2,7 +2,7 @@
 # User Emilio Cobos Alvarez <emilio@crisal.io>
 # Date 1544787255 -3600
 # Node ID 19447cbd145a5a84f23867d57d8d09cd8cd5e6b2
-# Parent  2f9789a0cfe0be17b2e7ad880d05b0c1b8f0747b
+# Parent  d901f2e23f02cc3adcf78c8b62bcd4e9c5428001
 Bug 1513009 - Deny Rust warnings on automation. r=ted
 
 Summary:
@@ -55,7 +55,7 @@ diff --git a/build/moz.configure/flags.configure b/build/moz.configure/flags.con
 diff --git a/build/moz.configure/toolchain.configure b/build/moz.configure/toolchain.configure
 --- a/build/moz.configure/toolchain.configure
 +++ b/build/moz.configure/toolchain.configure
-@@ -1611,17 +1611,17 @@ imply_option('RUSTC_OPT_LEVEL', '2', whe
+@@ -1593,17 +1593,17 @@ imply_option('RUSTC_OPT_LEVEL', '2', whe
  def rustc_opt_level(opt_level_option, moz_optimize):
      if opt_level_option:
          return opt_level_option[0]
@@ -74,7 +74,7 @@ diff --git a/build/moz.configure/toolchain.configure b/build/moz.configure/toolc
      # optimization level. Since Cargo only supports 2 profiles, we're in
      # a bit of a bind.
      #
-@@ -1652,18 +1652,16 @@ def rust_compiler_flags(opt_level, debug
+@@ -1634,18 +1634,16 @@ def rust_compiler_flags(opt_level, debug
  
      flags = []
      for opt in opts:
@@ -98,7 +98,7 @@ diff --git a/build/moz.configure/warnings.configure b/build/moz.configure/warnin
 +++ b/build/moz.configure/warnings.configure
 @@ -8,16 +8,28 @@ js_option('--enable-warnings-as-errors',
            default=depends('MOZ_AUTOMATION')(lambda x: bool(x)),
-           help='Enable treating warnings as errors')
+           help='{Enable|Disable} treating warnings as errors')
  
  add_old_configure_assignment(
      'MOZ_ENABLE_WARNINGS_AS_ERRORS',

+ 0 - 0
mozilla-release/patches/1513134-1no2-66a1.patch → mozilla-release/patches/1513134-1-66a1.patch


+ 78 - 0
mozilla-release/patches/1513134-2-66a1.patch

@@ -0,0 +1,78 @@
+# HG changeset patch
+# User Mike Hommey <mh+mozilla@glandium.org>
+# Date 1544556835 0
+#      Tue Dec 11 19:33:55 2018 +0000
+# Node ID bcbedb8171376816a4b4ee399d4bffe197e42aae
+# Parent  102e1705153d3b224283c127522ef909d4a41df6
+Bug 1513134 - Don't rely on ConfigureSandbox._imports for the lint. r=firefox-build-system-reviewers,gps
+
+_imports is cleared of functions at runtime, and that can cause
+the `func in self._imports` test to return False in cases where the
+function *does* have imports.
+
+Make the lint track which functions has imports on its own.
+
+This fortunately didn't cause mistakes not being caught by the lint in
+the current python configure code, but causes problems with upcoming
+changes.
+
+Depends on D14124
+
+Differential Revision: https://phabricator.services.mozilla.com/D14125
+
+diff --git a/python/mozbuild/mozbuild/configure/lint.py b/python/mozbuild/mozbuild/configure/lint.py
+--- a/python/mozbuild/mozbuild/configure/lint.py
++++ b/python/mozbuild/mozbuild/configure/lint.py
+@@ -22,16 +22,17 @@ from mozbuild.util import memoize
+ class LintSandbox(ConfigureSandbox):
+     def __init__(self, environ=None, argv=None, stdout=None, stderr=None):
+         out = StringIO()
+         stdout = stdout or out
+         stderr = stderr or out
+         environ = environ or {}
+         argv = argv or []
+         self._wrapped = {}
++        self._has_imports = set()
+         super(LintSandbox, self).__init__({}, environ=environ, argv=argv,
+                                           stdout=stdout, stderr=stderr)
+ 
+     def run(self, path=None):
+         if path:
+             self.include_file(path)
+ 
+         for dep in self._depends.itervalues():
+@@ -81,17 +82,17 @@ class LintSandbox(ConfigureSandbox):
+             if (self._help_option in obj.dependencies or
+                 obj in (self._always, self._never)):
+                 return False
+             func, glob = self.unwrap(obj._func)
+             # We allow missing --help dependencies for functions that:
+             # - don't use @imports
+             # - don't have a closure
+             # - don't use global variables
+-            if func in self._imports or func.func_closure:
++            if func in self._has_imports or func.func_closure:
+                 return True
+             for op, arg in disassemble_as_iter(func):
+                 if op in ('LOAD_GLOBAL', 'STORE_GLOBAL'):
+                     # There is a fake os module when one is not imported,
+                     # and it's allowed for functions without a --help
+                     # dependency.
+                     if arg == 'os' and glob.get('os') is self.OS:
+                         continue
+@@ -131,8 +132,15 @@ class LintSandbox(ConfigureSandbox):
+             func = self._wrapped[func]
+         return func, glob
+ 
+     def wraps(self, func):
+         def do_wraps(wrapper):
+             self._wrapped[wrapper] = func
+             return wraps(func)(wrapper)
+         return do_wraps
++
++    def imports_impl(self, _import, _from=None, _as=None):
++        wrapper = super(LintSandbox, self).imports_impl(_import, _from=_from, _as=_as)
++        def decorator(func):
++            self._has_imports.add(func)
++            return wrapper(func)
++        return decorator

+ 27 - 22
mozilla-release/patches/1513134-3-66a1.patch

@@ -3,7 +3,7 @@
 # Date 1544556868 0
 #      Tue Dec 11 19:34:28 2018 +0000
 # Node ID 0f7e4ff45912953576a5c3420cc0ac94abe0ca5b
-# Parent  aa12b511865f87687ff65a8050fd3af3db0f07d0
+# Parent  e7874cea0ab27de1f26e9e080f1880e6b28319cf
 Bug 1513134 - Detect unnecessary --help dependencies. r=firefox-build-system-reviewers,gps
 
 Depends on D14125
@@ -90,7 +90,7 @@ diff --git a/build/moz.configure/init.configure b/build/moz.configure/init.confi
 diff --git a/build/moz.configure/toolchain.configure b/build/moz.configure/toolchain.configure
 --- a/build/moz.configure/toolchain.configure
 +++ b/build/moz.configure/toolchain.configure
-@@ -184,18 +184,18 @@ set_config('HAVE_NASM', have_nasm)
+@@ -183,18 +183,18 @@ set_config('HAVE_NASM', have_nasm)
  set_config('HAVE_YASM', have_yasm)
  # Until the YASM variable is not necessary in old-configure.
  add_old_configure_assignment('YASM', have_yasm)
@@ -124,7 +124,7 @@ diff --git a/build/moz.configure/warnings.configure b/build/moz.configure/warnin
  js_option('--enable-warnings-as-errors', env='MOZ_ENABLE_WARNINGS_AS_ERRORS',
 -          default=depends('MOZ_AUTOMATION', '--help')(lambda x, _: bool(x)),
 +          default=depends('MOZ_AUTOMATION')(lambda x: bool(x)),
-           help='Enable treating warnings as errors')
+           help='{Enable|Disable} treating warnings as errors')
  
  add_old_configure_assignment(
      'MOZ_ENABLE_WARNINGS_AS_ERRORS',
@@ -156,7 +156,7 @@ diff --git a/js/moz.configure b/js/moz.configure
  # will still need to be set depending on building_js above.
  option(env='JS_STANDALONE', default=building_js,
         help='Reserved for internal use')
-@@ -237,18 +237,18 @@ js_option('--enable-callgrind', env='MOZ
+@@ -253,18 +253,18 @@ js_option('--enable-callgrind', env='MOZ
  @depends('--enable-callgrind')
  def callgrind(value):
      if value:
@@ -172,12 +172,12 @@ diff --git a/js/moz.configure b/js/moz.configure
      return milestone.is_nightly
  
  js_option('--enable-profiling', env='MOZ_PROFILING', default=enable_profiling,
-           help='Set compile flags necessary for using sampling profilers '
-                '(e.g. shark, perf)')
+           help='{Set|Do not set} compile flags necessary for using sampling '
+                 'profilers (e.g. shark, perf)')
  
  @depends('--enable-profiling')
  def profiling(value):
-@@ -362,18 +362,18 @@ def more_deterministic(value):
+@@ -396,18 +396,18 @@ def more_deterministic(value):
      if value:
          return True
  
@@ -192,13 +192,13 @@ diff --git a/js/moz.configure b/js/moz.configure
 +def ctypes_default(building_js):
      return not building_js
  
- js_option('--enable-ctypes', help='Enable js-ctypes',
-           default=ctypes_default)
+ js_option('--enable-ctypes',
+           default=ctypes_default,
+           help='{Enable|Disable} js-ctypes')
  
  build_ctypes = depends_if('--enable-ctypes')(lambda _: True)
  
- set_config('BUILD_CTYPES', build_ctypes)
-@@ -384,18 +384,18 @@ add_old_configure_assignment('BUILD_CTYP
+@@ -419,18 +419,18 @@ add_old_configure_assignment('BUILD_CTYP
  def js_has_ctypes(ctypes, js):
      if ctypes and js:
          return True
@@ -222,7 +222,7 @@ diff --git a/js/moz.configure b/js/moz.configure
 diff --git a/python/mozbuild/mozbuild/configure/lint.py b/python/mozbuild/mozbuild/configure/lint.py
 --- a/python/mozbuild/mozbuild/configure/lint.py
 +++ b/python/mozbuild/mozbuild/configure/lint.py
-@@ -59,32 +59,31 @@ class LintSandbox(ConfigureSandbox):
+@@ -60,32 +60,31 @@ class LintSandbox(ConfigureSandbox):
          for op, arg in disassemble_as_iter(func):
              if op in ('LOAD_FAST', 'LOAD_CLOSURE'):
                  if arg in all_args:
@@ -256,9 +256,9 @@ diff --git a/python/mozbuild/mozbuild/configure/lint.py b/python/mozbuild/mozbui
              # - don't use @imports
              # - don't have a closure
              # - don't use global variables
-             if func in self._imports or func.func_closure:
+             if func in self._has_imports or func.func_closure:
                  return True
-@@ -95,16 +94,22 @@ class LintSandbox(ConfigureSandbox):
+@@ -96,16 +95,22 @@ class LintSandbox(ConfigureSandbox):
                      # dependency.
                      if arg == 'os' and glob.get('os') is self.OS:
                          continue
@@ -375,7 +375,7 @@ diff --git a/toolkit/moz.configure b/toolkit/moz.configure
         nargs='*',
         choices=('widevine',),
         default=eme_default,
-        help='Enable support for Encrypted Media Extensions')
+        help='{Enable|Disable} support for Encrypted Media Extensions')
 @@ -742,18 +742,18 @@ option('--disable-synth-speechd', help='
  
  set_config('MOZ_SYNTH_SPEECHD',
@@ -397,7 +397,7 @@ diff --git a/toolkit/moz.configure b/toolkit/moz.configure
  add_old_configure_assignment('MOZ_WEBSPEECH', webspeech)
  
  # Speech API test backend
-@@ -1222,18 +1222,18 @@ set_config('MOZ_VERIFY_MAR_SIGNATURE',
+@@ -1224,18 +1224,18 @@ set_config('MOZ_VERIFY_MAR_SIGNATURE',
  option('--enable-tasktracer', help='Enable TaskTracer')
  
  set_define('MOZ_TASK_TRACER', depends_if('--enable-tasktracer')(lambda _: True))
@@ -413,19 +413,23 @@ diff --git a/toolkit/moz.configure b/toolkit/moz.configure
      if debug:
          return True
  
- option('--enable-reflow-perf', help='Enable reflow performance tracing',
-        default=reflow_perf)
+ option('--enable-reflow-perf',
+        default=reflow_perf,
+        help='{Enable|Disable} reflow performance tracing')
  
  # The difference in conditions here comes from the initial implementation
- # in old-configure, which was unexplained there as well.
 diff --git a/toolkit/moz.configure.1513134-3.later b/toolkit/moz.configure.1513134-3.later
 new file mode 100644
 --- /dev/null
 +++ b/toolkit/moz.configure.1513134-3.later
-@@ -0,0 +1,19 @@
+@@ -0,0 +1,23 @@
 +--- moz.configure
 ++++ moz.configure
 +@@ -1236,35 +1236,35 @@ set_config('MOZ_VERIFY_MAR_SIGNATURE',
++ # The difference in conditions here comes from the initial implementation
++ # in old-configure, which was unexplained there as well.
++ set_define('MOZ_REFLOW_PERF', depends_if('--enable-reflow-perf')(lambda _: True))
++ set_define('MOZ_REFLOW_PERF_DSP', reflow_perf)
 + 
 + # Layout debugger
 + # ==============================================================
@@ -445,7 +449,7 @@ new file mode 100644
 diff --git a/toolkit/nss.configure b/toolkit/nss.configure
 --- a/toolkit/nss.configure
 +++ b/toolkit/nss.configure
-@@ -2,15 +2,15 @@
+@@ -2,16 +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
@@ -460,6 +464,7 @@ diff --git a/toolkit/nss.configure b/toolkit/nss.configure
 +def dbm_default(build_project):
      return build_project != 'mobile/android'
  
- option('--enable-dbm', default=dbm_default, help='Enable building DBM')
+ option('--enable-dbm', default=dbm_default,
+        help='{Enable|Disable} building DBM')
  
  set_config('NSS_DISABLE_DBM', depends('--enable-dbm')(lambda x: not x))

+ 9 - 9
mozilla-release/patches/1514089-66a1.patch

@@ -2,7 +2,7 @@
 # User Mike Hommey <mh+mozilla@glandium.org>
 # Date 1544799364 0
 # Node ID 8d89b44a16de1138fee1ca2ed5737611c4de5097
-# Parent  464d232e8a53647c11e3edd6da4309e34f2e2ddd
+# Parent  1ee1e3e03d4c0872e2a5f0c3e142839329e85fa8
 Bug 1514089 - Move fxc and wine detection to toolkit/moz.configure. r=froydnj
 
 They are not necessary to build e.g. standalone spidermonkey.
@@ -12,7 +12,7 @@ Differential Revision: https://phabricator.services.mozilla.com/D14513
 diff --git a/build/moz.configure/toolchain.configure b/build/moz.configure/toolchain.configure
 --- a/build/moz.configure/toolchain.configure
 +++ b/build/moz.configure/toolchain.configure
-@@ -1423,24 +1423,16 @@ set_config('PREPROCESS_OPTION', preproce
+@@ -1405,24 +1405,16 @@ set_config('PREPROCESS_OPTION', preproce
  
  @depends(target, host)
  def is_windows(target, host):
@@ -40,14 +40,14 @@ diff --git a/build/moz.configure/toolchain.configure b/build/moz.configure/toolc
 diff --git a/toolkit/moz.configure b/toolkit/moz.configure
 --- a/toolkit/moz.configure
 +++ b/toolkit/moz.configure
-@@ -1140,15 +1140,25 @@ def unsigned_addon_scopes(scopes):
-     return namespace(
-         app='app' in scopes or None,
-         system='system' in scopes or None,
-     )
+@@ -1230,15 +1230,25 @@ option('--enable-reflow-perf',
+        default=reflow_perf,
+        help='{Enable|Disable} reflow performance tracing')
  
- set_config('MOZ_UNSIGNED_APP_SCOPE', unsigned_addon_scopes.app)
- set_config('MOZ_UNSIGNED_SYSTEM_SCOPE', unsigned_addon_scopes.system)
+ # The difference in conditions here comes from the initial implementation
+ # in old-configure, which was unexplained there as well.
+ set_define('MOZ_REFLOW_PERF', depends_if('--enable-reflow-perf')(lambda _: True))
+ set_define('MOZ_REFLOW_PERF_DSP', reflow_perf)
  
 +
 +# Shader Compiler for Windows (and MinGW Cross Compile)

+ 5 - 5
mozilla-release/patches/1514448-66a1.patch

@@ -2,7 +2,7 @@
 # User Mike Hommey <mh+mozilla@glandium.org>
 # Date 1544895899 0
 # Node ID 07c40fd43ee1f3220cc77f2d45de86a4418fc47f
-# Parent  5a652bdcbaf0906b7f22f6da7fba465fc7057b0b
+# Parent  e71037d9238164fde07141d2b4cda76fd56ed914
 Bug 1514448 - Only check for fxc/wine when building with a compile environment. r=froydnj
 
 Bug 1514089 moved the check from toolchain.configure, which is only
@@ -15,10 +15,10 @@ Differential Revision: https://phabricator.services.mozilla.com/D14675
 diff --git a/toolkit/moz.configure b/toolkit/moz.configure
 --- a/toolkit/moz.configure
 +++ b/toolkit/moz.configure
-@@ -1144,20 +1144,21 @@ def unsigned_addon_scopes(scopes):
- 
- set_config('MOZ_UNSIGNED_APP_SCOPE', unsigned_addon_scopes.app)
- set_config('MOZ_UNSIGNED_SYSTEM_SCOPE', unsigned_addon_scopes.system)
+@@ -1234,20 +1234,21 @@ option('--enable-reflow-perf',
+ # in old-configure, which was unexplained there as well.
+ set_define('MOZ_REFLOW_PERF', depends_if('--enable-reflow-perf')(lambda _: True))
+ set_define('MOZ_REFLOW_PERF_DSP', reflow_perf)
  
  
  # Shader Compiler for Windows (and MinGW Cross Compile)

+ 27 - 30
mozilla-release/patches/1515579-2only-66a1.patch

@@ -2,7 +2,7 @@
 # User Mike Hommey <mh+mozilla@glandium.org>
 # Date 1547163466 0
 # Node ID fa8e39feef4389d1ff83fe952c76ffba7c2217d6
-# Parent  8c386fe82f74e7cc20d61f839d7438a65e58dfba
+# Parent  e7471e7b9ff0b38226b257b363daecd74d28bacb
 Bug 1515579 - Use absolute paths for compilers, etc. r=ted
 
 In bug 1259382, some workarounds were added to make the build system
@@ -23,7 +23,7 @@ Differential Revision: https://phabricator.services.mozilla.com/D15182
 diff --git a/build/moz.configure/toolchain.configure b/build/moz.configure/toolchain.configure
 --- a/build/moz.configure/toolchain.configure
 +++ b/build/moz.configure/toolchain.configure
-@@ -723,37 +723,65 @@ def vc_compiler_path(host, target, vs_ma
+@@ -722,37 +722,65 @@ def vc_compiler_path(host, target, vs_ma
          # Choose the newest version.
          data = all_versions[-1][1]
      paths = data.get(vc_target)
@@ -34,36 +34,21 @@ diff --git a/build/moz.configure/toolchain.configure b/build/moz.configure/toolc
  
 -@depends(vc_compiler_path)
 +@dependable
- @imports('os')
--def toolchain_search_path(vc_compiler_path):
++@imports('os')
 +@imports(_from='os', _import='environ')
 +def original_path():
 +    return environ['PATH'].split(os.pathsep)
 +
 +
 +@depends(vc_compiler_path, original_path)
-+@imports('os')
+ @imports('os')
+-def toolchain_search_path(vc_compiler_path):
 +@imports(_from='os', _import='environ')
 +def toolchain_search_path(vc_compiler_path, original_path):
 +    result = list(original_path)
      if vc_compiler_path:
 -        result = [os.environ.get('PATH')]
 -        result.extend(vc_compiler_path)
--
--        # Also add in the location to which `mach bootstrap` or
--        # `mach artifact toolchain` installs clang.
--        mozbuild_state_dir = os.environ.get('MOZBUILD_STATE_PATH',
--                                            os.path.expanduser(os.path.join('~', '.mozbuild')))
--        bootstrap_clang_path = os.path.join(mozbuild_state_dir, 'clang', 'bin')
--        result.append(bootstrap_clang_path)
--
--        bootstrap_cbindgen_path = os.path.join(mozbuild_state_dir, 'cbindgen')
--        result.append(bootstrap_cbindgen_path)
--
--        # We're going to alter PATH for good in windows.configure, but we also
--        # need to do it for the valid_compiler() check below.
--        os.environ['PATH'] = os.pathsep.join(result)
--        return result
 +        # The second item, if there is one, is necessary to have in $PATH for
 +        # Windows to load the required DLLs from there.
 +        if len(vc_compiler_path) > 1:
@@ -71,7 +56,13 @@ diff --git a/build/moz.configure/toolchain.configure b/build/moz.configure/toolc
 +
 +        # The first item is where the programs are going to be
 +        result.append(vc_compiler_path[0])
-+
+ 
+-        # Also add in the location to which `mach bootstrap` or
+-        # `mach artifact toolchain` installs clang.
+-        mozbuild_state_dir = os.environ.get('MOZBUILD_STATE_PATH',
+-                                            os.path.expanduser(os.path.join('~', '.mozbuild')))
+-        bootstrap_clang_path = os.path.join(mozbuild_state_dir, 'clang', 'bin')
+-        result.append(bootstrap_clang_path)
 +    # Also add in the location to which `mach bootstrap` or
 +    # `mach artifact toolchain` installs clang.
 +    mozbuild_state_dir = os.environ.get('MOZBUILD_STATE_PATH',
@@ -84,7 +75,9 @@ diff --git a/build/moz.configure/toolchain.configure b/build/moz.configure/toolc
 +
 +    return result
 +
-+
+ 
+-        bootstrap_cbindgen_path = os.path.join(mozbuild_state_dir, 'cbindgen')
+-        result.append(bootstrap_cbindgen_path)
 +# As a workaround until bug 1516228 and bug 1516253 are fixed, set the PATH
 +# variable for the build to contain the toolchain search path.
 +@depends(toolchain_search_path)
@@ -97,7 +90,11 @@ diff --git a/build/moz.configure/toolchain.configure b/build/moz.configure/toolc
 +        if p not in altered_path:
 +            altered_path.append(p)
 +    return os.pathsep.join(altered_path)
-+
+ 
+-        # We're going to alter PATH for good in windows.configure, but we also
+-        # need to do it for the valid_compiler() check below.
+-        os.environ['PATH'] = os.pathsep.join(result)
+-        return result
 +
 +set_config('PATH', altered_path)
  
@@ -108,7 +105,7 @@ diff --git a/build/moz.configure/toolchain.configure b/build/moz.configure/toolc
      target platforms.
      `host_or_target` is either `host` or `target` (the @depends functions
      from init.configure.
-@@ -960,36 +988,16 @@ def compiler(language, host_or_target, c
+@@ -959,36 +987,16 @@ def compiler(language, host_or_target, c
              wrapper.extend(provided_wrapper)
              flags = provided_compiler.flags
          else:
@@ -145,7 +142,7 @@ diff --git a/build/moz.configure/toolchain.configure b/build/moz.configure/toolc
          # invalid command-line flags, which means the compiler we're checking
          # doesn't support those command-line flags and will fail one or more of
          # the checks below.
-@@ -1434,17 +1442,18 @@ def pgo_flags(compiler, build_env, targe
+@@ -1416,17 +1424,18 @@ def pgo_flags(compiler, build_env, targe
  
  
  set_config('PROFILE_GEN_CFLAGS', pgo_flags.gen_cflags)
@@ -158,14 +155,14 @@ diff --git a/build/moz.configure/toolchain.configure b/build/moz.configure/toolc
 +                           allow_missing=True,
 +                           paths=toolchain_search_path)
  
- 
  @depends(c_compiler)
  def preprocess_option(compiler):
      # The uses of PREPROCESS_OPTION depend on the spacing for -o/-Fi.
      if compiler.type in ('gcc', 'clang'):
          return '-E -o '
      else:
-@@ -1904,17 +1913,18 @@ def as_info(target, c_compiler):
+         return '-P -Fi'
+@@ -1885,17 +1894,18 @@ def as_info(target, c_compiler):
  # One would expect the assembler to be specified merely as a program.  But in
  # cases where the assembler is passed down into js/, it can be specified in
  # the same way as CC: a program + a list of argument flags.  We might as well
@@ -264,7 +261,7 @@ diff --git a/build/moz.configure/windows.configure b/build/moz.configure/windows
 diff --git a/toolkit/moz.configure b/toolkit/moz.configure
 --- a/toolkit/moz.configure
 +++ b/toolkit/moz.configure
-@@ -1095,17 +1095,18 @@ def midl_names(c_compiler, toolchain_pre
+@@ -1096,17 +1096,18 @@ def midl_names(c_compiler, toolchain_pre
  def check_for_midl(target, compile_environment):
      if target.os != 'WINNT':
          return
@@ -284,8 +281,8 @@ diff --git a/toolkit/moz.configure b/toolkit/moz.configure
          env = {
              'x86': 'win32',
              'x86_64': 'x64',
-@@ -1168,17 +1169,18 @@ set_config('MOZ_UNSIGNED_APP_SCOPE', uns
- set_config('MOZ_UNSIGNED_SYSTEM_SCOPE', unsigned_addon_scopes.system)
+@@ -1236,17 +1237,18 @@ set_define('MOZ_REFLOW_PERF', depends_if
+ set_define('MOZ_REFLOW_PERF_DSP', reflow_perf)
  
  
  # Shader Compiler for Windows (and MinGW Cross Compile)

+ 3 - 2
mozilla-release/patches/1515746-2-67a1.patch

@@ -2,7 +2,7 @@
 # User Andrew Halberstadt <ahalberstadt@mozilla.com>
 # Date 1549570605 0
 # Node ID 3c7c50fba28399ae0d1a3812e5088cde55aacd8e
-# Parent  aea3f36c877d9dd5e096292594e7e2794e04f38d
+# Parent  2788438487ee47c7654bbf30631049442c271424
 Bug 1515746 - [flake8] Upgrade flake8 and dependencies, r=egao
 
 This bumps flake8 to version 3.7.5.
@@ -17,7 +17,7 @@ Differential Revision: https://phabricator.services.mozilla.com/D18353
 diff --git a/.flake8 b/.flake8
 --- a/.flake8
 +++ b/.flake8
-@@ -1,21 +1,32 @@
+@@ -1,22 +1,33 @@
  [flake8]
  # See http://pep8.readthedocs.io/en/latest/intro.html#configuration
  ignore = E121, E123, E126, E129, E133, E226, E241, E242, E704, W503, E402, E741
@@ -36,6 +36,7 @@ diff --git a/.flake8 b/.flake8
      ipc/chromium/,
      js/*.configure,
      memory/moz.configure,
+     node_modules,
      security/nss/,
      testing/mochitest/pywebsocket,
      tools/lint/test/files,

+ 3 - 3
mozilla-release/patches/1515746-3-67a1.patch

@@ -2,7 +2,7 @@
 # User Andrew Halberstadt <ahalberstadt@mozilla.com>
 # Date 1549570622 0
 # Node ID f96c1460ffc09ef61bf3e2c93bfda21cdb86fb2f
-# Parent  4e8341e883c1615b4db10b103ea4f8dbe46ad34b
+# Parent  239fdeffceae0bb02adee7fd66751b1760d795ef
 Bug 1515746 - [flake8] Unsupport subdir .flake8 files and use new 'per-file-ignores' config instead, r=egao
 
 This removes all .flake8 files except for the one at the root of the repo.
@@ -25,14 +25,14 @@ Differential Revision: https://phabricator.services.mozilla.com/D18354
 diff --git a/.flake8 b/.flake8
 --- a/.flake8
 +++ b/.flake8
-@@ -11,22 +11,31 @@ exclude =
-     gfx/angle/,
+@@ -12,22 +12,31 @@ exclude =
      gfx/harfbuzz,
      glx/skia/,
      intl/icu/,
      ipc/chromium/,
      js/*.configure,
      memory/moz.configure,
+     node_modules,
      security/nss/,
 +    testing/firefox-ui/**/__init__.py,
 +    testing/marionette/**/__init__.py,

+ 28 - 31
mozilla-release/patches/1519040-66a1.patch

@@ -2,7 +2,7 @@
 # User Mike Hommey <mh+mozilla@glandium.org>
 # Date 1547157724 0
 # Node ID 3f00314f0fe03d7b9166323326a136349b17b736
-# Parent  9c2fd7bb553001229b5eb54357036cab34dda989
+# Parent  83d9aa0f1d7532a6c5feb465cbc594b808abb94c
 Bug 1519040 - Remove some unused old-configure assignments. r=mshal
 
 Differential Revision: https://phabricator.services.mozilla.com/D16159
@@ -92,7 +92,26 @@ diff --git a/build/moz.configure/rust.configure b/build/moz.configure/rust.confi
 diff --git a/build/moz.configure/toolchain.configure b/build/moz.configure/toolchain.configure
 --- a/build/moz.configure/toolchain.configure
 +++ b/build/moz.configure/toolchain.configure
-@@ -376,19 +376,16 @@ def compiler_wrapper(wrapper, ccache):
+@@ -21,17 +21,17 @@ def developer_options(value):
+ add_old_configure_assignment('DEVELOPER_OPTIONS', developer_options)
+ set_config('DEVELOPER_OPTIONS', developer_options)
+ 
+ # PGO
+ # ==============================================================
+ js_option(env='MOZ_PGO', help='Build with profile guided optimizations')
+ 
+ set_config('MOZ_PGO', depends('MOZ_PGO')(lambda x: bool(x)))
+-add_old_configure_assignment('MOZ_PGO', depends('MOZ_PGO')(lambda x: bool(x)))
++
+ 
+ # Code optimization
+ # ==============================================================
+ 
+ js_option('--disable-optimize',
+           nargs='?',
+           help='Disable optimizations via compiler flags')
+ 
+@@ -375,19 +375,16 @@ def compiler_wrapper(wrapper, ccache):
          if wrapper:
              return tuple([ccache] + wrapper)
          else:
@@ -112,7 +131,7 @@ diff --git a/build/moz.configure/toolchain.configure b/build/moz.configure/toolc
  set_config('MOZ_USING_COMPILER_WRAPPER', using_compiler_wrapper)
  
  
-@@ -1439,18 +1436,16 @@ def pgo_flags(compiler, build_env, targe
+@@ -1421,19 +1418,16 @@ def pgo_flags(compiler, build_env, targe
  set_config('PROFILE_GEN_CFLAGS', pgo_flags.gen_cflags)
  set_config('PROFILE_GEN_LDFLAGS', pgo_flags.gen_ldflags)
  set_config('PROFILE_USE_CFLAGS', pgo_flags.use_cflags)
@@ -123,7 +142,7 @@ diff --git a/build/moz.configure/toolchain.configure b/build/moz.configure/toolc
  
 -add_old_configure_assignment('LLVM_PROFDATA', llvm_profdata)
 -
- 
+-
  @depends(c_compiler)
  def preprocess_option(compiler):
      # The uses of PREPROCESS_OPTION depend on the spacing for -o/-Fi.
@@ -131,6 +150,7 @@ diff --git a/build/moz.configure/toolchain.configure b/build/moz.configure/toolc
          return '-E -o '
      else:
          return '-P -Fi'
+ 
 diff --git a/js/ffi.configure b/js/ffi.configure
 --- a/js/ffi.configure
 +++ b/js/ffi.configure
@@ -155,10 +175,10 @@ diff --git a/js/ffi.configure b/js/ffi.configure
 diff --git a/js/moz.configure b/js/moz.configure
 --- a/js/moz.configure
 +++ b/js/moz.configure
-@@ -373,26 +373,24 @@ def ctypes_default(building_js):
- 
- js_option('--enable-ctypes', help='Enable js-ctypes',
-           default=ctypes_default)
+@@ -408,26 +408,24 @@ def ctypes_default(building_js):
+ js_option('--enable-ctypes',
+           default=ctypes_default,
+           help='{Enable|Disable} js-ctypes')
  
  build_ctypes = depends_if('--enable-ctypes')(lambda _: True)
  
@@ -182,26 +202,3 @@ diff --git a/js/moz.configure b/js/moz.configure
  include('ffi.configure', when=ctypes_and_compile_environment)
  
  
-diff --git a/moz.configure b/moz.configure
---- a/moz.configure
-+++ b/moz.configure
-@@ -121,16 +121,19 @@ def debug_rust(value, debug):
-     if value.origin == 'default':
-         return bool(debug) or None
-     elif bool(value):
-         return True
- 
- set_config('MOZ_DEBUG_RUST', debug_rust)
- set_define('MOZ_DEBUG_RUST', debug_rust)
- 
-+# later
-+# -add_old_configure_assignment('MOZ_PGO', depends('MOZ_PGO')(lambda x: bool(x)))
-+
- include('build/moz.configure/pkg.configure')
- # Make this assignment here rather than in pkg.configure to avoid
- # requiring this file in unit tests.
- add_old_configure_assignment('PKG_CONFIG', pkg_config)
- 
- include('build/moz.configure/toolchain.configure',
-         when='--enable-compile-environment')
- include('build/moz.configure/memory.configure',

+ 2 - 2
mozilla-release/patches/1519307-66a1.patch

@@ -21,12 +21,12 @@ Differential Revision: https://phabricator.services.mozilla.com/D16299
 diff --git a/.flake8 b/.flake8
 --- a/.flake8
 +++ b/.flake8
-@@ -13,8 +13,9 @@ exclude =
-     glx/skia/,
+@@ -14,8 +14,9 @@ exclude =
      intl/icu/,
      ipc/chromium/,
      js/*.configure,
      memory/moz.configure,
+     node_modules,
      security/nss/,
      testing/mochitest/pywebsocket,
      tools/lint/test/files,

+ 5 - 5
mozilla-release/patches/1519308-66a1.patch

@@ -2,7 +2,7 @@
 # User Mike Hommey <mh+mozilla@glandium.org>
 # Date 1547250979 0
 # Node ID 6685e8b9d8671c087c5190537aa22f17f32ee8bb
-# Parent  07d13bfd0c75c030ed648779252f2e3f65cdce79
+# Parent  23b8dea85b766d30aa2424d4403947ba757e29ae
 Bug 1519308 - Try toolchain-prefixed pkg-config. r=froydnj
 
 When doing cross-compiles for Desktop, system pkg-config is going to be
@@ -42,15 +42,15 @@ diff --git a/build/moz.configure/pkg.configure b/build/moz.configure/pkg.configu
 diff --git a/moz.configure b/moz.configure
 --- a/moz.configure
 +++ b/moz.configure
-@@ -135,23 +135,24 @@ def debug_rust(value, debug):
+@@ -122,23 +122,24 @@ def debug_rust(value, debug):
+     if value.origin == 'default':
+         return bool(debug) or None
+     elif bool(value):
          return True
  
  set_config('MOZ_DEBUG_RUST', debug_rust)
  set_define('MOZ_DEBUG_RUST', debug_rust)
  
- # later
- # -add_old_configure_assignment('MOZ_PGO', depends('MOZ_PGO')(lambda x: bool(x)))
- 
 +include('build/moz.configure/toolchain.configure',
 +        when='--enable-compile-environment')
 +

+ 4 - 5
mozilla-release/patches/1519325-66a1.patch

@@ -2,7 +2,7 @@
 # User Mike Hommey <mh+mozilla@glandium.org>
 # Date 1547245284 0
 # Node ID e69490bbd056d1fd3516cc44f1b2d88700b6d647
-# Parent  d11a57d66098c5a45b83d34a1c55f9128936d597
+# Parent  2e105e2c1418d5861df9cba3752ca19977ba82b5
 Bug 1519325 - Move D3D compiler DLL detection to python configure. r=froydnj
 
 MOZ_D3D_CPU_SUFFIX and MOZ_HAS_WINSDK_WITH_D3D are not used in the
@@ -180,7 +180,7 @@ diff --git a/old-configure.in b/old-configure.in
        AC_MSG_ERROR([Can't find header linux/joystick.h, needed for gamepad support. Please install Linux kernel headers.])
      fi
  fi
-@@ -3176,22 +3064,16 @@ AC_SUBST(MOZ_UNIVERSALCHARDET)
+@@ -3178,22 +3066,16 @@ AC_SUBST(MOZ_UNIVERSALCHARDET)
  AC_SUBST(MOZ_SPELLCHECK)
  AC_SUBST(MOZ_ANDROID_ANR_REPORTER)
  AC_SUBST(MOZ_CRASHREPORTER)
@@ -206,7 +206,7 @@ diff --git a/old-configure.in b/old-configure.in
 diff --git a/toolkit/moz.configure b/toolkit/moz.configure
 --- a/toolkit/moz.configure
 +++ b/toolkit/moz.configure
-@@ -1179,17 +1179,16 @@ set_config('MOZ_UNSIGNED_SYSTEM_SCOPE', 
+@@ -1247,17 +1247,16 @@ set_define('MOZ_REFLOW_PERF_DSP', reflow
  
  # Shader Compiler for Windows (and MinGW Cross Compile)
  # ==============================================================
@@ -224,7 +224,7 @@ diff --git a/toolkit/moz.configure b/toolkit/moz.configure
  # ===
  
  with only_when(compile_environment):
-@@ -1419,16 +1418,57 @@ def valid_yasm_version(yasm_version, for
+@@ -1487,15 +1486,56 @@ def valid_yasm_version(yasm_version, for
      by_version = sorted(versioned.items(), key=lambda x: x[1])
      if by_version:
          what, version = by_version[-1]
@@ -281,4 +281,3 @@ diff --git a/toolkit/moz.configure b/toolkit/moz.configure
  
  set_config("MOZ_CRASHREPORTER_URL",
             depends("--with-crashreporter-url")(lambda x: x[0].rstrip("/")))
- 

+ 31 - 0
mozilla-release/patches/1520458-3only-88a1.patch

@@ -0,0 +1,31 @@
+# HG changeset patch
+# User Andrew Halberstadt <ahal@mozilla.com>
+# Date 1616424918 0
+# Node ID 20db6507d9f4154a08bd93571d0a4b3683f15df1
+# Parent  5be23e11d54ed828eafd5e58e656c5cfd1bc45b9
+Bug 1520458 - Run ./mach raptor with Python 3, r=perftest-reviewers,Bebe,sparky
+
+Differential Revision: https://phabricator.services.mozilla.com/D108828
+
+diff --git a/mach b/mach
+--- a/mach
++++ b/mach
+@@ -7,18 +7,16 @@
+ # such that the script starts with the shell and is reexecuted with
+ # the right Python.
+ 
+ # Embeds a shell script inside a Python triple quote. This pattern is valid
+ # shell because `''':'`, `':'` and `:` are all equivalent, and `:` is a no-op.
+ ''':'
+ # Commands that are to be run with Python 2.
+ py2commands="
+-    raptor
+-    raptor-test
+     telemetry-tests-client
+ "
+ 
+ # Commands that are to be run with the system Python 3 instead of the
+ # virtualenv.
+ nativecmds="
+     bootstrap
+     create-mach-environment

+ 190 - 0
mozilla-release/patches/1524467-2-67a1.patch

@@ -0,0 +1,190 @@
+# HG changeset patch
+# User Mike Hommey <mh+mozilla@glandium.org>
+# Date 1549326453 0
+# Node ID ead57b4507aca2a98f58db477109c914030d458e
+# Parent  10ca83e29aacfe09128cdc5a4a82ec25526cd2f8
+Bug 1524467 - Fix and refactor basic_bindgen_cflags. r=froydnj
+
+basic_bindgen_cflags's function is to set some flags for use with
+rust-bindgen through clang/libclang for C++ code. Part of the flags it
+sets are for the C++ standard, and the target.
+
+Unfortunately, some of the logic wrt target-specific flags is currently
+broken. It wants to apply per-compiler flags on Windows, but fails to do
+so. First, because the condition test is wrong, and second, because it
+only cares about msvc and not clang-cl.
+
+OTOH, we already have those flags when the compiler is clang or
+clang-cl. And we already have code to get the right flags for a given
+compiler. So when the compiler is not clang or clang-cl, we can use that
+to get the right flags for the clang we're going to use for bindgen.
+
+Depends on D18316
+
+Differential Revision: https://phabricator.services.mozilla.com/D18317
+
+diff --git a/build/moz.configure/bindgen.configure b/build/moz.configure/bindgen.configure
+--- a/build/moz.configure/bindgen.configure
++++ b/build/moz.configure/bindgen.configure
+@@ -255,123 +255,68 @@ def bindgen_config_paths(llvm_config, li
+         libclang_path=libclang_path,
+         clang_path=clang_resolved,
+     )
+ 
+ set_config('MOZ_LIBCLANG_PATH', bindgen_config_paths.libclang_path)
+ set_config('MOZ_CLANG_PATH', bindgen_config_paths.clang_path)
+ 
+ 
+-@depends(host, target, target_is_unix, c_compiler, bindgen_cflags_android)
+-def basic_bindgen_cflags(host, target, is_unix, compiler_info, android_cflags):
++@depends(target, target_is_unix, cxx_compiler, bindgen_cflags_android,
++         bindgen_config_paths.clang_path)
++def basic_bindgen_cflags(target, is_unix, compiler_info, android_cflags, clang_path):
+     args = [
+-        '-x', 'c++', '-std=gnu++14', '-fno-sized-deallocation',
++        '-x', 'c++', '-fno-sized-deallocation',
+         '-DTRACING=1', '-DIMPL_LIBXUL', '-DMOZILLA_INTERNAL_API',
+         '-DRUST_BINDGEN'
+     ]
+ 
+     if is_unix:
+         args += ['-DOS_POSIX=1']
+ 
+     if target.os == 'Android':
+         args += android_cflags
+ 
+-    def handle_cpu(obj):
+-        if 'cpu' in obj and target.cpu in obj['cpu']:
+-            return obj['cpu'][target.cpu]
+-        return []
+-
+-    if target.os == 'WINNT' and host.raw_os.startswith('gnu'):
+-        args += handle_cpu({
+-            'cpu': {
+-                'x86': ['--target=i686-pc-mingw32'],
+-                'x86_64': ['--target=x86_64-w64-mingw32'],
+-            },
+-        })
++    args += {
++        'Android': ['-DOS_ANDROID=1'],
++        'DragonFly': ['-DOS_BSD=1', '-DOS_DRAGONFLY=1'],
++        'FreeBSD': ['-DOS_BSD=1', '-DOS_FREEBSD=1'],
++        'GNU': ['-DOS_LINUX=1'],
++        'NetBSD': ['-DOS_BSD=1', '-DOS_NETBSD=1'],
++        'OpenBSD': ['-DOS_BSD=1', '-DOS_OPENBSD=1'],
++        'OSX': ['-DOS_MACOSX=1', '-stdlib=libc++'],
++        'SunOS': ['-DOS_SOLARIS=1'],
++        'WINNT': [
++            '-DOS_WIN=1',
++            '-DWIN32=1',
++        ],
++    }.get(target.os, [])
+ 
+-    os_dict = {
+-        'Android': {
+-            'default': ['-DOS_ANDROID=1'],
+-            'cpu': {
+-                'aarch64': ['--target=aarch64-linux-android'],
+-                'arm': ['--target=armv7-linux-androideabi'],
+-                'x86': ['--target=i686-linux-android'],
+-                'x86_64': ['--target=x86_64-linux-android'],
+-            },
+-        },
+-        'DragonFly': {
+-            'default': ['-DOS_BSD=1', '-DOS_DRAGONFLY=1'],
+-        },
+-        'FreeBSD': {
+-            'default': ['-DOS_BSD=1', '-DOS_FREEBSD=1'],
+-        },
+-        'GNU': {
+-            'default': ['-DOS_LINUX=1'],
+-            'cpu': {
+-                'x86': ['-m32'],
+-                'x86_64': ['-m64'],
+-            },
+-        },
+-        'NetBSD': {
+-            'default': ['-DOS_BSD=1', '-DOS_NETBSD=1'],
+-        },
+-        'OpenBSD': {
+-            'default': ['-DOS_BSD=1', '-DOS_OPENBSD=1'],
+-        },
+-        'OSX': {
+-            'default': [
+-                '-DOS_MACOSX=1',
+-                '-stdlib=libc++',
+-                # To disable the fixup bindgen applies which adds search
+-                # paths from clang command line in order to avoid potential
+-                # conflict with -stdlib=libc++.
+-                '--target=x86_64-apple-darwin',
+-            ],
+-        },
+-        'SunOS': {
+-            'default': ['-DOS_SOLARIS=1'],
+-        },
+-        'WINNT': {
+-            'default': [
+-                '-DOS_WIN=1',
+-                '-DWIN32=1',
+-            ],
+-            'compiler': {
+-                'msvc': {
+-                    'default': [
+-                        # For compatibility with MSVC 2015
+-                        '-fms-compatibility-version=19',
+-                        # To enable the builtin __builtin_offsetof so that CRT wouldn't
+-                        # use reinterpret_cast in offsetof() which is not allowed inside
+-                        # static_assert().
+-                        '-D_CRT_USE_BUILTIN_OFFSETOF',
+-                        # Enable hidden attribute (which is not supported by MSVC and
+-                        # thus not enabled by default with a MSVC-compatibile build)
+-                        # to exclude hidden symbols from the generated file.
+-                        '-DHAVE_VISIBILITY_HIDDEN_ATTRIBUTE=1',
+-                    ],
+-                    'cpu': {
+-                        'x86': ['--target=i686-pc-win32'],
+-                        'x86_64': ['--target=x86_64-pc-win32'],
+-                        'aarch64': ['--target=aarch64-pc-windows-msvc'],
+-                    },
+-                },
+-            },
+-        },
+-    }.get(target.os, {})
++    if compiler_info.type in ('msvc', 'clang-cl'):
++        args += [
++            # To enable the builtin __builtin_offsetof so that CRT wouldn't
++            # use reinterpret_cast in offsetof() which is not allowed inside
++            # static_assert().
++            '-D_CRT_USE_BUILTIN_OFFSETOF',
++            # Enable hidden attribute (which is not supported by MSVC and
++            # thus not enabled by default with a MSVC-compatibile build)
++            # to exclude hidden symbols from the generated file.
++            '-DHAVE_VISIBILITY_HIDDEN_ATTRIBUTE=1',
++        ]
+ 
+-    if 'default' in os_dict:
+-        args += os_dict['default']
++    # We want to pass the same base flags as we'd pass clang.
++    # check_compiler from toolchain.configure gives us that, but we don't need
++    # to use that when the compiler used for the build is already clang-based,
++    # in which case we can use the same flags.
++    if compiler_info.type in ('clang-cl', 'clang'):
++        info = compiler_info
++    else:
++        info = check_compiler([clang_path], 'C++', target)
+ 
+-    args += handle_cpu(os_dict)
+-    if 'compiler' in os_dict and compiler_info and compiler_info in os_dict['compiler']:
+-        compiler_dict = os_dict['compiler'].get(compiler_info)
+-        if 'default' in compiler_dict:
+-            args += compiler_dict['default']
+-        args += handle_cpu(compiler_dict)
++    args += info.flags
+ 
+     return args
+ 
+ 
+ js_option(env='BINDGEN_CFLAGS',
+           nargs=1,
+           help='Options bindgen should pass to the C/C++ parser')
+ 

+ 12 - 8
mozilla-release/patches/1526062-5-67a1.patch

@@ -2,7 +2,7 @@
 # User Mike Hommey <mh+mozilla@glandium.org>
 # Date 1549658285 0
 # Node ID af6a8b058f9a64e344be618ed578979cf0491722
-# Parent  86c2ed28c8feeb9a6b10c12358c1c56280dded7f
+# Parent  9eb300e393009bb545b1ce7f109f60a242048dde
 Bug 1526062 - Add a configure lint for undefined variables. r=nalexander
 
 There are cases that can be easily detected where an undefined variable
@@ -155,7 +155,7 @@ diff --git a/python/mozbuild/mozbuild/configure/__init__.py b/python/mozbuild/mo
 diff --git a/python/mozbuild/mozbuild/configure/lint.py b/python/mozbuild/mozbuild/configure/lint.py
 --- a/python/mozbuild/mozbuild/configure/lint.py
 +++ b/python/mozbuild/mozbuild/configure/lint.py
-@@ -114,17 +114,17 @@ class LintSandbox(ConfigureSandbox):
+@@ -115,17 +115,17 @@ class LintSandbox(ConfigureSandbox):
                      'Keyword arguments are not allowed in @depends functions')
              self._raise_from(e, func)
  
@@ -174,14 +174,14 @@ diff --git a/python/mozbuild/mozbuild/configure/lint.py b/python/mozbuild/mozbui
              if arg not in used_args:
                  dep = obj.dependencies[num]
                  if dep != self._help_option or not self._need_help_dependency(obj):
-@@ -143,17 +143,17 @@ class LintSandbox(ConfigureSandbox):
+@@ -144,17 +144,17 @@ class LintSandbox(ConfigureSandbox):
                  return False
              func, glob = self.unwrap(obj._func)
              # We allow missing --help dependencies for functions that:
              # - don't use @imports
              # - don't have a closure
              # - don't use global variables
-             if func in self._imports or func.func_closure:
+             if func in self._has_imports or func.func_closure:
                  return True
 -            for op, arg in disassemble_as_iter(func):
 +            for op, arg, _ in disassemble_as_iter(func):
@@ -193,8 +193,7 @@ diff --git a/python/mozbuild/mozbuild/configure/lint.py b/python/mozbuild/mozbui
                          continue
                      if arg in self.BUILTINS:
                          continue
-@@ -191,8 +191,32 @@ class LintSandbox(ConfigureSandbox):
-             func = self._wrapped[func]
+@@ -199,14 +199,37 @@ class LintSandbox(ConfigureSandbox):
          return func, glob
  
      def wraps(self, func):
@@ -202,7 +201,7 @@ diff --git a/python/mozbuild/mozbuild/configure/lint.py b/python/mozbuild/mozbui
              self._wrapped[wrapper] = func
              return wraps(func)(wrapper)
          return do_wraps
-+
+ 
 +    def _prepare_function(self, func, update_globals=None):
 +        wrapped = super(LintSandbox, self)._prepare_function(func, update_globals)
 +        _, glob = self.unwrap(wrapped)
@@ -226,7 +225,12 @@ diff --git a/python/mozbuild/mozbuild/configure/lint.py b/python/mozbuild/mozbui
 +                self._raise_from(e, func, line)
 +
 +        return wrapped
-\ No newline at end of file
+     def imports_impl(self, _import, _from=None, _as=None):
+         wrapper = super(LintSandbox, self).imports_impl(_import, _from=_from, _as=_as)
+         def decorator(func):
+             self._has_imports.add(func)
+             return wrapper(func)
+         return decorator
 diff --git a/python/mozbuild/mozbuild/configure/lint_util.py b/python/mozbuild/mozbuild/configure/lint_util.py
 --- a/python/mozbuild/mozbuild/configure/lint_util.py
 +++ b/python/mozbuild/mozbuild/configure/lint_util.py

+ 186 - 0
mozilla-release/patches/1529000-67a1.patch

@@ -0,0 +1,186 @@
+# HG changeset patch
+# User Florian Queze <florian@queze.net>
+# Date 1551899031 0
+# Node ID 60c03f3c8c5b67e337887eaf22191c71127687dc
+# Parent  e83890ff1d0fda6d409a55125f92d2704fee7ff9
+Bug 1529000 - add a way to provide environment variables to use at startup in mochitest manifests, r=ahal.
+
+Differential Revision: https://phabricator.services.mozilla.com/D21726
+
+diff --git a/testing/mochitest/runtests.py b/testing/mochitest/runtests.py
+--- a/testing/mochitest/runtests.py
++++ b/testing/mochitest/runtests.py
+@@ -840,25 +840,27 @@ class MochitestDesktop(object):
+         self.flavor = flavor
+         self.server = None
+         self.wsserver = None
+         self.websocketProcessBridge = None
+         self.sslTunnel = None
+         self.manifest = None
+         self.tests_by_manifest = defaultdict(list)
+         self.prefs_by_manifest = defaultdict(set)
++        self.env_vars_by_manifest = defaultdict(set)
+         self._active_tests = None
+         self._locations = None
+ 
+         self.marionette = None
+         self.start_script = None
+         self.mozLogs = None
+         self.start_script_kwargs = {}
+         self.urlOpts = []
+         self.extraPrefs = {}
++        self.extraEnv = {}
+ 
+         if logger_options.get('log'):
+             self.log = logger_options['log']
+         else:
+             commandline.log_formatters["tbpl"] = (
+                 MochitestFormatter,
+                 "Mochitest specific tbpl formatter")
+             self.log = commandline.setup_logging("mochitest", logger_options, {"tbpl": sys.stdout})
+@@ -1487,21 +1489,23 @@ toolbar#nav-bar {
+                 self.log.warning(
+                     'Warning: %s from manifest %s is not a valid test' %
+                     (test['name'], test['manifest']))
+                 continue
+ 
+             manifest_relpath = os.path.relpath(test['manifest'], manifest_root)
+             self.tests_by_manifest[manifest_relpath].append(tp)
+             self.prefs_by_manifest[manifest_relpath].add(test.get('prefs'))
+-
+-            if 'prefs' in test and not options.runByManifest and 'disabled' not in test:
+-                self.log.error("parsing {}: runByManifest mode must be enabled to "
+-                               "set the `prefs` key".format(manifest_relpath))
+-                sys.exit(1)
++            self.env_vars_by_manifest[manifest_relpath].add(test.get('environment'))
++
++            for key in ['prefs', 'environment']:
++                if key in test and not options.runByManifest and 'disabled' not in test:
++                    self.log.error("parsing {}: runByManifest mode must be enabled to "
++                                   "set the `{}` key".format(manifest_relpath, key))
++                    sys.exit(1)
+ 
+             testob = {'path': tp, 'manifest': manifest_relpath}
+             if 'disabled' in test:
+                 testob['disabled'] = test['disabled']
+             if 'expected' in test:
+                 testob['expected'] = test['expected']
+             if 'scheme' in test:
+                 testob['scheme'] = test['scheme']
+@@ -1518,16 +1522,23 @@ toolbar#nav-bar {
+         # stash all prefs from tests in the same manifest into a set. If the
+         # length of the set > 1, then we know 'prefs' didn't come from DEFAULT.
+         pref_not_default = [m for m, p in self.prefs_by_manifest.iteritems() if len(p) > 1]
+         if pref_not_default:
+             self.log.error("The 'prefs' key must be set in the DEFAULT section of a "
+                            "manifest. Fix the following manifests: {}".format(
+                             '\n'.join(pref_not_default)))
+             sys.exit(1)
++        # The 'environment' key needs to be set in the DEFAULT section too.
++        env_not_default = [m for m, p in self.env_vars_by_manifest.iteritems() if len(p) > 1]
++        if env_not_default:
++            self.log.error("The 'environment' key must be set in the DEFAULT section of a "
++                           "manifest. Fix the following manifests: {}".format(
++                            '\n'.join(env_not_default)))
++            sys.exit(1)
+ 
+         def path_sort(ob1, ob2):
+             path1 = ob1['path'].split('/')
+             path2 = ob2['path'].split('/')
+             return cmp(path1, path2)
+ 
+         paths.sort(path_sort)
+         if options.dump_tests:
+@@ -1630,16 +1641,26 @@ toolbar#nav-bar {
+ 
+         # bug 1443327: do not set MOZ_CRASHREPORTER_SHUTDOWN during browser-chrome
+         # tests, since some browser-chrome tests test content process crashes;
+         # also exclude non-e10s since at least one non-e10s mochitest is problematic
+         if (options.flavor == 'browser' or not options.e10s) and \
+            'MOZ_CRASHREPORTER_SHUTDOWN' in browserEnv:
+             del browserEnv["MOZ_CRASHREPORTER_SHUTDOWN"]
+ 
++        try:
++            browserEnv.update(
++                dict(
++                    parse_key_value(
++                        self.extraEnv,
++                        context='environment variable in manifest')))
++        except KeyValueParseError as e:
++            self.log.error(str(e))
++            return None
++
+         # These variables are necessary for correct application startup; change
+         # via the commandline at your own risk.
+         browserEnv["XPCOM_DEBUG_BREAK"] = "stack"
+ 
+         # interpolate environment passed with options
+         try:
+             browserEnv.update(
+                 dict(
+@@ -2581,16 +2602,24 @@ toolbar#nav-bar {
+             prefs = list(self.prefs_by_manifest[m])[0]
+             self.extraPrefs = origPrefs.copy()
+             if prefs:
+                 prefs = prefs.strip().split()
+                 self.log.info("The following extra prefs will be set:\n  {}".format(
+                     '\n  '.join(prefs)))
+                 self.extraPrefs.update(parse_preferences(prefs))
+ 
++            envVars = list(self.env_vars_by_manifest[m])[0]
++            self.extraEnv = {}
++            if envVars:
++                self.extraEnv = envVars.strip().split()
++                self.log.info(
++                    "The following extra environment variables will be set:\n  {}".format(
++                        '\n  '.join(self.extraEnv)))
++
+             # If we are using --run-by-manifest, we should not use the profile path (if) provided
+             # by the user, since we need to create a new directory for each run. We would face
+             # problems if we use the directory provided by the user.
+             tests_in_manifest = [t['path'] for t in tests if t['manifest'] == m]
+             res = self.runMochitests(options, tests_in_manifest)
+             result = result or res
+ 
+             # Dump the logging buffer
+diff --git a/testing/mozbase/mozprofile/mozprofile/cli.py b/testing/mozbase/mozprofile/mozprofile/cli.py
+--- a/testing/mozbase/mozprofile/mozprofile/cli.py
++++ b/testing/mozbase/mozprofile/mozprofile/cli.py
+@@ -24,17 +24,17 @@ from .profile import Profile
+ class KeyValueParseError(Exception):
+     """Error when parsing strings of serialized key-values."""
+ 
+     def __init__(self, msg, errors=()):
+         self.errors = errors
+         Exception.__init__(self, msg)
+ 
+ 
+-def parse_key_value(strings, separator='=', context='key, value: '):
++def parse_key_value(strings, separator='=', context='key, value'):
+     """Parse string-serialized key-value pairs in the form of `key = value`.
+ 
+     Args:
+         strings (list): List of strings to parse.
+         separator (str): Identifier used to split the strings.
+ 
+     Returns:
+         list: A list of (<key>, <value>) tuples. Whitespace is not stripped.
+@@ -42,17 +42,17 @@ def parse_key_value(strings, separator='
+     Raises:
+         KeyValueParseError
+     """
+ 
+     # syntax check
+     missing = [string for string in strings if separator not in string]
+     if missing:
+         raise KeyValueParseError(
+-            "Error: syntax error in %s" %
++            "Error: syntax error in %s: %s" %
+             (context, ','.join(missing)), errors=missing)
+     return [string.split(separator, 1) for string in strings]
+ 
+ 
+ def parse_preferences(prefs, context='--setpref='):
+     """Parse preferences specified on the command line.
+ 
+     Args:

+ 3 - 3
mozilla-release/patches/1541329-68a1.patch

@@ -2,7 +2,7 @@
 # User Mike Hommey <mh+mozilla@glandium.org>
 # Date 1554297381 0
 # Node ID 76db6344d9c9fbe7f37affc656468521ebd68b07
-# Parent  8362b48885e8d235fb4f296ce9f9478cc6b9ac73
+# Parent  c46c7bfe3f6bae309abfc401430272a3628fcb23
 Bug 1541329 - Remove useless localeconv check. r=froydnj
 
 There is already a AC_HAVE_FUNC(localeconv) in js/src/old-configure.in
@@ -13,8 +13,8 @@ Differential Revision: https://phabricator.services.mozilla.com/D25903
 diff --git a/js/src/old-configure.in b/js/src/old-configure.in
 --- a/js/src/old-configure.in
 +++ b/js/src/old-configure.in
-@@ -1645,18 +1645,16 @@ if test -n "$MOZ_DEV_EDITION"; then
- fi
+@@ -1667,18 +1667,16 @@ BINDGEN_SYSTEM_FLAGS="$_BINDGEN_CFLAGS $
+ AC_SUBST(BINDGEN_SYSTEM_FLAGS)
  
  dnl ========================================================
  dnl JavaScript shell

+ 20 - 3
mozilla-release/patches/1542963-1-69a1.patch

@@ -2,7 +2,7 @@
 # User Justin Wood <Callek@gmail.com>
 # Date 1559053303 0
 # Node ID dfbd665029ba529d7ef04f54c09716540c9a2b56
-# Parent  be8be8929879684623cfbe9852e79ec8fd03df26
+# Parent  2ce8f92e8c4a4e39b36ff7e88c7687e689ef8f1c
 Bug 1542963 - flake8 python/mozbuild/mozbuild r=glandium
 
 Lint python/mozbuild/{mozbuild,mozpack}.
@@ -12,7 +12,7 @@ Differential Revision: https://phabricator.services.mozilla.com/D26639
 diff --git a/.flake8 b/.flake8
 --- a/.flake8
 +++ b/.flake8
-@@ -22,17 +22,17 @@ exclude =
+@@ -22,17 +22,16 @@ exclude =
      layout/style,
      media/libdav1d/generate_source.py,
      moz.configure,
@@ -22,7 +22,6 @@ diff --git a/.flake8 b/.flake8
      python/l10n/fluent_migrations,
      python/mozbuild/dumbmake,
 -    python/mozbuild/mozbuild,
-+    python/mozbuild/mozbuild/test/configure/data,
      servo/components/style,
      testing/jsshell/benchmark.py,
      testing/marionette/mach_commands.py,
@@ -31,3 +30,21 @@ diff --git a/.flake8 b/.flake8
      testing/mozharness/external_tools,
      testing/mozharness/mach_commands.py,
      testing/mozharness/manifestparser,
+@@ -63,16 +62,17 @@ exclude =
+     gfx/angle/,
+     gfx/harfbuzz,
+     gfx/skia/,
+     intl/icu/,
+     ipc/chromium/,
+     js/*.configure,
+     memory/moz.configure,
+     node_modules,
++    python/mozbuild/mozbuild/test/configure/data,
+     security/nss/,
+     testing/marionette/harness/marionette_harness/runner/mixins,
+     testing/marionette/harness/marionette_harness/tests,
+     testing/mochitest/pywebsocket,
+     testing/mozharness/configs/test/test_malformed.py,
+     tools/lint/test/files,
+     tools/crashreporter/*.configure,
+     .ycm_extra_conf.py,

+ 6 - 6
mozilla-release/patches/1547730-20-69a1.patch

@@ -2,7 +2,7 @@
 # User Justin Wood <Callek@gmail.com>
 # Date 1559053714 0
 # Node ID d89d2754488ec74c628efa4da471f8497405ce01
-# Parent  768d2d842b8fe0d1a77c5a1fdff10892ef390f8a
+# Parent  cfd412846efe9a68970c886f712764d14f65bd32
 Bug 1547730 - Use new inspection methods introduced in py3 but work in py2.7 for functions r=glandium
 
 Differential Revision: https://phabricator.services.mozilla.com/D28112
@@ -10,7 +10,7 @@ Differential Revision: https://phabricator.services.mozilla.com/D28112
 diff --git a/python/mozbuild/mozbuild/configure/__init__.py b/python/mozbuild/mozbuild/configure/__init__.py
 --- a/python/mozbuild/mozbuild/configure/__init__.py
 +++ b/python/mozbuild/mozbuild/configure/__init__.py
-@@ -1042,17 +1042,17 @@ class ConfigureSandbox(dict):
+@@ -1053,17 +1053,17 @@ class ConfigureSandbox(dict):
          '''
          if not inspect.isfunction(func):
              raise TypeError("Unexpected type: '%s'" % type(func).__name__)
@@ -29,7 +29,7 @@ diff --git a/python/mozbuild/mozbuild/configure/__init__.py b/python/mozbuild/mo
              __file__=self._paths[-1] if self._paths else '',
              __name__=self._paths[-1] if self._paths else '',
              os=self.OS,
-@@ -1065,30 +1065,30 @@ class ConfigureSandbox(dict):
+@@ -1076,30 +1076,30 @@ class ConfigureSandbox(dict):
          # order will always be the same for a given function, and if it uses
          # variables from a closure that are changed after the function is
          # declared, depending when the function is executed, the value of the
@@ -68,7 +68,7 @@ diff --git a/python/mozbuild/mozbuild/configure/__init__.py b/python/mozbuild/mo
 diff --git a/python/mozbuild/mozbuild/configure/lint.py b/python/mozbuild/mozbuild/configure/lint.py
 --- a/python/mozbuild/mozbuild/configure/lint.py
 +++ b/python/mozbuild/mozbuild/configure/lint.py
-@@ -141,17 +141,17 @@ class LintSandbox(ConfigureSandbox):
+@@ -142,17 +142,17 @@ class LintSandbox(ConfigureSandbox):
          if isinstance(obj, DependsFunction):
              if obj in (self._always, self._never):
                  return False
@@ -77,7 +77,7 @@ diff --git a/python/mozbuild/mozbuild/configure/lint.py b/python/mozbuild/mozbui
              # - don't use @imports
              # - don't have a closure
              # - don't use global variables
--            if func in self._imports or func.func_closure:
+-            if func in self._has_imports or func.func_closure:
 +            if func in self._has_imports or func.__closure__:
                  return True
              for op, arg, _ in disassemble_as_iter(func):
@@ -87,7 +87,7 @@ diff --git a/python/mozbuild/mozbuild/configure/lint.py b/python/mozbuild/mozbui
                      # dependency.
                      if arg == 'os' and glob.get('os') is self.OS:
                          continue
-@@ -179,20 +179,20 @@ class LintSandbox(ConfigureSandbox):
+@@ -186,20 +186,20 @@ class LintSandbox(ConfigureSandbox):
          result = super(LintSandbox, self).option_impl(*args, **kwargs)
          when = self._conditions.get(result)
          if when:

+ 3 - 3
mozilla-release/patches/1547931-68a1.patch

@@ -2,7 +2,7 @@
 # User Richard Marti <richard.marti@gmail.com>
 # Date 1557267632 -7200
 # Node ID 2bbdd81b70dd1ea0b4787e53deaac90c6c185c98
-# Parent  7f32b838169018a9355ccba9a243bd311e319aed
+# Parent  cbc4dea5a909a38f827251b812dcc7d32c2e9bcd
 Bug 1547931 - Enable the MOZ_BUNDLED_FONTS variable for Thunderbird too. r=jfkthame CLOSED TREE
 
 Differential Revision: https://phabricator.services.mozilla.com/D29328
@@ -10,7 +10,7 @@ Differential Revision: https://phabricator.services.mozilla.com/D29328
 diff --git a/toolkit/moz.configure b/toolkit/moz.configure
 --- a/toolkit/moz.configure
 +++ b/toolkit/moz.configure
-@@ -1593,17 +1593,17 @@ set_config('MOZ_MAINTENANCE_SERVICE',
+@@ -1584,17 +1584,17 @@ set_config('MOZ_MAINTENANCE_SERVICE',
  # ==============================================================
  
  @depends(target)
@@ -24,7 +24,7 @@ diff --git a/toolkit/moz.configure b/toolkit/moz.configure
  
  option('--enable-bundled-fonts', default=bundled_fonts_default,
         when=allow_bundled_fonts,
-        help='Enable support for bundled fonts on desktop platforms')
+        help='{Enable|Disable} support for bundled fonts on desktop platforms')
  
  set_define('MOZ_BUNDLED_FONTS',
             depends_if('--enable-bundled-fonts', when=allow_bundled_fonts)(lambda _: True))

+ 49 - 53
mozilla-release/patches/1549794-68a1.patch

@@ -2,7 +2,7 @@
 # User Nathan Froyd <froydnj@mozilla.com>
 # Date 1557518854 0
 # Node ID 2a59e1221617628b0399e2d51d5e3442a63be51b
-# Parent  1a5b35123f028ebd3f20ee343f220ae59ab173fc
+# Parent  0ad5ef89f4219992ff3bcf1559aac78a03102b64
 Bug 1549794 - add sysroot flags for the macOS SDK to bindgen's flags; r=nalexander
 
 We already do this for the compiler that we detect via
@@ -15,61 +15,57 @@ in the JS engine will receive the proper flags.
 
 Differential Revision: https://phabricator.services.mozilla.com/D30239
 
-diff --git a/build/moz.configure/bindgen.configure.1549794.later b/build/moz.configure/bindgen.configure.1549794.later
-new file mode 100644
---- /dev/null
-+++ b/build/moz.configure/bindgen.configure.1549794.later
-@@ -0,0 +1,46 @@
-+--- bindgen.configure
-++++ bindgen.configure
-+@@ -269,18 +269,19 @@ def bindgen_config_paths(llvm_config, li
-+         clang_path=clang_resolved,
-+     )
-+ 
-+ set_config('MOZ_LIBCLANG_PATH', bindgen_config_paths.libclang_path)
-+ set_config('MOZ_CLANG_PATH', bindgen_config_paths.clang_path)
-+ 
-+ 
-+ @depends(target, target_is_unix, cxx_compiler, bindgen_cflags_android,
-+-         bindgen_config_paths.clang_path)
-+-def basic_bindgen_cflags(target, is_unix, compiler_info, android_cflags, clang_path):
-++         bindgen_config_paths.clang_path, macos_sdk)
-++def basic_bindgen_cflags(target, is_unix, compiler_info, android_cflags,
-++                         clang_path, macos_sdk):
-+     args = [
-+         '-x', 'c++', '-fno-sized-deallocation',
-+         '-DTRACING=1', '-DIMPL_LIBXUL', '-DMOZILLA_INTERNAL_API',
-+         '-DRUST_BINDGEN'
-+     ]
-+ 
-+     if is_unix:
-+         args += ['-DOS_POSIX=1']
-+@@ -318,16 +319,21 @@ def basic_bindgen_cflags(target, is_unix
-+     # We want to pass the same base flags as we'd pass clang.
-+     # check_compiler from toolchain.configure gives us that.
-+     # XXX: We should actually use the compiler from toolchain.configure.
-+     # See bug 1526857.
-+     info = check_compiler([clang_path], 'C++', target)
-+ 
-+     args += info.flags
-+ 
-++    # XXX We wouldn't have to do this if we were using the compiler from
-++    # toolchain.configure, rather than just `check_compiler`.
-++    if macos_sdk and target.os == 'OSX':
-++        args += ['-isysroot', macos_sdk]
-++
-+     return args
-+ 
-+ 
-+ js_option(env='BINDGEN_CFLAGS',
-+           nargs=1,
-+           help='Options bindgen should pass to the C/C++ parser')
-+ 
-+ 
+diff --git a/build/moz.configure/bindgen.configure b/build/moz.configure/bindgen.configure
+--- a/build/moz.configure/bindgen.configure
++++ b/build/moz.configure/bindgen.configure
+@@ -239,18 +239,19 @@ def bindgen_config_paths(llvm_config, li
+         clang_path=clang_resolved,
+     )
+ 
+ set_config('MOZ_LIBCLANG_PATH', bindgen_config_paths.libclang_path)
+ set_config('MOZ_CLANG_PATH', bindgen_config_paths.clang_path)
+ 
+ 
+ @depends(target, target_is_unix, cxx_compiler, bindgen_cflags_android,
+-         bindgen_config_paths.clang_path)
+-def basic_bindgen_cflags(target, is_unix, compiler_info, android_cflags, clang_path):
++         bindgen_config_paths.clang_path, macos_sdk)
++def basic_bindgen_cflags(target, is_unix, compiler_info, android_cflags,
++                         clang_path, macos_sdk):
+     args = [
+         '-x', 'c++', '-fno-sized-deallocation',
+         '-DTRACING=1', '-DIMPL_LIBXUL', '-DMOZILLA_INTERNAL_API',
+         '-DRUST_BINDGEN'
+     ]
+ 
+     if is_unix:
+         args += ['-DOS_POSIX=1']
+@@ -291,16 +292,21 @@ def basic_bindgen_cflags(target, is_unix
+     # in which case we can use the same flags.
+     if compiler_info.type in ('clang-cl', 'clang'):
+         info = compiler_info
+     else:
+         info = check_compiler([clang_path], 'C++', target)
+ 
+     args += info.flags
+ 
++    # XXX We wouldn't have to do this if we were using the compiler from
++    # toolchain.configure, rather than just `check_compiler`.
++    if macos_sdk and target.os == 'OSX':
++        args += ['-isysroot', macos_sdk]
++
+     return args
+ 
+ 
+ js_option(env='BINDGEN_CFLAGS',
+           nargs=1,
+           help='Options bindgen should pass to the C/C++ parser')
+ 
+ 
 diff --git a/build/moz.configure/toolchain.configure b/build/moz.configure/toolchain.configure
 --- a/build/moz.configure/toolchain.configure
 +++ b/build/moz.configure/toolchain.configure
-@@ -128,17 +128,17 @@ with only_when(target_is_osx):
+@@ -127,17 +127,17 @@ with only_when(target_is_osx):
  
  
      set_config('MACOSX_DEPLOYMENT_TARGET', macos_target)

+ 4 - 4
mozilla-release/patches/1554056-69a1.patch

@@ -2,7 +2,7 @@
 # User Mike Hommey <mh+mozilla@glandium.org>
 # Date 1559069103 0
 # Node ID e78c08a8a56c85a7a1e9e86364f672ea8e93cf73
-# Parent  8180b274a2c17a316ec88eba17675f78b73cefea
+# Parent  4c1c6b9c0a5de1e93cfc1b2606e2fe3ae38d4918
 Bug 1554056 - Don't allow --enable-shared-js outside of standalone spidermonkey builds. r=dmajor
 
 The option has presumably not worked for at least a year, and was seldom
@@ -13,7 +13,7 @@ Differential Revision: https://phabricator.services.mozilla.com/D32418
 diff --git a/js/moz.configure b/js/moz.configure
 --- a/js/moz.configure
 +++ b/js/moz.configure
-@@ -38,47 +38,47 @@ set_config('JS_DISABLE_SHELL', js_disabl
+@@ -41,47 +41,47 @@ set_config('JS_DISABLE_SHELL', js_disabl
  set_define('JS_64BIT', depends(target)(lambda t: t.bitness == 64 or None))
  
  set_define('JS_PUNBOX64', depends(target)(lambda t: t.bitness == 64 or None))
@@ -24,11 +24,11 @@ diff --git a/js/moz.configure b/js/moz.configure
  # ==================================================================
 -js_option('--disable-shared-js', default=building_js,
 +js_option('--disable-shared-js', when=js_standalone,
-           help='Do not create a shared library')
+           help='{Create|Do not create} a shared library')
  
 -js_option('--disable-export-js', default=building_js,
 +js_option('--disable-export-js', when=js_standalone,
-           help='Do not mark JS symbols as DLL exported/visible')
+           help='{Mark|Do not mark} JS symbols as DLL exported/visible')
  
 -@depends('--disable-shared-js', '--disable-export-js')
 +@depends('--disable-shared-js', '--disable-export-js', when=js_standalone)

+ 8 - 8
mozilla-release/patches/1557213-1only-69a1.patch

@@ -2,7 +2,7 @@
 # User Mike Hommey <mh+mozilla@glandium.org>
 # Date 1559868010 0
 # Node ID e22fe8a9c352e4c06b90552bd6b8bb8d693024fb
-# Parent  52bf3363d444eacd4872021f5983244981db14bf
+# Parent  3ff29f71c62c75f52871909ef64505a9afac0309
 Bug 1557213 - Don't try to use NDK clang. r=nalexander
 
 Differential Revision: https://phabricator.services.mozilla.com/D33902
@@ -10,15 +10,15 @@ Differential Revision: https://phabricator.services.mozilla.com/D33902
 diff --git a/build/moz.configure/android-ndk.configure b/build/moz.configure/android-ndk.configure
 --- a/build/moz.configure/android-ndk.configure
 +++ b/build/moz.configure/android-ndk.configure
-@@ -272,30 +272,8 @@ def bindgen_cflags_defaults(toolchain_fl
+@@ -272,30 +272,8 @@ def bindgen_cflags_android(toolchain_fla
      if not isdir(gcc_include):
          gcc_include = os.path.join(
              toolchain, 'lib', 'gcc', toolchain_prefix, '4.9')
  
-     cflags_format = "%s -I%s -I%s"
-     return cflags_format % (' '.join(toolchain_flags),
-                             os.path.join(gcc_include, 'include'),
-                             os.path.join(gcc_include, 'include-fixed'))
+     return toolchain_flags + [
+         '-I%s' % os.path.join(gcc_include, 'include'),
+         '-I%s' % os.path.join(gcc_include, 'include-fixed'),
+     ]
 -
 -
 -@depends(host, ndk)
@@ -44,7 +44,7 @@ diff --git a/build/moz.configure/android-ndk.configure b/build/moz.configure/and
 diff --git a/build/moz.configure/toolchain.configure b/build/moz.configure/toolchain.configure
 --- a/build/moz.configure/toolchain.configure
 +++ b/build/moz.configure/toolchain.configure
-@@ -808,20 +808,19 @@ def default_c_compilers(host_or_target, 
+@@ -787,20 +787,19 @@ def default_c_compilers(host_or_target, 
      `host_or_target` is either `host` or `target` (the @depends functions
      from init.configure.
      `other_c_compiler` is the `target` C compiler when `host_or_target` is `host`.
@@ -67,7 +67,7 @@ diff --git a/build/moz.configure/toolchain.configure b/build/moz.configure/toolc
                  supported = types = ('clang-cl', 'msvc', 'gcc', 'clang')
          elif host_or_target.kernel == 'Darwin':
              types = ('clang',)
-@@ -838,39 +837,30 @@ def default_c_compilers(host_or_target, 
+@@ -817,39 +816,30 @@ def default_c_compilers(host_or_target, 
                  same_arch = same_arch_different_bits()
                  if (target.cpu != host_or_target.cpu and
                          (target.cpu, host_or_target.cpu) not in same_arch and

+ 11 - 11
mozilla-release/patches/1557583-2-69a1.patch

@@ -2,7 +2,7 @@
 # User Mike Hommey <mh+mozilla@glandium.org>
 # Date 1560378646 0
 # Node ID f0f958b29d69ceaa0faa34955e98c63ecd94af7b
-# Parent  ac1db0cb8f834bc19d7f83eb31ecb8ccba14df2f
+# Parent  0742309978921ea19eb39fd11c82a9f634293a83
 Bug 1557583 - Add a --enable-frame-pointers option. r=chmanchester
 
 We've been relying on frame pointers being indirectly enabled via things
@@ -79,13 +79,13 @@ deleted file mode 100644
 diff --git a/build/moz.configure/toolchain.configure b/build/moz.configure/toolchain.configure
 --- a/build/moz.configure/toolchain.configure
 +++ b/build/moz.configure/toolchain.configure
-@@ -32,18 +32,18 @@ add_old_configure_assignment('MOZ_PGO', 
+@@ -31,18 +31,18 @@ add_old_configure_assignment('MOZ_PGO', 
+ # Code optimization
  # ==============================================================
  
- js_option('--enable-optimize',
+ js_option('--disable-optimize',
            nargs='?',
-           default=True,
-           help='Enable optimizations via compiler flags')
+           help='Disable optimizations via compiler flags')
  
  
 -@depends('--enable-optimize')
@@ -100,7 +100,7 @@ diff --git a/build/moz.configure/toolchain.configure b/build/moz.configure/toolc
      elif option:
          val = '1'
      else:
-@@ -2319,8 +2319,56 @@ def ar_config(link, toolchain_prefix):
+@@ -2301,8 +2301,56 @@ def ar_config(link, toolchain_prefix):
      )
  
  
@@ -160,7 +160,7 @@ diff --git a/build/moz.configure/toolchain.configure b/build/moz.configure/toolc
 diff --git a/js/moz.configure b/js/moz.configure
 --- a/js/moz.configure
 +++ b/js/moz.configure
-@@ -252,16 +252,20 @@ js_option('--enable-profiling', env='MOZ
+@@ -268,16 +268,20 @@ js_option('--enable-profiling', env='MOZ
  
  @depends('--enable-profiling')
  def profiling(value):
@@ -205,7 +205,7 @@ diff --git a/js/src/aclocal.m4 b/js/src/aclocal.m4
 diff --git a/js/src/old-configure.in b/js/src/old-configure.in
 --- a/js/src/old-configure.in
 +++ b/js/src/old-configure.in
-@@ -1264,18 +1264,16 @@ dnl = Enable code optimization. ON by de
+@@ -1261,18 +1261,16 @@ dnl = Enable code optimization. ON by de
  dnl ========================================================
  
  # Use value from moz.configure if one is defined. Else use our computed
@@ -224,7 +224,7 @@ diff --git a/js/src/old-configure.in b/js/src/old-configure.in
      AC_TRY_COMPILE([#include <stdio.h>],
          [printf("Hello World\n");],
          _results=yes,
-@@ -1294,17 +1292,16 @@ if test -n "$MOZ_OPTIMIZE"; then
+@@ -1291,17 +1289,16 @@ if test -n "$MOZ_OPTIMIZE"; then
          *\ -Os\ *|*\ -Oz\ *)
              MOZ_OPTIMIZE_LDFLAGS="$MOZ_OPTIMIZE_LDFLAGS -O2"
              ;;
@@ -245,7 +245,7 @@ diff --git a/js/src/old-configure.in b/js/src/old-configure.in
 diff --git a/old-configure.in b/old-configure.in
 --- a/old-configure.in
 +++ b/old-configure.in
-@@ -2386,18 +2386,16 @@ dnl = Enable code optimization. ON by de
+@@ -2359,18 +2359,16 @@ dnl = Enable code optimization. ON by de
  dnl ========================================================
  
  # Use value from moz.configure if one is defined. Else use our computed
@@ -264,7 +264,7 @@ diff --git a/old-configure.in b/old-configure.in
      AC_TRY_COMPILE([#include <stdio.h>],
          [printf("Hello World\n");],
          _results=yes,
-@@ -2416,17 +2414,16 @@ if test -n "$MOZ_OPTIMIZE"; then
+@@ -2389,17 +2387,16 @@ if test -n "$MOZ_OPTIMIZE"; then
          *\ -Os\ *|*\ -Oz\ *)
              MOZ_OPTIMIZE_LDFLAGS="$MOZ_OPTIMIZE_LDFLAGS -O2"
              ;;

+ 35 - 0
mozilla-release/patches/1558667-78a1.patch

@@ -0,0 +1,35 @@
+# HG changeset patch
+# User Geoff Brown <gbrown@mozilla.com>
+# Date 1590160134 0
+# Node ID 8267ea7dec5a433c8a8623a9119fa57212fd6897
+# Parent  8e32c73bbcbb47bc879efaba476797b4964aed7b
+Bug 1558667 - Try to make test_resource_monitor.py more robust; r=ahal
+
+This test has been failing, infrequently, mostly on osx/py2, for many months.
+Increasing the time interval between events appears to reduce failure frequency.
+
+Differential Revision: https://phabricator.services.mozilla.com/D76402
+
+diff --git a/testing/mozbase/mozsystemmonitor/tests/test_resource_monitor.py b/testing/mozbase/mozsystemmonitor/tests/test_resource_monitor.py
+--- a/testing/mozbase/mozsystemmonitor/tests/test_resource_monitor.py
++++ b/testing/mozbase/mozsystemmonitor/tests/test_resource_monitor.py
+@@ -83,17 +83,17 @@ class TestResourceMonitor(unittest.TestC
+     def test_events(self):
+         monitor = SystemResourceMonitor(poll_interval=0.25)
+ 
+         monitor.start()
+         time.sleep(0.5)
+ 
+         t0 = time.time()
+         monitor.record_event('t0')
+-        time.sleep(0.5)
++        time.sleep(2)
+ 
+         monitor.record_event('t1')
+         time.sleep(0.5)
+         monitor.stop()
+ 
+         events = monitor.events
+         self.assertEqual(len(events), 2)
+ 
+

+ 3 - 3
mozilla-release/patches/1563797-2-70a1.patch

@@ -2,7 +2,7 @@
 # User Andrew Halberstadt <ahalberstadt@mozilla.com>
 # Date 1562854427 0
 # Node ID 7e4c633a3566dcc58fcffb0bf6e315d744568a79
-# Parent  4e22a209cbe8d1110a129e8586f69d2e851f2ca9
+# Parent  1dd069a08dc8c47a3ca4e1b456699193e8fd2e68
 Bug 1563797 - [mozfile] Add a 'which' function to make 'shutil.which' consistent on Windows r=Callek
 
 Differential Revision: https://phabricator.services.mozilla.com/D37621
@@ -50,7 +50,7 @@ diff --git a/testing/mozbase/mozfile/mozfile/mozfile.py b/testing/mozbase/mozfil
  
  def extract_tarball(src, dest):
      """extract a .tar file"""
-@@ -304,16 +308,65 @@ def tree(directory, sort_key=lambda x: x
+@@ -305,16 +309,65 @@ def tree(directory, sort_key=lambda x: x
              retval.extend([('%s%s%s' % (''.join(indent),
                                          files_end if filename == last_file else item_marker,
                                          filename))
@@ -138,7 +138,7 @@ diff --git a/testing/mozbase/mozfile/tests/manifest.ini b/testing/mozbase/mozfil
 --- a/testing/mozbase/mozfile/tests/manifest.ini
 +++ b/testing/mozbase/mozfile/tests/manifest.ini
 @@ -2,8 +2,9 @@
- subsuite = mozbase, os == "linux"
+ subsuite = mozbase
  [test_extract.py]
  [test_load.py]
  [test_move_remove.py]

+ 5 - 5
mozilla-release/patches/1567642-8-71a1.patch

@@ -2,7 +2,7 @@
 # User Andrew Halberstadt <ahalberstadt@mozilla.com>
 # Date 1569336241 0
 # Node ID bb843f6f9594b817a48166e3621266d4688464dc
-# Parent  ee9b6e24417c7358f189e2a00bac570918fcbc0c
+# Parent  043c29b82d32811c4949c557ada32911a54381dc
 Bug 1567642 - [lint.flake8] Fix misc flake8 under Python 3 lint issues r=gbrown
 
 Differential Revision: https://phabricator.services.mozilla.com/D45417
@@ -363,8 +363,8 @@ diff --git a/testing/mochitest/runtests.py b/testing/mochitest/runtests.py
  from mochitest_options import (
      MochitestArgumentParser, build_obj, get_default_valgrind_suppression_files
  )
- from mozprofile import Profile, Preferences
- from mozprofile.permissions import ServerLocations
+ from mozprofile import Profile
+ from mozprofile.cli import parse_preferences, parse_key_value, KeyValueParseError
 diff --git a/testing/talos/talos/profiler/symFileManager.py b/testing/talos/talos/profiler/symFileManager.py
 --- a/testing/talos/talos/profiler/symFileManager.py
 +++ b/testing/talos/talos/profiler/symFileManager.py
@@ -390,7 +390,7 @@ diff --git a/testing/talos/talos/profiler/symFileManager.py b/testing/talos/talo
 diff --git a/testing/tools/mach_test_package_bootstrap.py b/testing/tools/mach_test_package_bootstrap.py
 --- a/testing/tools/mach_test_package_bootstrap.py
 +++ b/testing/tools/mach_test_package_bootstrap.py
-@@ -77,16 +77,22 @@ CATEGORIES = {
+@@ -76,16 +76,22 @@ CATEGORIES = {
                  'These commands are unavailable for your current context, '
                  'run "mach <command>" to see why.',
          'priority': 0,
@@ -413,7 +413,7 @@ diff --git a/testing/tools/mach_test_package_bootstrap.py b/testing/tools/mach_t
      while path and count != depth:
          yield path
          newpath = os.path.dirname(path)
-@@ -103,19 +109,19 @@ def activate_mozharness_venv(context):
+@@ -102,19 +108,19 @@ def activate_mozharness_venv(context):
  
      if not os.path.isdir(venv):
          print("No mozharness virtualenv detected at '{}'.".format(venv))

+ 54 - 0
mozilla-release/patches/1579545-71a1.patch

@@ -0,0 +1,54 @@
+# HG changeset patch
+# User Nathan Froyd <froydnj@mozilla.com>
+# Date 1567805723 0
+# Node ID 07f0801f694047accad5ce116e61d515dca834d8
+# Parent  3b86403b2b3763348ce1f7d105bfe2aa90b98cf8
+Bug 1579545 - remove unused `NO_PW_GECOS` defines; r=nalexander
+
+They aren't used in our codebase and they aren't used in the NDK.
+
+Differential Revision: https://phabricator.services.mozilla.com/D45085
+
+diff --git a/js/src/old-configure.in b/js/src/old-configure.in
+--- a/js/src/old-configure.in
++++ b/js/src/old-configure.in
+@@ -515,17 +515,16 @@ case "$target" in
+         fi
+ 
+         LDFLAGS=$_SAVE_LDFLAGS
+     fi
+     MOZ_FIX_LINK_PATHS="-Wl,-executable_path,${DIST}/bin"
+     ;;
+ 
+ *-android*|*-linuxandroid*)
+-    AC_DEFINE(NO_PW_GECOS)
+     MOZ_GFX_OPTIMIZE_MOBILE=1
+     MOZ_OPTIMIZE_FLAGS="-O3"
+     if test -z "$CLANG_CC"; then
+        MOZ_OPTIMIZE_FLAGS="-freorder-blocks -fno-reorder-functions $MOZ_OPTIMIZE_FLAGS"
+     fi
+     ;;
+ 
+ *-*linux*)
+diff --git a/old-configure.in b/old-configure.in
+--- a/old-configure.in
++++ b/old-configure.in
+@@ -604,18 +604,16 @@ case "$target" in
+ 
+         LDFLAGS=$_SAVE_LDFLAGS
+     fi
+ 
+     MOZ_FIX_LINK_PATHS="-Wl,-executable_path,${DIST}/bin"
+     ;;
+ 
+ *-android*|*-linuxandroid*)
+-    AC_DEFINE(NO_PW_GECOS)
+-
+     if test "$COMPILE_ENVIRONMENT"; then
+         MOZ_LINKER=1
+     fi
+ 
+     MOZ_GFX_OPTIMIZE_MOBILE=1
+     if test -z "$CLANG_CC"; then
+         MOZ_OPTIMIZE_FLAGS="-freorder-blocks -fno-reorder-functions -Os"
+     else

+ 2 - 2
mozilla-release/patches/1580280-1-71a1.patch

@@ -2,7 +2,7 @@
 # User Andrew Halberstadt <ahalberstadt@mozilla.com>
 # Date 1568214449 0
 # Node ID 02afa7cfcd1a5c5dca0b60f76cadb8deca2055bd
-# Parent  e5a959b5f47010e777b32c12d02961ab702609b3
+# Parent  f9837c9aa324b119d05c0903c1d5c274d873ee07
 Bug 1580280 - [mozlint] Support Python 3 in the mozlint library r=egao
 
 Differential Revision: https://phabricator.services.mozilla.com/D45435
@@ -473,7 +473,7 @@ diff --git a/python/mozlint/test/python.ini b/python/mozlint/test/python.ini
 +++ b/python/mozlint/test/python.ini
 @@ -1,11 +1,10 @@
  [DEFAULT]
- subsuite = mozlint, os == "linux"
+ subsuite = mozlint
 -skip-if = python == 3
  
  [test_cli.py]

+ 2 - 2
mozilla-release/patches/1580280-2-71a1.patch

@@ -2,7 +2,7 @@
 # User Andrew Halberstadt <ahalberstadt@mozilla.com>
 # Date 1568196058 0
 # Node ID 2e3c166dfab48bd1829b47738714d29efa55afa4
-# Parent  5ade7a8b5869545515833d35b46251d0fe9fc9e2
+# Parent  07dab25e99a1b4f60671c1bf3aba2690ebba7d77
 Bug 1580280 - [lint] Support Python 3 in the flake8 integration r=sylvestre
 
 Differential Revision: https://phabricator.services.mozilla.com/D45436
@@ -102,7 +102,7 @@ diff --git a/tools/lint/test/python.ini b/tools/lint/test/python.ini
 +++ b/tools/lint/test/python.ini
 @@ -1,7 +1,7 @@
  [DEFAULT]
- subsuite=mozlint, os == "linux"
+ subsuite = mozlint
 -skip-if = python == 3
  
  [test_eslint.py]

+ 4 - 4
mozilla-release/patches/1580280-9-71a1.patch

@@ -2,7 +2,7 @@
 # User Andrew Halberstadt <ahalberstadt@mozilla.com>
 # Date 1569856181 0
 # Node ID fbc81f84273941e9f7b3ccbcbb5bfe9201d2f6af
-# Parent  32d0532726fd2adae64f484d026375f8a27a36eb
+# Parent  d7d39924daa1d91c221c6c17e883dcd101d10f0d
 Bug 1580280 - [mozlint] Run |mach lint| with Python 3 and drop support for Python 2 r=mars
 
 Differential Revision: https://phabricator.services.mozilla.com/D45441
@@ -531,7 +531,7 @@ diff --git a/python/mozlint/test/python.ini b/python/mozlint/test/python.ini
 +++ b/python/mozlint/test/python.ini
 @@ -1,10 +1,11 @@
  [DEFAULT]
- subsuite = mozlint, os == "linux"
+ subsuite = mozlint
 +skip-if = python == 2
  
  [test_cli.py]
@@ -819,7 +819,7 @@ diff --git a/tools/lint/mach_commands.py b/tools/lint/mach_commands.py
 diff --git a/tools/lint/py2.yml b/tools/lint/py2.yml
 --- a/tools/lint/py2.yml
 +++ b/tools/lint/py2.yml
-@@ -28,14 +28,18 @@ py2:
+@@ -27,14 +27,18 @@ py2:
          - testing/mozharness
          - testing/tools
          - testing/web-platform
@@ -1038,7 +1038,7 @@ diff --git a/tools/lint/test/python.ini b/tools/lint/test/python.ini
 +++ b/tools/lint/test/python.ini
 @@ -1,7 +1,8 @@
  [DEFAULT]
- subsuite=mozlint, os == "linux"
+ subsuite = mozlint
 +skip-if = python == 2
  
  [test_eslint.py]

+ 3 - 3
mozilla-release/patches/1585702-2-71a1.patch

@@ -2,7 +2,7 @@
 # User Andrew Halberstadt <ahalberstadt@mozilla.com>
 # Date 1570211198 0
 # Node ID 9ea7f7d1768681d657daf36134d7a7d681b2e879
-# Parent  0505d94eaab49ddb68626cadffc0931538b8cbdb
+# Parent  f713283b53ef4f5712aac7ec087c285e102a4d34
 Bug 1585702 - [mozprocess] Fix "Embedded null character" error in Windows with Python 3, r=gbrown
 
 This works around a bug in Python:
@@ -20,7 +20,7 @@ Differential Revision: https://phabricator.services.mozilla.com/D48113
 diff --git a/testing/mozbase/mozprocess/mozprocess/processhandler.py b/testing/mozbase/mozprocess/mozprocess/processhandler.py
 --- a/testing/mozbase/mozprocess/mozprocess/processhandler.py
 +++ b/testing/mozbase/mozprocess/mozprocess/processhandler.py
-@@ -725,19 +725,17 @@ falling back to not using job objects fo
+@@ -714,19 +714,17 @@ falling back to not using job objects fo
          self.cmd = cmd
          self.args = args
          self.cwd = cwd
@@ -105,7 +105,7 @@ diff --git a/testing/mozbase/mozprocess/tests/manifest.ini b/testing/mozbase/moz
 +++ b/testing/mozbase/mozprocess/tests/manifest.ini
 @@ -1,11 +1,9 @@
  [DEFAULT]
- subsuite = mozbase, os == "linux"
+ subsuite = mozbase
 -# Python bug https://bugs.python.org/issue32745
 -skip-if = python == 3 && os == "win"  # Bug 1428713 for more info
  [test_kill.py]

+ 2 - 2
mozilla-release/patches/1591195-72a1.patch

@@ -2,7 +2,7 @@
 # User Andrew Halberstadt <ahalberstadt@mozilla.com>
 # Date 1572025284 0
 # Node ID e9eb829d40fcf5d87360b26a3451c345e3406c42
-# Parent  ca0a29ab15bb8053e0cd96ba0df25555db9147e7
+# Parent  f5b66afe925b656c3d9daa66304731ecc59e7cb6
 Bug 1591195 - [lint.shellcheck] Ensure shellcheck subprocess output is returned as text, r=sylvestre
 
 This also adds a test which would have caught the issue.
@@ -50,7 +50,7 @@ diff --git a/tools/lint/test/python.ini b/tools/lint/test/python.ini
 +++ b/tools/lint/test/python.ini
 @@ -1,8 +1,9 @@
  [DEFAULT]
- subsuite=mozlint, os == "linux"
+ subsuite = mozlint
  skip-if = python == 2
  
  [test_eslint.py]

+ 8 - 8
mozilla-release/patches/1594914-81a1.patch

@@ -2,7 +2,7 @@
 # User Hamzah <hamzah18051@iiitd.ac.in>
 # Date 1596562858 0
 # Node ID a274e08c3a77bee9ff24f4bdf3a38c72db4a6c06
-# Parent  7ae5d8015a64fafd655a56f4cd7dbbc6b2d57a9c
+# Parent  ff7fc1c5297aa0a48b9c4919fefc6e80354feb14
 Bug 1594914 - Convert mach python-test to run with python 3 r=gbrown
 
 Differential Revision: https://phabricator.services.mozilla.com/D77872
@@ -10,24 +10,24 @@ Differential Revision: https://phabricator.services.mozilla.com/D77872
 diff --git a/mach b/mach
 --- a/mach
 +++ b/mach
-@@ -30,17 +30,16 @@ py2commands="
+@@ -25,17 +25,16 @@ py2commands="
+     jsapi-tests
      jsshell-bench
      jstestbrowser
      jstests
      marionette-test
      mochitest
      mozharness
-     pastebin
      prettier-format
 -    python-test
      raptor
      raptor-test
      reftest
-     release
-     rusttests
      talos-test
-     taskcluster-build-image
      taskcluster-load-image
+     telemetry-tests-client
+     test
+     tps-build
 diff --git a/python/mach_commands.py b/python/mach_commands.py
 --- a/python/mach_commands.py
 +++ b/python/mach_commands.py
@@ -195,7 +195,7 @@ diff --git a/python/mozbuild/mozbuild/test/python.ini b/python/mozbuild/mozbuild
 diff --git a/python/mozbuild/mozbuild/virtualenv.py b/python/mozbuild/mozbuild/virtualenv.py
 --- a/python/mozbuild/mozbuild/virtualenv.py
 +++ b/python/mozbuild/mozbuild/virtualenv.py
-@@ -710,16 +710,23 @@ class VirtualenvManager(object):
+@@ -709,16 +709,23 @@ class VirtualenvManager(object):
              'PIP_NO_INDEX': '1',
              'WORKON_HOME': str(os.path.normpath(os.path.join(self.topobjdir, '_virtualenvs')))
          }))
@@ -222,7 +222,7 @@ diff --git a/python/mozbuild/mozbuild/virtualenv.py b/python/mozbuild/mozbuild/v
 diff --git a/testing/mozbase/moznetwork/moznetwork/moznetwork.py b/testing/mozbase/moznetwork/moznetwork/moznetwork.py
 --- a/testing/mozbase/moznetwork/moznetwork/moznetwork.py
 +++ b/testing/mozbase/moznetwork/moznetwork/moznetwork.py
-@@ -57,17 +57,18 @@ def _get_interface_list():
+@@ -61,17 +61,18 @@ def _get_interface_list():
          raise NetworkError('Unable to call ioctl with SIOCGIFCONF')
  
  

+ 30 - 0
mozilla-release/patches/1598823-84a1.patch

@@ -0,0 +1,30 @@
+# HG changeset patch
+# User Ben Hearsum <bhearsum@mozilla.com>
+# Date 1603380020 0
+# Node ID 4262fb4acb1b61bf805a1955cf1e30c879be98c1
+# Parent  9af3a63daed50c43018a72ae0f3a25d66e9616af
+Bug 1598823: remove visualmetrics mach command r=sparky,releng-reviewers,perftest-reviewers,aki DONTBUILD
+
+Differential Revision: https://phabricator.services.mozilla.com/D94160
+
+diff --git a/mach b/mach
+--- a/mach
++++ b/mach
+@@ -25,17 +25,16 @@ py2commands="
+     mozharness
+     prettier-format
+     raptor
+     raptor-test
+     reftest
+     talos-test
+     telemetry-tests-client
+     test
+-    visualmetrics
+     web-platform-tests
+     web-platform-tests-update
+     wpt
+     wpt-manifest-update
+     wpt-metadata-merge
+     wpt-metadata-summary
+     wpt-serve
+     wpt-test-paths

+ 2 - 2
mozilla-release/patches/1601140-2-76a1.patch

@@ -2,7 +2,7 @@
 # User Andrew Halberstadt <ahalberstadt@mozilla.com>
 # Date 1583760303 0
 # Node ID 2d5b526e781ea54f0dde004437ead55e8eafbc26
-# Parent  68019eb81e25460435e54ef851e46c843098dcec
+# Parent  c77ff0176c242d1d6332c38d3f5f3edaeaba1f10
 Bug 1601140 - Remove 'taskcluster' and 'taskcluster-urls' from third_party/python/requirements.in, r=rstewart
 
 This adds a warning not to add any Python 2 packages to the list. From now on,
@@ -53,7 +53,7 @@ diff --git a/third_party/python/requirements.txt b/third_party/python/requiremen
      --hash=sha256:4b90b09eeeb9b88c35bc642cbac057e45a5fd85367b985bd2809c62b7b939265 \
 -    --hash=sha256:e0d0eb91441a3b53dab4d9b743eafc1ac44476296a2053b6ca3af0b139faf87b
 +    --hash=sha256:e0d0eb91441a3b53dab4d9b743eafc1ac44476296a2053b6ca3af0b139faf87b \
-+    # via -r /tmp/tmplu66or93, pytest
++    # via -r /tmp/tmplu66or93, mozilla-version, pytest
  biplist==1.0.3 \
 -    --hash=sha256:4c0549764c5fe50b28042ec21aa2e14fe1a2224e239a1dae77d9e7f3932aa4c6
 +    --hash=sha256:4c0549764c5fe50b28042ec21aa2e14fe1a2224e239a1dae77d9e7f3932aa4c6 \

+ 5 - 4
mozilla-release/patches/1604079-73a1.patch

@@ -2,7 +2,7 @@
 # User Sylvestre Ledru <sledru@mozilla.com>
 # Date 1576601845 0
 # Node ID 4e3616d35b793962c6451a6483ad749627286e76
-# Parent  7cee294933f42da6347c32e92cd2371d70137d89
+# Parent  15df3698f3e805851e60290a07b4cf29dd48b05a
 Bug 1604079 - Add a unit test for mozlint yamllint r=ahal
 
 + some python 3 changes
@@ -35,16 +35,17 @@ new file mode 100644
 diff --git a/tools/lint/test/python.ini b/tools/lint/test/python.ini
 --- a/tools/lint/test/python.ini
 +++ b/tools/lint/test/python.ini
-@@ -2,8 +2,9 @@
- subsuite=mozlint, os == "linux"
+@@ -1,9 +1,10 @@
+ [DEFAULT]
+ subsuite = mozlint
  skip-if = python == 2
  
  [test_eslint.py]
  skip-if = os == "win"  # node not installed on worker
  [test_flake8.py]
  requirements = tools/lint/python/flake8_requirements.txt
- [test_shellcheck.py]
 +[test_yaml.py]
+ [test_shellcheck.py]
 diff --git a/tools/lint/test/test_yaml.py b/tools/lint/test/test_yaml.py
 new file mode 100644
 --- /dev/null

+ 11 - 11
mozilla-release/patches/1604360-4-73a1.patch

@@ -2,7 +2,7 @@
 # User Andrew Halberstadt <ahalberstadt@mozilla.com>
 # Date 1576606444 0
 # Node ID ebf5d85517a48713faaaf9098c937d26e1b90770
-# Parent  4a2307059bbe49cbf21b6e69f9c353e7b0cf8865
+# Parent  1001355fd7bb5bf2878fd89ab5715d1eb2f48e9d
 Bug 1604360 - [manifestparser] Remove unused 'parent' feature r=egao
 
 There aren't any manifests using '[parent:<manifest>]' in mozilla-central.
@@ -14,14 +14,14 @@ Differential Revision: https://phabricator.services.mozilla.com/D57407
 diff --git a/testing/mozbase/manifestparser/manifestparser/manifestparser.py b/testing/mozbase/manifestparser/manifestparser/manifestparser.py
 --- a/testing/mozbase/manifestparser/manifestparser/manifestparser.py
 +++ b/testing/mozbase/manifestparser/manifestparser/manifestparser.py
-@@ -148,32 +148,20 @@ class ManifestParser(object):
-             assert os.path.isabs(self.rootdir)
-             rootdir = self.rootdir + os.path.sep
- 
-         # read the configuration
-         sections = read_ini(fp=fp, variables=defaults, strict=self.strict,
-                             handle_defaults=self._handle_defaults)
-         self.manifest_defaults[filename] = defaults
+@@ -160,32 +160,20 @@ class ManifestParser(object):
+             # - The defaults of the ancestor manifests if self._handle_defaults
+             #   is True.
+             # - Any variables from the "[include:...]" section.
+             # - The defaults of the included manifest.
+             self.manifest_defaults[(parentmanifest, filename)] = defaults
+         else:
+             self.manifest_defaults[filename] = defaults
  
 -        parent_section_found = False
 -
@@ -49,7 +49,7 @@ diff --git a/testing/mozbase/manifestparser/manifestparser/manifestparser.py b/t
              if section.startswith('include:'):
                  include_file = read_file('include:')
                  if include_file:
-@@ -232,17 +220,17 @@ class ManifestParser(object):
+@@ -244,17 +232,17 @@ class ManifestParser(object):
                  # multiple manifests.
                  test['ancestor-manifest'] = parentmanifest
  
@@ -71,7 +71,7 @@ diff --git a/testing/mozbase/manifestparser/manifestparser/manifestparser.py b/t
 diff --git a/testing/mozbase/manifestparser/tests/test_manifestparser.py b/testing/mozbase/manifestparser/tests/test_manifestparser.py
 --- a/testing/mozbase/manifestparser/tests/test_manifestparser.py
 +++ b/testing/mozbase/manifestparser/tests/test_manifestparser.py
-@@ -130,82 +130,16 @@ yellow = submarine"""  # noqa
+@@ -271,82 +271,16 @@ yellow = submarine
  
      def test_invalid_path(self):
          """

+ 12 - 12
mozilla-release/patches/1604360-5-73a1.patch

@@ -2,7 +2,7 @@
 # User Andrew Halberstadt <ahalberstadt@mozilla.com>
 # Date 1576621168 0
 # Node ID 6671170fb10a489c6e14a768d5464f642941edb7
-# Parent  00281938f05f8bb4d91420bd2c075bf9adbe8f18
+# Parent  799dc6cbae1c593005d2aa9195a2a9cfb67f099d
 Bug 1604360 - [manifestparser] Remove unused 'defaults_only' logic r=egao
 
 This flag is not passed in from anywhere in mozilla-central.
@@ -12,7 +12,7 @@ Differential Revision: https://phabricator.services.mozilla.com/D57408
 diff --git a/testing/mozbase/manifestparser/manifestparser/ini.py b/testing/mozbase/manifestparser/manifestparser/ini.py
 --- a/testing/mozbase/manifestparser/manifestparser/ini.py
 +++ b/testing/mozbase/manifestparser/manifestparser/ini.py
-@@ -20,24 +20,23 @@ class IniParseError(Exception):
+@@ -19,24 +19,23 @@ class IniParseError(Exception):
          elif hasattr(fp, 'name'):
              path = fp.name
          else:
@@ -39,7 +39,7 @@ diff --git a/testing/mozbase/manifestparser/manifestparser/ini.py b/testing/mozb
  
      # variables
      variables = variables or {}
-@@ -131,20 +130,16 @@ def read_ini(fp, variables=None, default
+@@ -130,20 +129,16 @@ def read_ini(fp, variables=None, default
                          assert key not in current_section
  
                  current_section[key] = value
@@ -63,7 +63,7 @@ diff --git a/testing/mozbase/manifestparser/manifestparser/ini.py b/testing/mozb
 diff --git a/testing/mozbase/manifestparser/manifestparser/manifestparser.py b/testing/mozbase/manifestparser/manifestparser/manifestparser.py
 --- a/testing/mozbase/manifestparser/manifestparser/manifestparser.py
 +++ b/testing/mozbase/manifestparser/manifestparser/manifestparser.py
-@@ -70,17 +70,16 @@ class ManifestParser(object):
+@@ -69,17 +69,16 @@ class ManifestParser(object):
                         documented at
                         http://firefox-source-docs.mozilla.org/python/mozpack.html#module-mozpack.files
          :param handle_defaults: If not set, do not propagate manifest defaults to individual
@@ -81,7 +81,7 @@ diff --git a/testing/mozbase/manifestparser/manifestparser/manifestparser.py b/t
          self.relativeRoot = None
          self.finder = finder
          self._handle_defaults = handle_defaults
-@@ -89,26 +88,23 @@ class ManifestParser(object):
+@@ -88,26 +87,23 @@ class ManifestParser(object):
  
      def path_exists(self, path):
          if self.finder:
@@ -109,12 +109,12 @@ diff --git a/testing/mozbase/manifestparser/manifestparser/manifestparser.py b/t
              if not os.path.isabs(include_file):
                  include_file = os.path.join(here, include_file)
              if not self.path_exists(include_file):
-@@ -150,35 +146,28 @@ class ManifestParser(object):
- 
-         # read the configuration
-         sections = read_ini(fp=fp, variables=defaults, strict=self.strict,
-                             handle_defaults=self._handle_defaults)
-         self.manifest_defaults[filename] = defaults
+@@ -162,35 +158,28 @@ class ManifestParser(object):
+             # - Any variables from the "[include:...]" section.
+             # - The defaults of the included manifest.
+             self.manifest_defaults[(parentmanifest, filename)] = defaults
+         else:
+             self.manifest_defaults[filename] = defaults
  
          # get the tests
          for section, data in sections:
@@ -146,7 +146,7 @@ diff --git a/testing/mozbase/manifestparser/manifestparser/manifestparser.py b/t
              # determine the path
              path = test.get('path', section)
              _relpath = path
-@@ -218,23 +207,16 @@ class ManifestParser(object):
+@@ -230,23 +219,16 @@ class ManifestParser(object):
                  # indicate that in the test object for the sake of identifying
                  # a test, particularly in the case a test file is included by
                  # multiple manifests.

+ 2 - 2
mozilla-release/patches/1604360-6-73a1.patch

@@ -2,7 +2,7 @@
 # User Andrew Halberstadt <ahalberstadt@mozilla.com>
 # Date 1576707586 0
 # Node ID e46b8e00efcec98a5a802e934a5415b7ac909e2a
-# Parent  9e6e5832f9b748ef998ae5905eb78c0d68577314
+# Parent  90198ce7847f3bb1556219e67883d4df8b278ceb
 Bug 1604360 - [manifestparser] Convert 'test_read_ini' to the pytest format r=egao
 
 Make it nicer to read and edit.
@@ -25,7 +25,7 @@ diff --git a/testing/mozbase/manifestparser/tests/test_read_ini.py b/testing/moz
  
 -import unittest
 -from manifestparser import read_ini
--from StringIO import StringIO
+-from six import StringIO
 +from textwrap import dedent
  
  import mozunit

+ 10 - 10
mozilla-release/patches/1604360-7-73a1.patch

@@ -2,7 +2,7 @@
 # User Andrew Halberstadt <ahalberstadt@mozilla.com>
 # Date 1576713266 0
 # Node ID c6a0928caab6a65d1511fca8c44927a0cf8a2a4c
-# Parent  7a86559342dc2d418bf3c70dd914169a556fa8ce
+# Parent  42465f496f929ff3345a6b1c046abecd78a6166f
 Bug 1604360 - [manifestparser] Properly merge [DEFAULT] section of manifest with parent defaults r=gbrown
 
 Previously the [DEFAULT] section of a manifest would simply overwrite whatever
@@ -128,7 +128,7 @@ diff --git a/testing/mozbase/manifestparser/manifestparser/ini.py b/testing/mozb
 diff --git a/testing/mozbase/manifestparser/manifestparser/manifestparser.py b/testing/mozbase/manifestparser/manifestparser/manifestparser.py
 --- a/testing/mozbase/manifestparser/manifestparser/manifestparser.py
 +++ b/testing/mozbase/manifestparser/manifestparser/manifestparser.py
-@@ -140,18 +140,18 @@ class ManifestParser(object):
+@@ -139,18 +139,18 @@ class ManifestParser(object):
          # the microoptimization used below.
          if self.rootdir is None:
              rootdir = ""
@@ -141,14 +141,14 @@ diff --git a/testing/mozbase/manifestparser/manifestparser/manifestparser.py b/t
 -                            handle_defaults=self._handle_defaults)
 +        sections, defaults = read_ini(fp=fp, defaults=defaults, strict=self.strict,
 +                                      handle_defaults=self._handle_defaults)
-         self.manifest_defaults[filename] = defaults
- 
-         # get the tests
-         for section, data in sections:
-             # a file to include
-             # TODO: keep track of included file structure:
-             # self.manifests = {'manifest.ini': 'relative/path.ini'}
-             if section.startswith('include:'):
+         if parentmanifest and filename:
+             # A manifest can be read multiple times, via "include:", optionally
+             # with section-specific variables. These variables only apply to
+             # the included manifest when included via the same parent manifest,
+             # so they must be associated with (parentmanifest, filename).
+             #
+             # |defaults| is a combination of variables, in the following order:
+             # - The defaults of the ancestor manifests if self._handle_defaults
 diff --git a/testing/mozbase/manifestparser/tests/test_read_ini.py b/testing/mozbase/manifestparser/tests/test_read_ini.py
 --- a/testing/mozbase/manifestparser/tests/test_read_ini.py
 +++ b/testing/mozbase/manifestparser/tests/test_read_ini.py

+ 3 - 3
mozilla-release/patches/1604360-8-73a1.patch

@@ -2,7 +2,7 @@
 # User Andrew Halberstadt <ahalberstadt@mozilla.com>
 # Date 1576857222 0
 # Node ID bb77bb2231f3dc3058ec88b42a65d23216018fdb
-# Parent  78a0840498025834c540e7b42097fcd56aecc48c
+# Parent  557bdae1ac25bfad85ad02749c27f144fa3fdc8e
 Bug 1604360 - [manifestparser] Version bump to 2.0.0, r=egao
 
 Since we made backwards incompatible changes, let's do a major version bump.
@@ -29,5 +29,5 @@ diff --git a/testing/mozbase/manifestparser/setup.py b/testing/mozbase/manifestp
        description="Library to create and manage test manifests",
        long_description="see https://firefox-source-docs.mozilla.org/mozbase/index.html",
        classifiers=['Programming Language :: Python :: 2.7',
-                    'Programming Language :: Python :: 2 :: Only'],
-                   # Get strings from http://pypi.python.org/pypi?%3Aaction=list_classifiers
+                    'Programming Language :: Python :: 3',
+                    'Programming Language :: Python :: 3.5',

+ 10 - 10
mozilla-release/patches/1604616-75a1.patch

@@ -2,7 +2,7 @@
 # User Nathan Froyd <froydnj@mozilla.com>
 # Date 1581360702 0
 # Node ID 4e5525690bc22970dfef1e4f29c6f47299926cfb
-# Parent  45ffe3b130ab0671dfdde44c4ad012838f6c0b9b
+# Parent  c7d90c5914aca4920cf0f0f504bb0b520676cef5
 Bug 1604616 - check for a new enough libstdc++; r=glandium
 
 After a C++ language version bump, It's possible to wind up in
@@ -23,7 +23,7 @@ Differential Revision: https://phabricator.services.mozilla.com/D57516
 diff --git a/build/moz.configure/toolchain.configure b/build/moz.configure/toolchain.configure
 --- a/build/moz.configure/toolchain.configure
 +++ b/build/moz.configure/toolchain.configure
-@@ -888,16 +888,20 @@ def provided_program(env_var):
+@@ -862,16 +862,20 @@ def provided_program(env_var):
              wrapper=without_flags[:-1],
              program=without_flags[-1],
              flags=cmd[len(without_flags):],
@@ -44,7 +44,7 @@ diff --git a/build/moz.configure/toolchain.configure b/build/moz.configure/toolc
      `host_or_target` is either `host` or `target` (the @depends functions
      from init.configure.
      When the language is 'C++', `c_compiler` is the result of the `compiler`
-@@ -1018,20 +1022,21 @@ def compiler(language, host_or_target, c
+@@ -992,20 +996,21 @@ def compiler(language, host_or_target, c
          # ===================================================
          # Check the compiler version here instead of in `compiler_version` so
          # that the `checking` message doesn't pretend the compiler can be used
@@ -69,7 +69,7 @@ diff --git a/build/moz.configure/toolchain.configure b/build/moz.configure/toolc
                      % info.version)
  
          # If you want to bump the version check here search for
-@@ -1229,16 +1234,52 @@ def check_have_mac_10_14_sdk(value):
+@@ -1203,16 +1208,52 @@ def check_have_mac_10_14_sdk(value):
           try_compile(body='static_assert(sizeof(void *) == 8, "")',
                       check_msg='for 64-bit OS'))
  def check_have_64_bit(have_64_bit, compiler_have_64_bit):
@@ -114,11 +114,11 @@ diff --git a/build/moz.configure/toolchain.configure b/build/moz.configure/toolc
 +            onerror=die_on_old_libstdcxx)
 +
 +
- option(env='BINDGEN_CFLAGS',
-        nargs=1,
-        default=bindgen_cflags_defaults,
-        help='Options bindgen should pass to the C/C++ parser')
+ @depends(c_compiler)
+ def default_debug_flags(compiler_info):
+     # Debug info is ON by default.
+     if compiler_info.type in ('msvc', 'clang-cl'):
+         return '-Zi'
+     return '-g'
  
  
- @depends('BINDGEN_CFLAGS')
- @checking('bindgen cflags', lambda s: s if s else 'no')

+ 4 - 4
mozilla-release/patches/1606475-80a1.patch

@@ -2,7 +2,7 @@
 # User Hamzah <hamzah18051@iiitd.ac.in>
 # Date 1595247148 0
 # Node ID c43b0e4eb0dbd6f09a5d24b1000ce3439e573b8b
-# Parent  86ccf356d3601bc92fc638855f0af37a3b38c696
+# Parent  dacdc332eebfe9604f50385ea5ef173891f058b6
 Bug 1606475 - Move mach clang-format to Python 3 r=andi
 
 Manually tested various combination of commands for `./mach clang-format`. It works fine on both py2 as well as py3
@@ -12,14 +12,14 @@ Differential Revision: https://phabricator.services.mozilla.com/D79330
 diff --git a/mach b/mach
 --- a/mach
 +++ b/mach
-@@ -10,17 +10,16 @@
+@@ -9,17 +9,16 @@
+ 
  # Embeds a shell script inside a Python triple quote. This pattern is valid
  # shell because `''':'`, `':'` and `:` are all equivalent, and `:` is a no-op.
  ''':'
  py2commands="
      android
      awsy-test
-     browsertime
      check-spidermonkey
 -    clang-format
      cramtest
@@ -29,7 +29,7 @@ diff --git a/mach b/mach
      geckodriver
      geckodriver-test
      geckoview-junit
-     gradle
+     hazards
 diff --git a/python/mozbuild/mozbuild/code-analysis/mach_commands.py b/python/mozbuild/mozbuild/code-analysis/mach_commands.py
 --- a/python/mozbuild/mozbuild/code-analysis/mach_commands.py
 +++ b/python/mozbuild/mozbuild/code-analysis/mach_commands.py

+ 14 - 9
mozilla-release/patches/1606703-77a1.patch

@@ -2,7 +2,7 @@
 # User Mike Hommey <mh+mozilla@glandium.org>
 # Date 1586222381 0
 # Node ID b7d4ff29805ddabfebebb34b1e5beee07fcad45b
-# Parent  8b5962515b1da5e3f61201d681b3696c647a33b7
+# Parent  0bab19c796a42531d9b6ff8a1713bd7134d69c54
 Bug 1606703 - Switch python configure lint to python 3. r=rstewart
 
 Support for python 2 is completely dropped. It wouldn't be too much code
@@ -43,8 +43,8 @@ diff --git a/python/mozbuild/mozbuild/configure/lint.py b/python/mozbuild/mozbui
          out = StringIO()
          stdout = stdout or out
          stderr = stderr or out
-@@ -29,17 +29,17 @@ class LintSandbox(ConfigureSandbox):
-         self._wrapped = {}
+@@ -30,17 +30,17 @@ class LintSandbox(ConfigureSandbox):
+         self._has_imports = set()
          super(LintSandbox, self).__init__({}, environ=environ, argv=argv,
                                            stdout=stdout, stderr=stderr)
  
@@ -62,7 +62,7 @@ diff --git a/python/mozbuild/mozbuild/configure/lint.py b/python/mozbuild/mozbui
          location.
  
          The location is determined from the values of obj and line.
-@@ -51,18 +51,18 @@ class LintSandbox(ConfigureSandbox):
+@@ -52,18 +52,18 @@ class LintSandbox(ConfigureSandbox):
          def thrower(e):
              raise e
  
@@ -83,7 +83,7 @@ diff --git a/python/mozbuild/mozbuild/configure/lint.py b/python/mozbuild/mozbui
              line = obj.f_lineno
          else:
              # Don't know how to handle the given location, still raise the
-@@ -73,20 +73,21 @@ class LintSandbox(ConfigureSandbox):
+@@ -74,20 +74,21 @@ class LintSandbox(ConfigureSandbox):
          # the `def` line is on the first line of the function given as
          # argument, and the `raise` line is on the line given as argument.
  
@@ -106,7 +106,7 @@ diff --git a/python/mozbuild/mozbuild/configure/lint.py b/python/mozbuild/mozbui
              code.co_names,
              code.co_varnames,
              filename,
-@@ -114,20 +115,20 @@ class LintSandbox(ConfigureSandbox):
+@@ -115,20 +116,20 @@ class LintSandbox(ConfigureSandbox):
                      'Keyword arguments are not allowed in @depends functions')
              self._raise_from(e, func)
  
@@ -131,7 +131,7 @@ diff --git a/python/mozbuild/mozbuild/configure/lint.py b/python/mozbuild/mozbui
                      if isinstance(dep, DependsFunction):
                          dep = dep.name
                      else:
-@@ -143,24 +144,24 @@ class LintSandbox(ConfigureSandbox):
+@@ -144,24 +145,24 @@ class LintSandbox(ConfigureSandbox):
                  return False
              func, glob = self.unwrap(obj._func)
              # We allow missing --help dependencies for functions that:
@@ -160,7 +160,7 @@ diff --git a/python/mozbuild/mozbuild/configure/lint.py b/python/mozbuild/mozbui
          if (isinstance(obj, DependsFunction) and
                  self._help_option in obj.dependencies):
              return False
-@@ -208,21 +209,21 @@ class LintSandbox(ConfigureSandbox):
+@@ -209,27 +210,27 @@ class LintSandbox(ConfigureSandbox):
          _, glob = self.unwrap(wrapped)
          imports = set()
          for _from, _import, _as in self._imports.get(func, ()):
@@ -190,7 +190,12 @@ diff --git a/python/mozbuild/mozbuild/configure/lint.py b/python/mozbuild/mozbui
 +                self._raise_from(e, func, instr.starts_line - func.__code__.co_firstlineno)
  
          return wrapped
-\ No newline at end of file
+     def imports_impl(self, _import, _from=None, _as=None):
+         wrapper = super(LintSandbox, self).imports_impl(_import, _from=_from, _as=_as)
+         def decorator(func):
+             self._has_imports.add(func)
+             return wrapper(func)
+         return decorator
 diff --git a/python/mozbuild/mozbuild/configure/lint.py.1606703.later b/python/mozbuild/mozbuild/configure/lint.py.1606703.later
 new file mode 100644
 --- /dev/null

+ 4 - 43
mozilla-release/patches/1616989-75a1.patch

@@ -2,7 +2,7 @@
 # User Ricky Stewart <rstewart@mozilla.com>
 # Date 1582820546 0
 # Node ID b77c81cc3d735be321af7ae0ff87a8350d4ea36f
-# Parent  21462c123ea965586e8e9870de391417d0714499
+# Parent  e24e1590578079caa2620f3c76aa7739fe8e965d
 Bug 1616989 - mozbuild/frontend/reader.py supports Python 3 r=firefox-build-system-reviewers,mshal
 
 Differential Revision: https://phabricator.services.mozilla.com/D63566
@@ -149,14 +149,13 @@ diff --git a/testing/mozbase/manifestparser/manifestparser/ini.py b/testing/mozb
 diff --git a/testing/mozbase/manifestparser/manifestparser/manifestparser.py b/testing/mozbase/manifestparser/manifestparser/manifestparser.py
 --- a/testing/mozbase/manifestparser/manifestparser/manifestparser.py
 +++ b/testing/mozbase/manifestparser/manifestparser/manifestparser.py
-@@ -1,17 +1,17 @@
+@@ -1,16 +1,17 @@
  # 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/.
  
  from __future__ import absolute_import, print_function
  
--from io import BytesIO
 +import fnmatch
 +import io
  import json
@@ -166,10 +165,10 @@ diff --git a/testing/mozbase/manifestparser/manifestparser/manifestparser.py b/t
  import sys
  import types
  
- from six import string_types
+ from six import string_types, StringIO
  
  from .ini import read_ini
-@@ -122,19 +122,19 @@ class ManifestParser(object):
+@@ -121,19 +122,19 @@ class ManifestParser(object):
              # during manifest reading, the getcwd() calls that happen
              # with abspath calls will not be meaningful, so absolute
              # paths are required.
@@ -191,41 +190,3 @@ diff --git a/testing/mozbase/manifestparser/manifestparser/manifestparser.py b/t
  
          # Rootdir is needed for relative path calculation. Precompute it for
          # the microoptimization used below.
-@@ -454,17 +454,17 @@ class ManifestParser(object):
-                 print('%s = %s' % (key, test[key]), file=fp)
-             print(file=fp)
- 
-         if close:
-             # close the created file
-             fp.close()
- 
-     def __str__(self):
--        fp = BytesIO()
-+        fp = io.BytesIO()
-         self.write(fp=fp)
-         value = fp.getvalue()
-         return value
- 
-     def copy(self, directory, rootdir=None, *tags, **kwargs):
-         """
-         copy the manifests and associated tests
-         - directory : directory to copy to
-@@ -675,17 +675,17 @@ class ManifestParser(object):
- 
-         # determine output
-         opened_manifest_file = None  # name of opened manifest file
-         absolute = not relative_to  # whether to output absolute path names as names
-         if isinstance(write, string_types):
-             opened_manifest_file = write
-             write = open(write, 'w')
-         if write is None:
--            write = BytesIO()
-+            write = io.BytesIO()
- 
-         # walk the directories, generating manifests
-         def callback(directory, dirpath, dirnames, filenames):
- 
-             # absolute paths
-             filenames = [os.path.join(dirpath, filename)
-                          for filename in filenames]
-             # ensure new manifest isn't added

+ 35 - 0
mozilla-release/patches/1621718-76a1.patch

@@ -0,0 +1,35 @@
+# HG changeset patch
+# User Kartikaya Gupta <kgupta@mozilla.com>
+# Date 1584387973 0
+# Node ID 7b12fa322e5d953f63ca3fea3444e7a18b6cb7b1
+# Parent  14faefc1e694a49d446c2aed7765da3dec521aa4
+Bug 1621718 - Use proper email parsing library for parsing patches. r=ahal
+
+This uses the `email` module to parse the .patch file that Github generates,
+so that it properly decodes encoded-words in the headers. Also using this
+module is better with python3, so this patch also takes the command off the
+python2 whitelist and makes it python3-compatible.
+
+Differential Revision: https://phabricator.services.mozilla.com/D66621
+
+diff --git a/mach b/mach
+--- a/mach
++++ b/mach
+@@ -35,17 +35,16 @@ py2commands="
+     firefox-ui-functional
+     geckodriver
+     geckodriver-test
+     geckoview-junit
+     gradle
+     gtest
+     hazards
+     ide
+-    import-pr
+     install
+     jsapi-tests
+     jsshell-bench
+     jstestbrowser
+     jstests
+     marionette-test
+     mochitest
+     mozbuild-reference

+ 3 - 3
mozilla-release/patches/1621960-5-79a1.patch

@@ -2,7 +2,7 @@
 # User Mitchell Hentges <mhentges@mozilla.com>
 # Date 1591805408 0
 # Node ID 3b1827c74e34f1f0dfbf9ad174e2c8b84965c44d
-# Parent  6738462f4a3c2b8bc68535721222ed6fcfdb7b02
+# Parent  facfeae7993f88ff7f036b33525f05238cd4b725
 Bug 1621960: Change |mach python| default from Python 2 to Python 3 r=rstewart
 
 Depends on D77967
@@ -12,14 +12,14 @@ Differential Revision: https://phabricator.services.mozilla.com/D78181
 diff --git a/mach b/mach
 --- a/mach
 +++ b/mach
-@@ -30,17 +30,16 @@ py2commands="
+@@ -28,17 +28,16 @@ py2commands="
+     jsapi-tests
      jsshell-bench
      jstestbrowser
      jstests
      marionette-test
      mochitest
      mozharness
-     pastebin
      prettier-format
 -    python
      python-test

+ 338 - 0
mozilla-release/patches/1623024-1-79a1.patch

@@ -0,0 +1,338 @@
+# HG changeset patch
+# User Sylvestre Ledru <sledru@mozilla.com>
+# Date 1592510690 0
+# Node ID ba8087e38e6c4c4dabe2db96aded343fb1a86fcf
+# Parent  8c7c99bbd60f00d37312a22bc074626ff3bfcccc
+Bug 1623024 - mozlint: Add pylint as new linter r=linter-reviewers,ahal
+
+Differential Revision: https://phabricator.services.mozilla.com/D79076
+
+diff --git a/docs/code-quality/index.rst b/docs/code-quality/index.rst
+new file mode 100644
+--- /dev/null
++++ b/docs/code-quality/index.rst
+@@ -0,0 +1,6 @@
++   * - pylint
++     -
++     - `bug 1623024 <https://bugzilla.mozilla.org/show_bug.cgi?id=1623024>`_
++     - :ref:`pylint`
++     - https://www.pylint.org/
++     * - Python 2/3 compatibility check
+diff --git a/docs/code-quality/lint/linters/pylint.rst b/docs/code-quality/lint/linters/pylint.rst
+new file mode 100644
+--- /dev/null
++++ b/docs/code-quality/lint/linters/pylint.rst
+@@ -0,0 +1,31 @@
++pylint
++======
++
++`pylint <https://www.pylint.org/>`__ is a popular linter for python developed by Logilab. It is now the default python
++linter in VS Code.
++
++Please note that we also have :ref:`Flake8` available as a linter.
++
++Run Locally
++-----------
++
++The mozlint integration of pylint can be run using mach:
++
++.. parsed-literal::
++
++    $ mach lint --linter pylint <file paths>
++
++
++
++Configuration
++-------------
++
++To enable pylint on new directory, add the path to the include
++section in the `pylint.yml <https://searchfox.org/mozilla-central/source/tools/lint/pylint.yml>`_ file.
++
++
++Sources
++-------
++
++* `Configuration (YAML) <https://searchfox.org/mozilla-central/source/tools/lint/pylint.yml>`_
++* `Source <https://searchfox.org/mozilla-central/source/tools/lint/python/pylint.py>`_
+diff --git a/tools/lint/pylint.yml b/tools/lint/pylint.yml
+new file mode 100644
+--- /dev/null
++++ b/tools/lint/pylint.yml
+@@ -0,0 +1,24 @@
++---
++pylint:
++    description: A second Python linter
++    include:
++        - configure.py
++        - client.py
++        - security/
++        - accessible/
++        - docs/
++        - dom/base/
++        - mozglue/
++    exclude:
++        - dom/bindings/Codegen.py
++        - dom/bindings/Configuration.py
++        - security/manager/tools/crtshToIdentifyingStruct/crtshToIdentifyingStruct.py
++        - security/manager/ssl/tests/unit/test_content_signing/pysign.py
++        - security/ct/tests/gtest/createSTHTestData.py
++    extensions: ['py']
++    support-files:
++        - '**/.pylint'
++        - 'tools/lint/python/pylint*'
++    type: external
++    payload: python.pylint:lint
++    setup: python.pylint:setup
+diff --git a/tools/lint/python/pylint.py b/tools/lint/python/pylint.py
+new file mode 100644
+--- /dev/null
++++ b/tools/lint/python/pylint.py
+@@ -0,0 +1,117 @@
++# 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/.
++
++import json
++import os
++
++import signal
++import re
++
++from mozprocess import ProcessHandler
++
++from mozlint import result
++from mozlint.pathutils import expand_exclusions
++from mozlint.util import pip
++
++here = os.path.abspath(os.path.dirname(__file__))
++PYLINT_REQUIREMENTS_PATH = os.path.join(here, 'pylint_requirements.txt')
++
++PYLINT_NOT_FOUND = """
++Could not find pylint! Install pylint and try again.
++
++    $ pip install -U --require-hashes -r {}
++""".strip().format(PYLINT_REQUIREMENTS_PATH)
++
++
++PYLINT_INSTALL_ERROR = """
++Unable to install correct version of pylint
++Try to install it manually with:
++    $ pip install -U --require-hashes -r {}
++""".strip().format(PYLINT_REQUIREMENTS_PATH)
++
++
++class PylintProcess(ProcessHandler):
++    def __init__(self, config, *args, **kwargs):
++        self.config = config
++        kwargs["stream"] = False
++        kwargs["universal_newlines"] = True
++        ProcessHandler.__init__(self, *args, **kwargs)
++
++    def run(self, *args, **kwargs):
++        orig = signal.signal(signal.SIGINT, signal.SIG_IGN)
++        ProcessHandler.run(self, *args, **kwargs)
++        signal.signal(signal.SIGINT, orig)
++
++
++def setup(root, **lintargs):
++    if not pip.reinstall_program(PYLINT_REQUIREMENTS_PATH):
++        print(PYLINT_INSTALL_ERROR)
++        return 1
++
++
++def get_pylint_binary():
++    return "pylint"
++
++
++def run_process(config, cmd):
++    proc = PylintProcess(config, cmd)
++    proc.run()
++    try:
++        proc.wait()
++    except KeyboardInterrupt:
++        proc.kill()
++
++    return proc.output
++
++
++PYLINT_FORMAT_REGEX = re.compile(r'(.*):(.*): [(.*)] (.*)$')
++
++
++def parse_issues(log, config, issues_json, path):
++    results = []
++
++    try:
++        issues = json.loads(issues_json)
++    except json.decoder.JSONDecodeError:
++        log.debug("Could not parse the output:")
++        log.debug("pylint output: {}".format(issues_json))
++        return []
++
++    for issue in issues:
++        res = {
++            "path": issue["path"],
++            "level": issue["type"],
++            "lineno": issue["line"],
++            "column": issue["column"],
++            "message": issue["message"],
++            "rule": issue["message-id"],
++        }
++        results.append(result.from_config(config, **res))
++    return results
++
++
++def lint(paths, config, **lintargs):
++    log = lintargs['log']
++
++    binary = get_pylint_binary()
++
++    log = lintargs['log']
++    paths = list(expand_exclusions(paths, config, lintargs['root']))
++
++    cmd_args = [binary]
++    results = []
++
++    # list from https://code.visualstudio.com/docs/python/linting#_pylint
++    # And ignore a bit more elements
++    cmd_args += ["-fjson",
++                 "--disable=all",
++                 "--enable=F,E,unreachable,duplicate-key,unnecessary-semicolon,global-variable-not-assigned,unused-variable,binary-op-exception,bad-format-string,anomalous-backslash-in-string,bad-open-mode",  # NOQA: E501
++                 "--disable=import-error,no-member"]
++
++    base_command = cmd_args + paths
++    log.debug("Command: {}".format(' '.join(cmd_args)))
++    output = " ".join(run_process(config, base_command))
++    results = parse_issues(log, config, str(output), [])
++
++    return results
+diff --git a/tools/lint/python/pylint_requirements.txt b/tools/lint/python/pylint_requirements.txt
+new file mode 100644
+--- /dev/null
++++ b/tools/lint/python/pylint_requirements.txt
+@@ -0,0 +1,61 @@
++pylint==2.5.3 \
++    --hash=sha256:7dd78437f2d8d019717dbf287772d0b2dbdfd13fc016aa7faa08d67bccc46adc \
++    --hash=sha256:d0ece7d223fe422088b0e8f13fa0a1e8eb745ebffcb8ed53d3e95394b6101a1c
++toml==0.10.1 \
++    --hash=sha256:926b612be1e5ce0634a2ca03470f95169cf16f939018233a670519cb4ac58b0f \
++    --hash=sha256:bda89d5935c2eac546d648028b9901107a595863cb36bae0c73ac804a9b4ce88
++mccabe==0.6.1 \
++    --hash=sha256:ab8a6258860da4b6677da4bd2fe5dc2c659cff31b3ee4f7f5d64e79735b80d42 \
++    --hash=sha256:dd8d182285a0fe56bace7f45b5e7d1a6ebcbf524e8f3bd87eb0f125271b8831f
++six==1.15.0 \
++    --hash=sha256:30639c035cdb23534cd4aa2dd52c3bf48f06e5f4a941509c8bafd8ce11080259 \
++    --hash=sha256:8b74bedcbbbaca38ff6d7491d76f2b06b3592611af620f8426e82dddb04a5ced
++wrapt==1.12.1 \
++    --hash=sha256:b62ffa81fb85f4332a4f609cab4ac40709470da05643a082ec1eb88e6d9b97d7
++lazy-object-proxy==1.5.0 \
++    --hash=sha256:0aef3fa29f7d1194d6f8a99382b1b844e5a14d3bc1ef82c3b1c4fb7e7e2019bc \
++    --hash=sha256:159ae2bbb4dc3ba506aeba868d14e56a754c0be402d1f0d7fdb264e0bdf2b095 \
++    --hash=sha256:161a68a427022bf13e249458be2cb8da56b055988c584d372a917c665825ae9a \
++    --hash=sha256:2d58f0e6395bf41087a383a48b06b42165f3b699f1aa41ba201db84ab77be63d \
++    --hash=sha256:311c9d1840042fc8e2dd80fc80272a7ea73e7646745556153c9cda85a4628b18 \
++    --hash=sha256:35c3ad7b7f7d5d4a54a80f0ff5a41ab186237d6486843f8dde00c42cfab33905 \
++    --hash=sha256:459ef557e669d0046fe2b92eb4822c097c00b5ef9d11df0f9bd7d4267acdfc52 \
++    --hash=sha256:4a50513b6be001b9b7be2c435478fe9669249c77c241813907a44cda1fcd03f4 \
++    --hash=sha256:51035b175740c44707694c521560b55b66da9d5a7c545cf22582bc02deb61664 \
++    --hash=sha256:96f2cdb35bdfda10e075f12892a42cff5179bbda698992b845f36c5e92755d33 \
++    --hash=sha256:a0aed261060cd0372abf08d16399b1224dbb5b400312e6b00f2b23eabe1d4e96 \
++    --hash=sha256:a6052c4c7d95de2345d9c58fc0fe34fff6c27a8ed8550dafeb18ada84406cc99 \
++    --hash=sha256:cbf1354292a4f7abb6a0188f74f5e902e4510ebad105be1dbc4809d1ed92f77e \
++    --hash=sha256:da82b2372f5ded8806eaac95b19af89a7174efdb418d4e7beb0c6ab09cee7d95 \
++    --hash=sha256:dd89f466c930d7cfe84c94b5cbe862867c88b269f23e5aa61d40945e0d746f54 \
++    --hash=sha256:e3183fbeb452ec11670c2d9bfd08a57bc87e46856b24d1c335f995239bedd0e1 \
++    --hash=sha256:e9a571e7168076a0d5ecaabd91e9032e86d815cca3a4bf0dafead539ef071aa5 \
++    --hash=sha256:ec6aba217d0c4f71cbe48aea962a382dedcd111f47b55e8b58d4aaca519bd360
++astroid==2.4.2 \
++    --hash=sha256:2f4078c2a41bf377eea06d71c9d2ba4eb8f6b1af2135bec27bbbb7d8f12bb703 \
++    --hash=sha256:bc58d83eb610252fd8de6363e39d4f1d0619c894b0ed24603b881c02e64c7386
++isort==4.3.21 \
++    --hash=sha256:54da7e92468955c4fceacd0c86bd0ec997b0e1ee80d97f67c35a78b719dccab1 \
++    --hash=sha256:6e811fcb295968434526407adb8796944f1988c5b65e8139058f2014cbe100fd
++typed-ast==1.4.1 \
++    --hash=sha256:0666aa36131496aed8f7be0410ff974562ab7eeac11ef351def9ea6fa28f6355 \
++    --hash=sha256:0c2c07682d61a629b68433afb159376e24e5b2fd4641d35424e462169c0a7919 \
++    --hash=sha256:249862707802d40f7f29f6e1aad8d84b5aa9e44552d2cc17384b209f091276aa \
++    --hash=sha256:24995c843eb0ad11a4527b026b4dde3da70e1f2d8806c99b7b4a7cf491612652 \
++    --hash=sha256:269151951236b0f9a6f04015a9004084a5ab0d5f19b57de779f908621e7d8b75 \
++    --hash=sha256:4083861b0aa07990b619bd7ddc365eb7fa4b817e99cf5f8d9cf21a42780f6e01 \
++    --hash=sha256:498b0f36cc7054c1fead3d7fc59d2150f4d5c6c56ba7fb150c013fbc683a8d2d \
++    --hash=sha256:4e3e5da80ccbebfff202a67bf900d081906c358ccc3d5e3c8aea42fdfdfd51c1 \
++    --hash=sha256:6daac9731f172c2a22ade6ed0c00197ee7cc1221aa84cfdf9c31defeb059a907 \
++    --hash=sha256:715ff2f2df46121071622063fc7543d9b1fd19ebfc4f5c8895af64a77a8c852c \
++    --hash=sha256:73d785a950fc82dd2a25897d525d003f6378d1cb23ab305578394694202a58c3 \
++    --hash=sha256:8c8aaad94455178e3187ab22c8b01a3837f8ee50e09cf31f1ba129eb293ec30b \
++    --hash=sha256:8ce678dbaf790dbdb3eba24056d5364fb45944f33553dd5869b7580cdbb83614 \
++    --hash=sha256:aaee9905aee35ba5905cfb3c62f3e83b3bec7b39413f0a7f19be4e547ea01ebb \
++    --hash=sha256:bcd3b13b56ea479b3650b82cabd6b5343a625b0ced5429e4ccad28a8973f301b \
++    --hash=sha256:c9e348e02e4d2b4a8b2eedb48210430658df6951fa484e59de33ff773fbd4b41 \
++    --hash=sha256:d205b1b46085271b4e15f670058ce182bd1199e56b317bf2ec004b6a44f911f6 \
++    --hash=sha256:d43943ef777f9a1c42bf4e552ba23ac77a6351de620aa9acf64ad54933ad4d34 \
++    --hash=sha256:d5d33e9e7af3b34a40dc05f498939f0ebf187f07c385fd58d591c533ad8562fe \
++    --hash=sha256:fc0fea399acb12edbf8a628ba8d2312f583bdbdb3335635db062fa98cf71fca4 \
++    --hash=sha256:fe460b922ec15dd205595c9b5b99e2f056fd98ae8f9f56b888e7a17dc2b757e7
+diff --git a/tools/lint/test/files/pylint/bad.py b/tools/lint/test/files/pylint/bad.py
+new file mode 100644
+--- /dev/null
++++ b/tools/lint/test/files/pylint/bad.py
+@@ -0,0 +1,5 @@
++def foo():
++    useless_var = 1
++    useless_var = true
++    return "true"
++    print("unreachable")
+\ No newline at end of file
+diff --git a/tools/lint/test/files/pylint/good.py b/tools/lint/test/files/pylint/good.py
+new file mode 100644
+--- /dev/null
++++ b/tools/lint/test/files/pylint/good.py
+@@ -0,0 +1,3 @@
++def foo():
++    a = 1 + 1
++    return a
+diff --git a/tools/lint/test/python.ini b/tools/lint/test/python.ini
+--- a/tools/lint/test/python.ini
++++ b/tools/lint/test/python.ini
+@@ -1,10 +1,13 @@
+ [DEFAULT]
+ subsuite = mozlint
+ skip-if = python == 2
+ 
+ [test_eslint.py]
+ skip-if = os == "win"  # node not installed on worker
+ [test_flake8.py]
+ requirements = tools/lint/python/flake8_requirements.txt
++[test_pylint.py]
++skip-if = os == "win" || os == "mac"  # only installed on linux
++requirements = tools/lint/python/pylint_requirements.txt
+ [test_yaml.py]
+ [test_shellcheck.py]
+diff --git a/tools/lint/test/test_pylint.py b/tools/lint/test/test_pylint.py
+new file mode 100644
+--- /dev/null
++++ b/tools/lint/test/test_pylint.py
+@@ -0,0 +1,24 @@
++import mozunit
++
++LINTER = 'pylint'
++
++
++def test_lint_single_file(lint, paths):
++    results = lint(paths('bad.py'))
++    assert len(results) == 3
++    assert results[0].rule == 'E0602'
++    assert results[1].rule == 'W0101'
++    assert results[1].lineno == 5
++
++    # run lint again to make sure the previous results aren't counted twice
++    results = lint(paths('bad.py'))
++    assert len(results) == 3
++
++
++def test_lint_single_file_good(lint, paths):
++    results = lint(paths('good.py'))
++    assert len(results) == 0
++
++
++if __name__ == '__main__':
++    mozunit.main()

+ 21 - 0
mozilla-release/patches/1623024-4-79a1.patch

@@ -0,0 +1,21 @@
+# HG changeset patch
+# User Sylvestre Ledru <sledru@mozilla.com>
+# Date 1592656128 0
+# Node ID e16a500ce946ef6d1edf30b8b1c71284460b5a21
+# Parent  d4e73b44852a5674aca285c508fb72155ef8b709
+Bug 1623024 - mozlint/pylint - follow up: fix a syntax issue in the rst file
+
+Differential Revision: https://phabricator.services.mozilla.com/D80375
+
+diff --git a/docs/code-quality/index.rst b/docs/code-quality/index.rst
+--- a/docs/code-quality/index.rst
++++ b/docs/code-quality/index.rst
+@@ -1,6 +1,6 @@
+    * - pylint
+      -
+      - `bug 1623024 <https://bugzilla.mozilla.org/show_bug.cgi?id=1623024>`_
+      - :ref:`pylint`
+      - https://www.pylint.org/
+-     * - Python 2/3 compatibility check
++   * - Python 2/3 compatibility check
+\ No newline at end of file

+ 410 - 0
mozilla-release/patches/1623593-76a1.patch

@@ -0,0 +1,410 @@
+# HG changeset patch
+# User Andrea Marchesini <amarchesini@mozilla.com>
+# Date 1585067403 0
+# Node ID 23646088066c9a96c48af7f108f55b6de8b0eb40
+# Parent  1d479bd0413451d95f9ab226c9f0ace9f9184f48
+Bug 1623593 - Get rid of NECKO_COOKIES compilation flag, r=mayhemer
+
+Differential Revision: https://phabricator.services.mozilla.com/D67451
+
+diff --git a/Makefile.in b/Makefile.in
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -29,17 +29,17 @@ GARBAGE_DIRS += _javagen _profile static
+ # RUST*TARGET to GARBAGE_DIRS for those directories building Rust libraries.
+ # But the directories building Rust libraries don't actually have
+ # subdirectories to remove.  So we add to GARBAGE_DIRS once here, globally,
+ # for it to have the desired effect.
+ GARBAGE_DIRS += $(RUST_TARGET)
+ DIST_GARBAGE = config.cache config.log config.status* config-defs.h \
+    config/autoconf.mk \
+    mozilla-config.h \
+-   netwerk/necko-config.h xpcom/xpcom-config.h xpcom/xpcom-private.h \
++   xpcom/xpcom-config.h xpcom/xpcom-private.h \
+    .mozconfig.mk
+ 
+ ifndef MOZ_PROFILE_USE
+ $(MDDEPDIR)/buildid.h.stub $(MDDEPDIR)/source-repo.h.stub: FORCE
+ source-repo.h: $(MDDEPDIR)/source-repo.h.stub
+ buildid.h: $(MDDEPDIR)/buildid.h.stub
+ endif
+ 
+diff --git a/netwerk/build/moz.build b/netwerk/build/moz.build
+--- a/netwerk/build/moz.build
++++ b/netwerk/build/moz.build
+@@ -14,16 +14,17 @@ SOURCES += [
+ 
+ include('/ipc/chromium/chromium-config.mozbuild')
+ 
+ FINAL_LIBRARY = 'xul'
+ 
+ LOCAL_INCLUDES += [
+     '/netwerk/base',
+     '/netwerk/cache',
++    '/netwerk/cookie',
+     '/netwerk/dns',
+     '/netwerk/mime',
+     '/netwerk/protocol/about',
+     '/netwerk/protocol/data',
+     '/netwerk/protocol/file',
+     '/netwerk/protocol/ftp',
+     '/netwerk/protocol/http',
+     '/netwerk/protocol/res',
+@@ -55,21 +56,16 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'andr
+         '/netwerk/system/android',
+     ]
+ 
+ elif CONFIG['OS_ARCH'] == 'Linux':
+     LOCAL_INCLUDES += [
+         '/netwerk/system/linux',
+     ]
+ 
+-if CONFIG['NECKO_COOKIES']:
+-    LOCAL_INCLUDES += [
+-        '/netwerk/cookie',
+-    ]
+-
+ if CONFIG['NECKO_WIFI']:
+     LOCAL_INCLUDES += [
+         '/netwerk/wifi',
+     ]
+ 
+ LOCAL_INCLUDES += [
+     '!/netwerk/dns',
+     '/modules/brotli/dec',
+diff --git a/netwerk/build/nsNetModule.cpp b/netwerk/build/nsNetModule.cpp
+--- a/netwerk/build/nsNetModule.cpp
++++ b/netwerk/build/nsNetModule.cpp
+@@ -1,16 +1,14 @@
+ /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+ /* vim: set sw=4 ts=8 et tw=80 : */
+ /* 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/. */
+ 
+-#include "necko-config.h"
+-
+ #define ALLOW_LATE_HTTPLOG_H_INCLUDE 1
+ #include "base/basictypes.h"
+ 
+ #include "nsCOMPtr.h"
+ #include "nsIClassInfoImpl.h"
+ #include "mozilla/ModuleUtils.h"
+ #include "nsIComponentManager.h"
+ #include "nsIServiceManager.h"
+@@ -192,21 +190,19 @@ NS_GENERIC_FACTORY_CONSTRUCTOR(nsDirInde
+ ///////////////////////////////////////////////////////////////////////////////
+ 
+ #include "nsStreamListenerTee.h"
+ typedef mozilla::net::nsStreamListenerTee nsStreamListenerTee;
+ NS_GENERIC_FACTORY_CONSTRUCTOR(nsStreamListenerTee)
+ 
+ ///////////////////////////////////////////////////////////////////////////////
+ 
+-#ifdef NECKO_COOKIES
+ #include "nsCookieService.h"
+ NS_GENERIC_FACTORY_SINGLETON_CONSTRUCTOR(nsICookieService,
+   nsCookieService::GetXPCOMSingleton)
+-#endif
+ 
+ ///////////////////////////////////////////////////////////////////////////////
+ #ifdef NECKO_WIFI
+ 
+ #include "nsWifiMonitor.h"
+ #undef LOG
+ #undef LOG_ENABLED
+ NS_GENERIC_FACTORY_CONSTRUCTOR(nsWifiMonitor)
+@@ -740,20 +736,18 @@ NS_DEFINE_NAMED_CID(NS_ABOUT_CACHE_MODUL
+ NS_DEFINE_NAMED_CID(NS_ABOUT_CACHE_ENTRY_MODULE_CID);
+ NS_DEFINE_NAMED_CID(NS_SOCKSSOCKETPROVIDER_CID);
+ NS_DEFINE_NAMED_CID(NS_SOCKS4SOCKETPROVIDER_CID);
+ NS_DEFINE_NAMED_CID(NS_UDPSOCKETPROVIDER_CID);
+ NS_DEFINE_NAMED_CID(NS_CACHESERVICE_CID);
+ NS_DEFINE_NAMED_CID(NS_APPLICATIONCACHESERVICE_CID);
+ NS_DEFINE_NAMED_CID(NS_APPLICATIONCACHENAMESPACE_CID);
+ NS_DEFINE_NAMED_CID(NS_APPLICATIONCACHE_CID);
+-#ifdef NECKO_COOKIES
+ NS_DEFINE_NAMED_CID(NS_COOKIEMANAGER_CID);
+ NS_DEFINE_NAMED_CID(NS_COOKIESERVICE_CID);
+-#endif
+ #ifdef NECKO_WIFI
+ NS_DEFINE_NAMED_CID(NS_WIFI_MONITOR_COMPONENT_CID);
+ #endif
+ NS_DEFINE_NAMED_CID(NS_DATAPROTOCOLHANDLER_CID);
+ NS_DEFINE_NAMED_CID(NS_VIEWSOURCEHANDLER_CID);
+ NS_DEFINE_NAMED_CID(NS_WYCIWYGPROTOCOLHANDLER_CID);
+ NS_DEFINE_NAMED_CID(NS_WEBSOCKETPROTOCOLHANDLER_CID);
+ NS_DEFINE_NAMED_CID(NS_WEBSOCKETSSLPROTOCOLHANDLER_CID);
+@@ -862,20 +856,18 @@ static const mozilla::Module::CIDEntry k
+     { &kNS_ABOUT_CACHE_ENTRY_MODULE_CID, false, nullptr, nsAboutCacheEntryConstructor },
+     { &kNS_SOCKSSOCKETPROVIDER_CID, false, nullptr, nsSOCKSSocketProvider::CreateV5 },
+     { &kNS_SOCKS4SOCKETPROVIDER_CID, false, nullptr, nsSOCKSSocketProvider::CreateV4 },
+     { &kNS_UDPSOCKETPROVIDER_CID, false, nullptr, nsUDPSocketProviderConstructor },
+     { &kNS_CACHESERVICE_CID, false, nullptr, nsCacheService::Create },
+     { &kNS_APPLICATIONCACHESERVICE_CID, false, nullptr, nsApplicationCacheServiceConstructor },
+     { &kNS_APPLICATIONCACHENAMESPACE_CID, false, nullptr, nsApplicationCacheNamespaceConstructor },
+     { &kNS_APPLICATIONCACHE_CID, false, nullptr, nsApplicationCacheConstructor },
+-#ifdef NECKO_COOKIES
+     { &kNS_COOKIEMANAGER_CID, false, nullptr, nsICookieServiceConstructor },
+     { &kNS_COOKIESERVICE_CID, false, nullptr, nsICookieServiceConstructor },
+-#endif
+ #ifdef NECKO_WIFI
+     { &kNS_WIFI_MONITOR_COMPONENT_CID, false, nullptr, nsWifiMonitorConstructor },
+ #endif
+     { &kNS_DATAPROTOCOLHANDLER_CID, false, nullptr, nsDataHandler::Create },
+     { &kNS_VIEWSOURCEHANDLER_CID, false, nullptr, nsViewSourceHandlerConstructor },
+     { &kNS_WYCIWYGPROTOCOLHANDLER_CID, false, nullptr, nsWyciwygProtocolHandlerConstructor },
+     { &kNS_WEBSOCKETPROTOCOLHANDLER_CID, false, nullptr,
+       mozilla::net::WebSocketChannelConstructor },
+@@ -993,20 +985,18 @@ static const mozilla::Module::ContractID
+     { NS_ABOUT_MODULE_CONTRACTID_PREFIX "cache-entry", &kNS_ABOUT_CACHE_ENTRY_MODULE_CID },
+     { NS_NETWORK_SOCKET_CONTRACTID_PREFIX "socks", &kNS_SOCKSSOCKETPROVIDER_CID },
+     { NS_NETWORK_SOCKET_CONTRACTID_PREFIX "socks4", &kNS_SOCKS4SOCKETPROVIDER_CID },
+     { NS_NETWORK_SOCKET_CONTRACTID_PREFIX "udp", &kNS_UDPSOCKETPROVIDER_CID },
+     { NS_CACHESERVICE_CONTRACTID, &kNS_CACHESERVICE_CID },
+     { NS_APPLICATIONCACHESERVICE_CONTRACTID, &kNS_APPLICATIONCACHESERVICE_CID },
+     { NS_APPLICATIONCACHENAMESPACE_CONTRACTID, &kNS_APPLICATIONCACHENAMESPACE_CID },
+     { NS_APPLICATIONCACHE_CONTRACTID, &kNS_APPLICATIONCACHE_CID },
+-#ifdef NECKO_COOKIES
+     { NS_COOKIEMANAGER_CONTRACTID, &kNS_COOKIEMANAGER_CID },
+     { NS_COOKIESERVICE_CONTRACTID, &kNS_COOKIESERVICE_CID },
+-#endif
+ #ifdef NECKO_WIFI
+     { NS_WIFI_MONITOR_CONTRACTID, &kNS_WIFI_MONITOR_COMPONENT_CID },
+ #endif
+     { NS_NETWORK_PROTOCOL_CONTRACTID_PREFIX "data", &kNS_DATAPROTOCOLHANDLER_CID },
+     { NS_NETWORK_PROTOCOL_CONTRACTID_PREFIX "view-source", &kNS_VIEWSOURCEHANDLER_CID },
+     { NS_NETWORK_PROTOCOL_CONTRACTID_PREFIX "wyciwyg", &kNS_WYCIWYGPROTOCOLHANDLER_CID },
+     { NS_NETWORK_PROTOCOL_CONTRACTID_PREFIX "ws", &kNS_WEBSOCKETPROTOCOLHANDLER_CID },
+     { NS_NETWORK_PROTOCOL_CONTRACTID_PREFIX "wss", &kNS_WEBSOCKETSSLPROTOCOLHANDLER_CID },
+diff --git a/netwerk/cache/nsCacheService.cpp b/netwerk/cache/nsCacheService.cpp
+--- a/netwerk/cache/nsCacheService.cpp
++++ b/netwerk/cache/nsCacheService.cpp
+@@ -7,18 +7,16 @@
+ #include "nsCacheService.h"
+ 
+ #include "mozilla/ArrayUtils.h"
+ #include "mozilla/Attributes.h"
+ #include "mozilla/Assertions.h"
+ #include "mozilla/DebugOnly.h"
+ #include "mozilla/FileUtils.h"
+ 
+-#include "necko-config.h"
+-
+ #include "nsCache.h"
+ #include "nsCacheRequest.h"
+ #include "nsCacheEntry.h"
+ #include "nsCacheEntryDescriptor.h"
+ #include "nsCacheDevice.h"
+ #include "nsMemoryCacheDevice.h"
+ #include "nsICacheVisitor.h"
+ #include "nsDiskCacheDevice.h"
+diff --git a/netwerk/cookie/moz.build b/netwerk/cookie/moz.build
+--- a/netwerk/cookie/moz.build
++++ b/netwerk/cookie/moz.build
+@@ -2,57 +2,57 @@
+ # 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/.
+ 
+ with Files('**'):
+     BUG_COMPONENT = ('Core', 'Networking: Cookies')
+ 
+-# export required interfaces, even if --disable-cookies has been given
++# export required interfaces
+ XPIDL_SOURCES += [
+     'nsICookie.idl',
+     'nsICookie2.idl',
+     'nsICookieManager.idl',
+     'nsICookieManager2.idl',
+     'nsICookiePermission.idl',
+     'nsICookieService.idl',
+ ]
+ 
+ XPIDL_MODULE = 'necko_cookie'
+ 
+-if CONFIG['NECKO_COOKIES']:
+-    EXPORTS.mozilla.net = [
+-        'CookieServiceChild.h',
+-        'CookieServiceParent.h',
+-        'nsCookieKey.h',
+-    ]
+-    UNIFIED_SOURCES += [
+-        'CookieServiceChild.cpp',
+-        'CookieServiceParent.cpp',
+-        'nsCookie.cpp',
+-    ]
+-    # nsCookieService.cpp can't be unified because of symbol conflicts
+-    SOURCES += [
+-        'nsCookieService.cpp',
+-    ]
+-    LOCAL_INCLUDES += [
+-        '/intl/uconv',
+-    ]
++EXPORTS.mozilla.net = [
++    'CookieServiceChild.h',
++    'CookieServiceParent.h',
++    'nsCookieKey.h',
++]
++UNIFIED_SOURCES += [
++    'CookieServiceChild.cpp',
++    'CookieServiceParent.cpp',
++    'nsCookie.cpp',
++]
++# nsCookieService.cpp can't be unified because of symbol conflicts
++SOURCES += [
++    'nsCookieService.cpp',
++]
+ 
+-    XPCSHELL_TESTS_MANIFESTS += [
+-        'test/unit/xpcshell.ini',
+-    ]
++XPCSHELL_TESTS_MANIFESTS += [
++    'test/unit/xpcshell.ini',
++]
+ 
+-    BROWSER_CHROME_MANIFESTS += [
+-        'test/browser/browser.ini',
+-    ]
++BROWSER_CHROME_MANIFESTS += [
++    'test/browser/browser.ini',
++]
+ 
+ IPDL_SOURCES = [
+     'PCookieService.ipdl',
+ ]
+ 
++LOCAL_INCLUDES += [
++    '/intl/uconv',
++]
++
+ include('/ipc/chromium/chromium-config.mozbuild')
+ 
+ FINAL_LIBRARY = 'xul'
+ 
+ if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
+     CXXFLAGS += ['-Wno-error=shadow']
+diff --git a/netwerk/ipc/NeckoChild.cpp b/netwerk/ipc/NeckoChild.cpp
+--- a/netwerk/ipc/NeckoChild.cpp
++++ b/netwerk/ipc/NeckoChild.cpp
+@@ -1,16 +1,15 @@
+ 
+ /* vim: set sw=2 ts=8 et tw=80 : */
+ 
+ /* 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/. */
+ 
+-#include "necko-config.h"
+ #include "nsHttp.h"
+ #include "mozilla/net/NeckoChild.h"
+ #include "mozilla/dom/ContentChild.h"
+ #include "mozilla/dom/TabChild.h"
+ #include "mozilla/net/HttpChannelChild.h"
+ #include "mozilla/net/CookieServiceChild.h"
+ #include "mozilla/net/WyciwygChannelChild.h"
+ #include "mozilla/net/FTPChannelChild.h"
+diff --git a/netwerk/ipc/NeckoParent.cpp b/netwerk/ipc/NeckoParent.cpp
+--- a/netwerk/ipc/NeckoParent.cpp
++++ b/netwerk/ipc/NeckoParent.cpp
+@@ -1,16 +1,15 @@
+ /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+ /* vim: set sw=2 ts=8 et tw=80 : */
+ 
+ /* 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/. */
+ 
+-#include "necko-config.h"
+ #include "nsHttp.h"
+ #include "mozilla/BasePrincipal.h"
+ #include "mozilla/ipc/IPCStreamUtils.h"
+ #include "mozilla/net/ExtensionProtocolHandler.h"
+ #include "mozilla/net/NeckoParent.h"
+ #include "mozilla/net/HttpChannelParent.h"
+ #include "mozilla/net/CookieServiceParent.h"
+ #include "mozilla/net/WyciwygChannelParent.h"
+diff --git a/netwerk/moz.build b/netwerk/moz.build
+--- a/netwerk/moz.build
++++ b/netwerk/moz.build
+@@ -29,11 +29,8 @@ if CONFIG['MOZ_SCTP']:
+ 
+ if CONFIG['NECKO_WIFI']:
+     DIRS += ['wifi']
+ 
+ DIRS += ['locales']
+ 
+ DIRS += ['build']
+ TEST_DIRS += ['test']
+-
+-CONFIGURE_DEFINE_FILES += ['necko-config.h']
+-EXPORTS += ['!necko-config.h']
+diff --git a/netwerk/necko-config.h.in b/netwerk/necko-config.h.in
+deleted file mode 100644
+--- a/netwerk/necko-config.h.in
++++ /dev/null
+@@ -1,12 +0,0 @@
+-/* 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/. */
+-
+-#ifndef _NECKO_CONFIG_H_
+-#define _NECKO_CONFIG_H_
+-
+-#undef NECKO_COOKIES
+-
+-#undef NECKO_WIFI
+-
+-#endif
+diff --git a/old-configure.in b/old-configure.in
+--- a/old-configure.in
++++ b/old-configure.in
+@@ -1659,17 +1659,16 @@ MOZ_FEEDS=1
+ MOZ_AUTH_EXTENSION=1
+ MOZ_PREF_EXTENSIONS=1
+ MOZ_SPELLCHECK=1
+ MOZ_TOOLKIT_SEARCH=1
+ MOZ_UNIVERSALCHARDET=1
+ MOZ_XUL=1
+ MOZ_ZIPWRITER=1
+ MOZ_NO_SMART_CARDS=
+-NECKO_COOKIES=1
+ MOZ_USE_NATIVE_POPUP_WINDOWS=
+ MOZ_EXCLUDE_HYPHENATION_DICTIONARIES=
+ MOZ_CONTENT_SANDBOX=
+ MOZ_GMP_SANDBOX=
+ MOZ_SANDBOX=1
+ MOZ_BINARY_EXTENSIONS=
+ MOZ_DEVTOOLS=server
+ 
+@@ -2866,29 +2865,16 @@ if test "$NECKO_WIFI"; then
+     AC_MSG_ERROR([Necko WiFi scanning needs DBus on your platform, remove --disable-dbus or use --disable-necko-wifi])
+   fi
+   AC_DEFINE(NECKO_WIFI)
+   _NON_GLOBAL_ACDEFINES="$_NON_GLOBAL_ACDEFINES NECKO_WIFI"
+ fi
+ AC_SUBST(NECKO_WIFI)
+ AC_SUBST(NECKO_WIFI_DBUS)
+ 
+-dnl
+-dnl option to disable cookies
+-dnl
+-MOZ_ARG_DISABLE_BOOL(cookies,
+-[  --disable-cookies       Disable cookie support],
+-    NECKO_COOKIES=,
+-    NECKO_COOKIES=1)
+-AC_SUBST(NECKO_COOKIES)
+-if test "$NECKO_COOKIES"; then
+-    AC_DEFINE(NECKO_COOKIES)
+-    _NON_GLOBAL_ACDEFINES="$_NON_GLOBAL_ACDEFINES NECKO_COOKIES"
+-fi
+-
+ dnl ========================================================
+ dnl =
+ dnl = Maintainer debug option (no --enable equivalent)
+ dnl =
+ dnl ========================================================
+ 
+ AC_SUBST(NM)
+ AC_SUBST_LIST(ASFLAGS)

+ 4 - 4
mozilla-release/patches/1627072-77a1.patch

@@ -2,7 +2,7 @@
 # User Mitchell Hentges <mhentges@mozilla.com>
 # Date 1587761646 0
 # Node ID 5a93d460a035b076591abf6f45fd2b670f286e05
-# Parent  6fb7728a83e4d4b45996dd50cd3458525d8f12c2
+# Parent  5e7eb44e06d0da9e9883d2b3a9f672e49e9769f2
 Bug 1627072 - Runs pip-compile in same directory as temporary requirements file r=rstewart
 
 pip-compile can annotate each requirement with a reason why it is included (e.g.: transitive dependency, or depended-on directly).
@@ -113,8 +113,8 @@ diff --git a/third_party/python/requirements.txt b/third_party/python/requiremen
  attrs==18.1.0 \
      --hash=sha256:4b90b09eeeb9b88c35bc642cbac057e45a5fd85367b985bd2809c62b7b939265 \
      --hash=sha256:e0d0eb91441a3b53dab4d9b743eafc1ac44476296a2053b6ca3af0b139faf87b \
--    # via -r /tmp/tmplu66or93, pytest
-+    # via -r requirements-mach-vendor-python.in, pytest
+-    # via -r /tmp/tmplu66or93, mozilla-version, pytest
++    # via -r requirements-mach-vendor-python.in, mozilla-version, pytest
  biplist==1.0.3 \
      --hash=sha256:4c0549764c5fe50b28042ec21aa2e14fe1a2224e239a1dae77d9e7f3932aa4c6 \
 -    # via -r /tmp/tmplu66or93
@@ -227,7 +227,7 @@ diff --git a/third_party/python/requirements.txt b/third_party/python/requiremen
      --hash=sha256:36784bf8ae766e14f9db0e377ccfa02835d648321d2007b6ae0bf4fd612c0f94 \
      --hash=sha256:71161cb0e928d824092a5f16203939bbc0867ce4c4685db263cf22c3ae7634a8 \
 -    # via -r /tmp/tmplu66or93
-+    # via -r requirements-mach-vendor-python.in
++    # via -r requirements-mach-vendor-python.in, responses
  requests==2.9.1 \
      --hash=sha256:113fbba5531a9e34945b7d36b33a084e8ba5d0664b703c81a7c572d91919a5b8 \
      --hash=sha256:c577815dd00f1394203fc44eb979724b098f88264a9ef898ee45b8e5e9cf587f \

+ 5 - 5
mozilla-release/patches/1627255-1-77a1.patch

@@ -2,7 +2,7 @@
 # User Jan de Mooij <jdemooij@mozilla.com>
 # Date 1586248467 0
 # Node ID 00e0880582b2d19190af3ff8a002185ee45986ff
-# Parent  c651e3b73f687283b37a3ef2d2c1881dca7d2413
+# Parent  61462944895ebb1406b3873c72eb94bb85082ea2
 Bug 1627255 part 1 - Remove the ENABLE_ION config item. r=glandium
 
 These days we can get the same information by checking JS_CODEGEN_NONE, so let's
@@ -13,14 +13,14 @@ Differential Revision: https://phabricator.services.mozilla.com/D69578
 diff --git a/js/moz.configure b/js/moz.configure
 --- a/js/moz.configure
 +++ b/js/moz.configure
-@@ -87,18 +87,16 @@ set_define('MOZ_STATIC_JS', static_js)
+@@ -90,18 +90,16 @@ set_define('MOZ_STATIC_JS', static_js)
  def ion_default(target):
      if target.cpu in ('x86', 'x86_64', 'arm', 'aarch64', 'mips32', 'mips64'):
          return True
  
  js_option('--enable-ion',
            default=ion_default,
-           help='Enable use of the IonMonkey JIT')
+           help='{Enable|Disable} use of the IonMonkey JIT')
  
 -set_config('ENABLE_ION', depends_if('--enable-ion')(lambda x: True))
 -
@@ -35,7 +35,7 @@ diff --git a/js/moz.configure b/js/moz.configure
 diff --git a/js/src/jit/moz.build b/js/src/jit/moz.build
 --- a/js/src/jit/moz.build
 +++ b/js/src/jit/moz.build
-@@ -92,17 +92,17 @@ UNIFIED_SOURCES += [
+@@ -93,17 +93,17 @@ UNIFIED_SOURCES += [
      'TypedObjectPrediction.cpp',
      'TypePolicy.cpp',
      'ValueNumbering.cpp',
@@ -57,7 +57,7 @@ diff --git a/js/src/jit/moz.build b/js/src/jit/moz.build
 diff --git a/js/src/jsapi-tests/moz.build b/js/src/jsapi-tests/moz.build
 --- a/js/src/jsapi-tests/moz.build
 +++ b/js/src/jsapi-tests/moz.build
-@@ -116,17 +116,17 @@ SOURCES += [
+@@ -117,17 +117,17 @@ SOURCES += [
      'testAssemblerBuffer.cpp',
  ]
  

+ 2 - 2
mozilla-release/patches/1627255-2-77a1.patch

@@ -2,7 +2,7 @@
 # User Jan de Mooij <jdemooij@mozilla.com>
 # Date 1586271153 0
 # Node ID ddd50e956bc0807783580f04cc3d225a061ecef8
-# Parent  942abb976c29394c19c7d8ebd63e63e483a79804
+# Parent  f64cba8d1c73c0e18f4c684fbd4ccffb5cfa0e2f
 Bug 1627255 part 2 - Rename the --enable-ion configure option to --enable-jit. r=glandium
 
 For many years now this has covered all our JIT codegen, not just Ion, so this is
@@ -31,7 +31,7 @@ diff --git a/js/moz.configure b/js/moz.configure
  
 -js_option('--enable-ion',
 -          default=ion_default,
--          help='Enable use of the IonMonkey JIT')
+-          help='{Enable|Disable} use of the IonMonkey JIT')
 +js_option('--enable-jit',
 +          default=jit_default,
 +          help='{Enable|Disable} use of the JITs')

Some files were not shown because too many files changed in this diff