Browse Source

more backports

Frank-Rainer Grahl 7 months ago
parent
commit
2cfccd8bda
100 changed files with 2515 additions and 4023 deletions
  1. 13 13
      frg/work-js/mozilla-release/patches/1040316-63a1.patch
  2. 47 47
      frg/work-js/mozilla-release/patches/1416723-2-63a1.patch
  3. 151 127
      frg/work-js/mozilla-release/patches/1416723-2-63a1.patchx
  4. 4 3
      frg/work-js/mozilla-release/patches/1426865-2-72a1.patch
  5. 0 0
      frg/work-js/mozilla-release/patches/1434305-01-63a1.patch
  6. 0 0
      frg/work-js/mozilla-release/patches/1434305-02-63a1.patch
  7. 2 11
      frg/work-js/mozilla-release/patches/1434305-03-63a1.patch
  8. 0 0
      frg/work-js/mozilla-release/patches/1434305-04-63a1.patch
  9. 0 0
      frg/work-js/mozilla-release/patches/1434305-05-63a1.patch
  10. 0 0
      frg/work-js/mozilla-release/patches/1434305-06-63a1.patch
  11. 22 67
      frg/work-js/mozilla-release/patches/1434305-07-PARTIAL-63a1.patch
  12. 0 0
      frg/work-js/mozilla-release/patches/1434305-08-63a1.patch
  13. 0 0
      frg/work-js/mozilla-release/patches/1434305-09-63a1.patch
  14. 0 0
      frg/work-js/mozilla-release/patches/1434305-10-63a1.patch
  15. 0 0
      frg/work-js/mozilla-release/patches/1434305-11-63a1.patch
  16. 0 0
      frg/work-js/mozilla-release/patches/1434305-12-63a1.patch
  17. 0 0
      frg/work-js/mozilla-release/patches/1434305-13-63a1.patch
  18. 0 0
      frg/work-js/mozilla-release/patches/1434305-14-63a1.patch
  19. 0 0
      frg/work-js/mozilla-release/patches/1438727-00-63a1.patch
  20. 0 0
      frg/work-js/mozilla-release/patches/1438727-01-63a1.patch
  21. 0 0
      frg/work-js/mozilla-release/patches/1438727-02-63a1.patch
  22. 0 0
      frg/work-js/mozilla-release/patches/1438727-03-63a1.patch
  23. 0 0
      frg/work-js/mozilla-release/patches/1438727-04-63a1.patch
  24. 0 0
      frg/work-js/mozilla-release/patches/1438727-05-63a1.patch
  25. 0 0
      frg/work-js/mozilla-release/patches/1438727-06-63a1.patch
  26. 0 0
      frg/work-js/mozilla-release/patches/1438727-07-63a1.patch
  27. 0 0
      frg/work-js/mozilla-release/patches/1438727-08-63a1.patch
  28. 0 0
      frg/work-js/mozilla-release/patches/1438727-09-63a1.patch
  29. 0 0
      frg/work-js/mozilla-release/patches/1438727-10-63a1.patch
  30. 0 0
      frg/work-js/mozilla-release/patches/1438727-11-63a1.patch
  31. 0 0
      frg/work-js/mozilla-release/patches/1438727-12-63a1.patch
  32. 0 0
      frg/work-js/mozilla-release/patches/1438727-13-63a1.patch
  33. 0 0
      frg/work-js/mozilla-release/patches/1438727-14-63a1.patch
  34. 0 0
      frg/work-js/mozilla-release/patches/1438727-15-63a1.patch
  35. 0 0
      frg/work-js/mozilla-release/patches/1438727-16-63a1.patch
  36. 0 0
      frg/work-js/mozilla-release/patches/1438727-17-63a1.patch
  37. 0 0
      frg/work-js/mozilla-release/patches/1438727-18-63a1.patch
  38. 0 0
      frg/work-js/mozilla-release/patches/1438727-19-63a1.patch
  39. 0 0
      frg/work-js/mozilla-release/patches/1438727-20-63a1.patch
  40. 0 0
      frg/work-js/mozilla-release/patches/1438727-21-63a1.patch
  41. 0 0
      frg/work-js/mozilla-release/patches/1438727-22-63a1.patch
  42. 8 8
      frg/work-js/mozilla-release/patches/1448277-63a1.patch
  43. 31 0
      frg/work-js/mozilla-release/patches/1448439-1-61a1.patch
  44. 4 4
      frg/work-js/mozilla-release/patches/1449986-63a1.patch
  45. 0 0
      frg/work-js/mozilla-release/patches/1467022-63a1.patch
  46. 0 0
      frg/work-js/mozilla-release/patches/1467273-63a1.patch
  47. 16 16
      frg/work-js/mozilla-release/patches/1470985-1-63a1.patch
  48. 0 0
      frg/work-js/mozilla-release/patches/1470985-2-63a1.patch
  49. 0 0
      frg/work-js/mozilla-release/patches/1470985-3-63a1.patch
  50. 0 0
      frg/work-js/mozilla-release/patches/1472178-63a1.patch
  51. 0 0
      frg/work-js/mozilla-release/patches/1472681-63a1.patch
  52. 1312 0
      frg/work-js/mozilla-release/patches/1473301-63a1.patch
  53. 0 0
      frg/work-js/mozilla-release/patches/1476124-63a1.patch
  54. 0 0
      frg/work-js/mozilla-release/patches/1476239-1-63a1.patch
  55. 0 0
      frg/work-js/mozilla-release/patches/1476239-2-63a1.patch
  56. 0 0
      frg/work-js/mozilla-release/patches/1476239-3-63a1.patch
  57. 0 0
      frg/work-js/mozilla-release/patches/1476239-4-63a1.patch
  58. 5 6
      frg/work-js/mozilla-release/patches/1476405-3-63a1.patch
  59. 8 8
      frg/work-js/mozilla-release/patches/1476423-63a1.patch
  60. 3 11
      frg/work-js/mozilla-release/patches/1476955-63a1.patch
  61. 0 0
      frg/work-js/mozilla-release/patches/1477073-63a1.patch
  62. 0 0
      frg/work-js/mozilla-release/patches/1477329-63a1.patch
  63. 0 0
      frg/work-js/mozilla-release/patches/1477375-63a1.patch
  64. 0 0
      frg/work-js/mozilla-release/patches/1477381-63a1.patch
  65. 0 0
      frg/work-js/mozilla-release/patches/1477742-63a1.patch
  66. 87 36
      frg/work-js/mozilla-release/patches/1477761-2only-63a1.patch
  67. 0 0
      frg/work-js/mozilla-release/patches/1478616-1-63a1.patch
  68. 0 0
      frg/work-js/mozilla-release/patches/1478616-2-63a1.patch
  69. 0 0
      frg/work-js/mozilla-release/patches/1478943-63a1.patch
  70. 1 1
      frg/work-js/mozilla-release/patches/1479076-63a1.patch
  71. 1 1
      frg/work-js/mozilla-release/patches/1479204-63a1.patch
  72. 7 7
      frg/work-js/mozilla-release/patches/1482931-1-63a1.patch
  73. 9 9
      frg/work-js/mozilla-release/patches/1486577-6-63a1.patch
  74. 6 6
      frg/work-js/mozilla-release/patches/1486577-7-63a1.patch
  75. 615 75
      frg/work-js/mozilla-release/patches/1488698-7-WIP-64a1.patch
  76. 92 0
      frg/work-js/mozilla-release/patches/1491336-64a1.patch
  77. 5 5
      frg/work-js/mozilla-release/patches/1502159-2-65a1.patch
  78. 13 8
      frg/work-js/mozilla-release/patches/1502886-1-65a1.patch
  79. 0 0
      frg/work-js/mozilla-release/patches/NOBUG-20180724-registersets-63a1.patch
  80. 9 9
      frg/work-js/mozilla-release/patches/TOP-1630383-02-77a1.patch
  81. 19 18
      frg/work-js/mozilla-release/patches/TOP-NOBUG-REGEXP-07-1626713-76a1-25318.patch
  82. 25 24
      frg/work-js/mozilla-release/patches/TOP-NOBUG-REGEXP-37-1642493-79a1-25318.patch
  83. 0 70
      frg/work-js/mozilla-release/patches/mozilla-central-push_427634.patch
  84. 0 711
      frg/work-js/mozilla-release/patches/mozilla-central-push_427643.patch
  85. 0 62
      frg/work-js/mozilla-release/patches/mozilla-central-push_427656.patch
  86. 0 143
      frg/work-js/mozilla-release/patches/mozilla-central-push_427657.patch
  87. 0 305
      frg/work-js/mozilla-release/patches/mozilla-central-push_427658.patch
  88. 0 343
      frg/work-js/mozilla-release/patches/mozilla-central-push_427659.patch
  89. 0 274
      frg/work-js/mozilla-release/patches/mozilla-central-push_427660.patch
  90. 0 200
      frg/work-js/mozilla-release/patches/mozilla-central-push_427661.patch
  91. 0 174
      frg/work-js/mozilla-release/patches/mozilla-central-push_427662.patch
  92. 0 65
      frg/work-js/mozilla-release/patches/mozilla-central-push_427770.patch
  93. 0 163
      frg/work-js/mozilla-release/patches/mozilla-central-push_427850.patch
  94. 0 63
      frg/work-js/mozilla-release/patches/mozilla-central-push_427989.patch
  95. 0 48
      frg/work-js/mozilla-release/patches/mozilla-central-push_428282.patch
  96. 0 320
      frg/work-js/mozilla-release/patches/mozilla-central-push_428283.patch
  97. 0 154
      frg/work-js/mozilla-release/patches/mozilla-central-push_428284.patch
  98. 0 124
      frg/work-js/mozilla-release/patches/mozilla-central-push_428285.patch
  99. 0 182
      frg/work-js/mozilla-release/patches/mozilla-central-push_428286.patch
  100. 0 102
      frg/work-js/mozilla-release/patches/mozilla-central-push_428496.patch

+ 13 - 13
frg/work-js/mozilla-release/patches/1040316-63a1.patch

@@ -2,7 +2,7 @@
 # User Jeff Walden <jwalden@mit.edu>
 # Date 1534776284 25200
 # Node ID 6d10eda7f12de64044246e544d581537f30f8998
-# Parent  ed1df2ab76adc7d0c5a4c3b734ff5fc8ba709ce8
+# Parent  cc5a2884e3f81b30b80b4da0e8f6922db63c8c6a
 Bug 1040316 - Move AutoStableStringChars out of friendapi into public API.  r=jandem
 
 diff --git a/dom/base/nsJSUtils.h b/dom/base/nsJSUtils.h
@@ -718,7 +718,7 @@ diff --git a/js/src/jsfriendapi.h b/js/src/jsfriendapi.h
  class Heap;
  } /* namespace JS */
  
-@@ -801,22 +801,16 @@ MOZ_ALWAYS_INLINE size_t
+@@ -800,22 +800,16 @@ MOZ_ALWAYS_INLINE size_t
  GetAtomLength(JSAtom* atom)
  {
      return reinterpret_cast<JS::shadow::String*>(atom)->length();
@@ -741,7 +741,7 @@ diff --git a/js/src/jsfriendapi.h b/js/src/jsfriendapi.h
  MOZ_ALWAYS_INLINE size_t
  GetLinearStringLength(JSLinearString* s)
  {
-@@ -1398,104 +1392,16 @@ typedef enum JSErrNum {
+@@ -1397,104 +1391,16 @@ typedef enum JSErrNum {
  
  namespace js {
  
@@ -846,7 +846,7 @@ diff --git a/js/src/jsfriendapi.h b/js/src/jsfriendapi.h
      enum SniffingBehavior {
          WithSideEffects,
          NoSideEffects
-@@ -1561,17 +1467,17 @@ struct MOZ_STACK_CLASS JS_FRIEND_API(Err
+@@ -1560,17 +1466,17 @@ struct MOZ_STACK_CLASS JS_FRIEND_API(Err
      // Or we may need to synthesize a JSErrorReport one of our own.
      JSErrorReport ownedReport;
  
@@ -868,7 +868,7 @@ diff --git a/js/src/jsfriendapi.h b/js/src/jsfriendapi.h
 diff --git a/js/src/moz.build b/js/src/moz.build
 --- a/js/src/moz.build
 +++ b/js/src/moz.build
-@@ -148,16 +148,17 @@ EXPORTS.js += [
+@@ -149,16 +149,17 @@ EXPORTS.js += [
      '../public/ProtoKey.h',
      '../public/Proxy.h',
      '../public/Realm.h',
@@ -986,12 +986,12 @@ diff --git a/js/src/shell/js.cpp b/js/src/shell/js.cpp
 +
  using js::shell::RCFile;
  
+ using mozilla::ArrayEqual;
  using mozilla::ArrayLength;
  using mozilla::Atomic;
  using mozilla::MakeScopeExit;
  using mozilla::Maybe;
  using mozilla::Nothing;
- using mozilla::NumberEqualsInt32;
 diff --git a/js/src/vm/ArgumentsObject.cpp b/js/src/vm/ArgumentsObject.cpp
 --- a/js/src/vm/ArgumentsObject.cpp
 +++ b/js/src/vm/ArgumentsObject.cpp
@@ -1106,7 +1106,7 @@ diff --git a/js/src/vm/Debugger.cpp b/js/src/vm/Debugger.cpp
  using mozilla::Maybe;
  using mozilla::Some;
  using mozilla::Nothing;
-@@ -5065,17 +5067,17 @@ Debugger::isCompilableUnit(JSContext* cx
+@@ -5084,17 +5086,17 @@ Debugger::isCompilableUnit(JSContext* cx
      if (!args[0].isString()) {
          JS_ReportErrorNumberASCII(cx, GetErrorMessage, nullptr, JSMSG_NOT_EXPECTED_TYPE,
                                    "Debugger.isCompilableUnit", "string",
@@ -1285,7 +1285,7 @@ diff --git a/js/src/vm/SelfHosting.cpp b/js/src/vm/SelfHosting.cpp
 diff --git a/js/src/vm/StringType.cpp b/js/src/vm/StringType.cpp
 --- a/js/src/vm/StringType.cpp
 +++ b/js/src/vm/StringType.cpp
-@@ -14,16 +14,17 @@
+@@ -15,16 +15,17 @@
  #include "mozilla/RangedPtr.h"
  #include "mozilla/TextUtils.h"
  #include "mozilla/TypeTraits.h"
@@ -1303,10 +1303,10 @@ diff --git a/js/src/vm/StringType.cpp b/js/src/vm/StringType.cpp
  #include "vm/JSContext-inl.h"
  #include "vm/JSObject-inl.h"
  #include "vm/Realm-inl.h"
-@@ -35,16 +36,17 @@ using mozilla::IsNegativeZero;
+@@ -36,16 +37,17 @@ using mozilla::IsAsciiDigit;
+ using mozilla::IsNegativeZero;
  using mozilla::IsSame;
  using mozilla::PodCopy;
- using mozilla::PodEqual;
  using mozilla::RangedPtr;
  using mozilla::RoundUpPow2;
  using mozilla::Unused;
@@ -1393,7 +1393,7 @@ diff --git a/js/src/vm/UbiNodeCensus.cpp b/js/src/vm/UbiNodeCensus.cpp
 diff --git a/js/src/wasm/AsmJS.cpp b/js/src/wasm/AsmJS.cpp
 --- a/js/src/wasm/AsmJS.cpp
 +++ b/js/src/wasm/AsmJS.cpp
-@@ -29,16 +29,17 @@
+@@ -30,16 +30,17 @@
  #include "jsutil.h"
  
  #include "builtin/String.h"
@@ -1411,11 +1411,11 @@ diff --git a/js/src/wasm/AsmJS.cpp b/js/src/wasm/AsmJS.cpp
  #include "vm/Time.h"
  #include "vm/TypedArrayObject.h"
  #include "wasm/WasmCompile.h"
-@@ -65,16 +66,17 @@ using mozilla::IsNaN;
+@@ -66,16 +67,17 @@ using mozilla::HashGeneric;
+ using mozilla::IsNaN;
  using mozilla::IsNegativeZero;
  using mozilla::IsPositiveZero;
  using mozilla::IsPowerOfTwo;
- using mozilla::PodEqual;
  using mozilla::PodZero;
  using mozilla::PositiveInfinity;
  using mozilla::Unused;

+ 47 - 47
frg/work-js/mozilla-release/patches/1416723-2-63a1.patch

@@ -2,7 +2,7 @@
 # User Benjamin Bouvier <benj@benj.me>
 # Date 1532438101 -7200
 # Node ID 4534ae540e86d686f29098cbcc2f932a6b83117b
-# Parent  7ee4f4b8eaeafdda95702c39cc1b07de2f2460d2
+# Parent  213c1fc17160af5339139ec61a86e98f47f1551c
 Bug 1416723: Remove SIMD.js support; r=luke, r=nbp
 
 diff --git a/dom/serviceworkers/test/test_serviceworker_interfaces.js.1416723-2.later b/dom/serviceworkers/test/test_serviceworker_interfaces.js.1416723-2.later
@@ -12039,7 +12039,7 @@ diff --git a/js/src/jit-test/tests/asm.js/testZOOB.js b/js/src/jit-test/tests/as
 diff --git a/js/src/jit/BaselineBailouts.cpp b/js/src/jit/BaselineBailouts.cpp
 --- a/js/src/jit/BaselineBailouts.cpp
 +++ b/js/src/jit/BaselineBailouts.cpp
-@@ -2004,17 +2004,16 @@ jit::FinishBailoutToBaseline(BaselineBai
+@@ -1997,17 +1997,16 @@ jit::FinishBailoutToBaseline(BaselineBai
        case Bailout_Hole:
        case Bailout_NegativeIndex:
        case Bailout_NonInt32Input:
@@ -12265,7 +12265,7 @@ diff --git a/js/src/jit/BaselineInspector.h b/js/src/jit/BaselineInspector.h
 diff --git a/js/src/jit/CodeGenerator.cpp b/js/src/jit/CodeGenerator.cpp
 --- a/js/src/jit/CodeGenerator.cpp
 +++ b/js/src/jit/CodeGenerator.cpp
-@@ -394,17 +394,16 @@ MNewStringObject::templateObj() const
+@@ -416,17 +416,16 @@ MNewStringObject::templateObj() const
  {
      return &templateObj_->as<StringObject>();
  }
@@ -12283,7 +12283,7 @@ diff --git a/js/src/jit/CodeGenerator.cpp b/js/src/jit/CodeGenerator.cpp
  {
      js_delete(scriptCounts_);
  }
-@@ -6387,92 +6386,16 @@ CodeGenerator::visitNewTypedObject(LNewT
+@@ -6414,92 +6413,16 @@ CodeGenerator::visitNewTypedObject(LNewT
                                     StoreRegisterTo(object));
  
      TemplateObject templateObj(templateObject);
@@ -12376,7 +12376,7 @@ diff --git a/js/src/jit/CodeGenerator.cpp b/js/src/jit/CodeGenerator.cpp
  void
  CodeGenerator::visitNewNamedLambdaObject(LNewNamedLambdaObject* lir)
  {
-@@ -7193,17 +7116,17 @@ CodeGenerator::visitWasmCallI64(LWasmCal
+@@ -7220,17 +7143,17 @@ CodeGenerator::visitWasmCallI64(LWasmCal
  }
  
  void
@@ -12395,7 +12395,7 @@ diff --git a/js/src/jit/CodeGenerator.cpp b/js/src/jit/CodeGenerator.cpp
          masm.loadPtr(addr, tmp);
          addr = Address(tmp, 0);
      }
-@@ -7220,33 +7143,29 @@ CodeGenerator::visitWasmLoadGlobalVar(LW
+@@ -7247,33 +7170,29 @@ CodeGenerator::visitWasmLoadGlobalVar(LW
        // Aligned access: code is aligned on PageSize + there is padding
        // before the global data section.
        case MIRType::Int8x16:
@@ -12430,7 +12430,7 @@ diff --git a/js/src/jit/CodeGenerator.cpp b/js/src/jit/CodeGenerator.cpp
          masm.loadPtr(addr, tmp);
          addr = Address(tmp, 0);
      }
-@@ -7263,21 +7182,17 @@ CodeGenerator::visitWasmStoreGlobalVar(L
+@@ -7290,21 +7209,17 @@ CodeGenerator::visitWasmStoreGlobalVar(L
        // Aligned access: code is aligned on PageSize + there is padding
        // before the global data section.
        case MIRType::Int8x16:
@@ -12452,7 +12452,7 @@ diff --git a/js/src/jit/CodeGenerator.cpp b/js/src/jit/CodeGenerator.cpp
  void
  CodeGenerator::visitWasmLoadGlobalVarI64(LWasmLoadGlobalVarI64* ins)
  {
-@@ -10323,17 +10238,16 @@ CodeGenerator::link(JSContext* cx, Compi
+@@ -10350,17 +10265,16 @@ CodeGenerator::link(JSContext* cx, Compi
  
      RootedScript script(cx, gen->info().script());
      OptimizationLevel optimizationLevel = gen->optimizationInfo().level();
@@ -12470,7 +12470,7 @@ diff --git a/js/src/jit/CodeGenerator.cpp b/js/src/jit/CodeGenerator.cpp
          // Do a normal invalidate, except don't cancel offThread compilations,
          // since that will cancel this compilation too.
          Invalidate(cx, script, /* resetUses */ false, /* cancelOffThread*/ false);
-@@ -11547,29 +11461,27 @@ CodeGenerator::visitLoadUnboxedScalar(LL
+@@ -11574,29 +11488,27 @@ CodeGenerator::visitLoadUnboxedScalar(LL
  {
      Register elements = ToRegister(lir->elements());
      Register temp = lir->temp()->isBogusTemp() ? InvalidReg : ToRegister(lir->temp());
@@ -12502,7 +12502,7 @@ diff --git a/js/src/jit/CodeGenerator.cpp b/js/src/jit/CodeGenerator.cpp
  
  void
  CodeGenerator::visitLoadTypedArrayElementHole(LLoadTypedArrayElementHole* lir)
-@@ -11838,23 +11750,20 @@ CodeGenerator::visitLoadElementFromState
+@@ -11865,23 +11777,20 @@ CodeGenerator::visitLoadElementFromState
  
      addOutOfLineCode(jumpTable, lir->mir());
      masm.bind(&join);
@@ -12530,7 +12530,7 @@ diff --git a/js/src/jit/CodeGenerator.cpp b/js/src/jit/CodeGenerator.cpp
      }
  }
  
-@@ -11862,27 +11771,26 @@ void
+@@ -11889,27 +11798,26 @@ void
  CodeGenerator::visitStoreUnboxedScalar(LStoreUnboxedScalar* lir)
  {
      Register elements = ToRegister(lir->elements());
@@ -12894,7 +12894,7 @@ diff --git a/js/src/jit/Ion.cpp b/js/src/jit/Ion.cpp
 diff --git a/js/src/jit/IonBuilder.cpp b/js/src/jit/IonBuilder.cpp
 --- a/js/src/jit/IonBuilder.cpp
 +++ b/js/src/jit/IonBuilder.cpp
-@@ -7877,21 +7877,16 @@ IonBuilder::getElemTryTypedObject(bool* 
+@@ -7883,21 +7883,16 @@ IonBuilder::getElemTryTypedObject(bool* 
      if (elemPrediction.isUseless())
          return Ok();
  
@@ -12916,7 +12916,7 @@ diff --git a/js/src/jit/IonBuilder.cpp b/js/src/jit/IonBuilder.cpp
                                                    objPrediction,
                                                    elemPrediction,
                                                    elemSize);
-@@ -8939,21 +8934,16 @@ IonBuilder::setElemTryTypedObject(bool* 
+@@ -8945,21 +8940,16 @@ IonBuilder::setElemTryTypedObject(bool* 
      if (elemPrediction.isUseless())
          return Ok();
  
@@ -12938,7 +12938,7 @@ diff --git a/js/src/jit/IonBuilder.cpp b/js/src/jit/IonBuilder.cpp
          return setElemTryScalarElemOfTypedObject(emitted,
                                                   obj,
                                                   index,
-@@ -10571,20 +10561,16 @@ IonBuilder::getPropTryTypedObject(bool* 
+@@ -10577,20 +10567,16 @@ IonBuilder::getPropTryTypedObject(bool* 
  {
      TypedObjectPrediction fieldPrediction;
      size_t fieldOffset;
@@ -12959,7 +12959,7 @@ diff --git a/js/src/jit/IonBuilder.cpp b/js/src/jit/IonBuilder.cpp
                                                    fieldPrediction,
                                                    fieldIndex);
  
-@@ -11717,20 +11703,16 @@ IonBuilder::setPropTryTypedObject(bool* 
+@@ -11723,20 +11709,16 @@ IonBuilder::setPropTryTypedObject(bool* 
  {
      TypedObjectPrediction fieldPrediction;
      size_t fieldOffset;
@@ -13534,7 +13534,7 @@ diff --git a/js/src/jit/JitRealm.h b/js/src/jit/JitRealm.h
 diff --git a/js/src/jit/Lowering.cpp b/js/src/jit/Lowering.cpp
 --- a/js/src/jit/Lowering.cpp
 +++ b/js/src/jit/Lowering.cpp
-@@ -3666,18 +3666,17 @@ void
+@@ -3684,18 +3684,17 @@ void
  LIRGenerator::visitLoadUnboxedScalar(MLoadUnboxedScalar* ins)
  {
      MOZ_ASSERT(IsValidElementsType(ins->elements(), ins->offsetAdjustment()));
@@ -13554,7 +13554,7 @@ diff --git a/js/src/jit/Lowering.cpp b/js/src/jit/Lowering.cpp
  
      Synchronization sync = Synchronization::Load();
      if (ins->requiresMemoryBarrier()) {
-@@ -3748,22 +3747,17 @@ LIRGenerator::visitLoadTypedArrayElement
+@@ -3766,22 +3765,17 @@ LIRGenerator::visitLoadTypedArrayElement
  }
  
  void
@@ -13578,7 +13578,7 @@ diff --git a/js/src/jit/Lowering.cpp b/js/src/jit/Lowering.cpp
  
      LUse elements = useRegister(ins->elements());
      LAllocation index = useRegisterOrConstant(ins->index());
-@@ -4687,17 +4681,17 @@ LIRGenerator::visitWasmParameter(MWasmPa
+@@ -4705,17 +4699,17 @@ LIRGenerator::visitWasmParameter(MWasmPa
  #if defined(JS_NUNBOX32)
              LInt64Allocation(LArgument(abi.offsetFromArgBase() + INT64HIGH_OFFSET),
                               LArgument(abi.offsetFromArgBase() + INT64LOW_OFFSET))
@@ -13597,7 +13597,7 @@ diff --git a/js/src/jit/Lowering.cpp b/js/src/jit/Lowering.cpp
  LIRGenerator::visitWasmReturn(MWasmReturn* ins)
  {
      MDefinition* rval = ins->getOperand(0);
-@@ -4707,18 +4701,16 @@ LIRGenerator::visitWasmReturn(MWasmRetur
+@@ -4725,18 +4719,16 @@ LIRGenerator::visitWasmReturn(MWasmRetur
          return;
      }
  
@@ -13616,7 +13616,7 @@ diff --git a/js/src/jit/Lowering.cpp b/js/src/jit/Lowering.cpp
      add(lir);
  }
  
-@@ -4728,17 +4720,17 @@ LIRGenerator::visitWasmReturnVoid(MWasmR
+@@ -4746,17 +4738,17 @@ LIRGenerator::visitWasmReturnVoid(MWasmR
      add(new(alloc()) LWasmReturnVoid);
  }
  
@@ -13635,7 +13635,7 @@ diff --git a/js/src/jit/Lowering.cpp b/js/src/jit/Lowering.cpp
  }
  
  template <typename LClass>
-@@ -4864,227 +4856,16 @@ void
+@@ -4882,227 +4874,16 @@ void
  LIRGenerator::visitRecompileCheck(MRecompileCheck* ins)
  {
      LRecompileCheck* lir = new(alloc()) LRecompileCheck(temp());
@@ -16577,7 +16577,7 @@ diff --git a/js/src/jit/MIR.h b/js/src/jit/MIR.h
  // reference like `a.b.c` -- here, the `a.b` will create an ephemeral
  // derived type object that aliases the memory of `a` itself. The
  // specific nature of `a.b` is revealed by using
-@@ -10476,28 +9253,26 @@ enum MemoryBarrierRequirement
+@@ -10492,28 +9269,26 @@ enum MemoryBarrierRequirement
  
  // Load an unboxed scalar value from a typed array or other object.
  class MLoadUnboxedScalar
@@ -16606,7 +16606,7 @@ diff --git a/js/src/jit/MIR.h b/js/src/jit/MIR.h
          if (requiresBarrier_)
              setGuard();         // Not removable or movable
          else
-@@ -10507,23 +9282,16 @@ class MLoadUnboxedScalar
+@@ -10523,23 +9298,16 @@ class MLoadUnboxedScalar
          MOZ_ASSERT(storageType >= 0 && storageType < Scalar::MaxTypedArrayViewType);
      }
  
@@ -16630,7 +16630,7 @@ diff --git a/js/src/jit/MIR.h b/js/src/jit/MIR.h
          return storageType_;
      }
      bool fallible() const {
-@@ -10555,18 +9323,16 @@ class MLoadUnboxedScalar
+@@ -10571,18 +9339,16 @@ class MLoadUnboxedScalar
              return false;
          if (!ins->isLoadUnboxedScalar())
              return false;
@@ -16649,7 +16649,7 @@ diff --git a/js/src/jit/MIR.h b/js/src/jit/MIR.h
      }
  
  #ifdef JS_JITSPEW
-@@ -10634,17 +9400,17 @@ class MLoadTypedArrayElementHole
+@@ -10650,17 +9416,17 @@ class MLoadTypedArrayElementHole
  class StoreUnboxedScalarBase
  {
      Scalar::Type writeType_;
@@ -16668,7 +16668,7 @@ diff --git a/js/src/jit/MIR.h b/js/src/jit/MIR.h
      }
      Scalar::Type writeType() const {
          return writeType_;
-@@ -10660,19 +9426,16 @@ class StoreUnboxedScalarBase
+@@ -10676,19 +9442,16 @@ class StoreUnboxedScalarBase
                 writeType_ == Scalar::Uint16 ||
                 writeType_ == Scalar::Int32 ||
                 writeType_ == Scalar::Uint32;
@@ -16688,7 +16688,7 @@ diff --git a/js/src/jit/MIR.h b/js/src/jit/MIR.h
      public StoreUnboxedScalarBase,
      public StoreUnboxedScalarPolicy::Data
  {
-@@ -10685,52 +9448,42 @@ class MStoreUnboxedScalar
+@@ -10701,52 +9464,42 @@ class MStoreUnboxedScalar
    private:
      Scalar::Type storageType_;
  
@@ -16742,7 +16742,7 @@ diff --git a/js/src/jit/MIR.h b/js/src/jit/MIR.h
      }
      TruncateInputKind truncateInput() const {
          return truncateInput_;
-@@ -10768,18 +9521,16 @@ class MStoreTypedArrayElementHole
+@@ -10784,18 +9537,16 @@ class MStoreTypedArrayElementHole
      }
  
    public:
@@ -16761,7 +16761,7 @@ diff --git a/js/src/jit/MIR.h b/js/src/jit/MIR.h
      TruncateKind operandTruncateKind(size_t index) const override;
  
      bool canConsumeFloat32(MUse* use) const override {
-@@ -14546,17 +13297,16 @@ class MAsmJSMemoryAccess
+@@ -14562,17 +13313,16 @@ class MAsmJSMemoryAccess
  
    public:
      explicit MAsmJSMemoryAccess(Scalar::Type accessType)
@@ -16779,7 +16779,7 @@ diff --git a/js/src/jit/MIR.h b/js/src/jit/MIR.h
      unsigned byteSize() const { return TypedArrayElemSize(accessType()); }
      bool needsBoundsCheck() const { return needsBoundsCheck_; }
  
-@@ -14856,17 +13606,17 @@ class MWasmLoadGlobalVar
+@@ -14872,17 +13622,17 @@ class MWasmLoadGlobalVar
  {
      MWasmLoadGlobalVar(MIRType type, unsigned globalDataOffset, bool isConstant, bool isIndirect,
                         MDefinition* tlsPtr)
@@ -17080,7 +17080,7 @@ diff --git a/js/src/jit/MacroAssembler.cpp b/js/src/jit/MacroAssembler.cpp
  {
      switch (arrayType) {
        case Scalar::Int8:
-@@ -3452,51 +3367,16 @@ void
+@@ -3457,51 +3372,16 @@ void
  MacroAssembler::branchIfInlineTypedObject(Register obj, Register scratch, Label* label)
  {
      loadObjClassUnsafe(obj, scratch);
@@ -17135,7 +17135,7 @@ diff --git a/js/src/jit/MacroAssembler.cpp b/js/src/jit/MacroAssembler.cpp
 diff --git a/js/src/jit/MacroAssembler.h b/js/src/jit/MacroAssembler.h
 --- a/js/src/jit/MacroAssembler.h
 +++ b/js/src/jit/MacroAssembler.h
-@@ -1151,18 +1151,16 @@ class MacroAssembler : public MacroAssem
+@@ -1192,18 +1192,16 @@ class MacroAssembler : public MacroAssem
                                    Register scratch, Label* label);
      void branchIfObjGroupHasNoAddendum(Register obj, Register scratch, Label* label);
      void branchIfPretenuredGroup(const ObjectGroup* group, Register scratch, Label* label);
@@ -17154,7 +17154,7 @@ diff --git a/js/src/jit/MacroAssembler.h b/js/src/jit/MacroAssembler.h
                                               const void* handlerp, Label* label);
  
      void copyObjGroupNoPreBarrier(Register sourceObj, Register destObj, Register scratch);
-@@ -1369,19 +1367,16 @@ class MacroAssembler : public MacroAssem
+@@ -1410,19 +1408,16 @@ class MacroAssembler : public MacroAssem
      // ========================================================================
      // Canonicalization primitives.
      inline void canonicalizeDouble(FloatRegister reg);
@@ -17174,7 +17174,7 @@ diff --git a/js/src/jit/MacroAssembler.h b/js/src/jit/MacroAssembler.h
      inline void storeUncanonicalizedDouble(FloatRegister src, const BaseIndex& dest)
          DEFINED_ON(x86_shared, arm, arm64, mips32, mips64);
      inline void storeUncanonicalizedDouble(FloatRegister src, const Operand& dest)
-@@ -2146,17 +2141,17 @@ class MacroAssembler : public MacroAssem
+@@ -2187,17 +2182,17 @@ class MacroAssembler : public MacroAssem
          call(preBarrier);
          Pop(PreBarrierReg);
  
@@ -17193,7 +17193,7 @@ diff --git a/js/src/jit/MacroAssembler.h b/js/src/jit/MacroAssembler.h
      template<typename S, typename T>
      void storeToTypedIntArray(Scalar::Type arrayType, const S& value, const T& dest) {
          switch (arrayType) {
-@@ -2173,20 +2168,18 @@ class MacroAssembler : public MacroAssem
+@@ -2214,20 +2209,18 @@ class MacroAssembler : public MacroAssem
            case Scalar::Uint32:
              store32(value, dest);
              break;
@@ -18205,7 +18205,7 @@ diff --git a/js/src/jit/arm/MacroAssembler-arm.h b/js/src/jit/arm/MacroAssembler
 diff --git a/js/src/jit/arm64/CodeGenerator-arm64.cpp b/js/src/jit/arm64/CodeGenerator-arm64.cpp
 --- a/js/src/jit/arm64/CodeGenerator-arm64.cpp
 +++ b/js/src/jit/arm64/CodeGenerator-arm64.cpp
-@@ -685,76 +685,16 @@ CodeGenerator::visitAtomicExchangeTypedA
+@@ -843,76 +843,16 @@ CodeGenerator::visitAtomicExchangeTypedA
          masm.atomicExchangeJS(arrayType, Synchronization::Full(), dest, value, temp, output);
      } else {
          BaseIndex dest(elements, ToRegister(lir->index()), ScaleFromElemWidth(width));
@@ -18282,7 +18282,7 @@ diff --git a/js/src/jit/arm64/CodeGenerator-arm64.cpp b/js/src/jit/arm64/CodeGen
  void
  CodeGenerator::visitClzI64(LClzI64*)
  {
-@@ -847,22 +787,16 @@ CodeGenerator::visitPopcntI64(LPopcntI64
+@@ -1005,22 +945,16 @@ CodeGenerator::visitPopcntI64(LPopcntI64
  
  void
  CodeGenerator::visitRotateI64(LRotateI64*)
@@ -18305,7 +18305,7 @@ diff --git a/js/src/jit/arm64/CodeGenerator-arm64.cpp b/js/src/jit/arm64/CodeGen
  void
  CodeGenerator::visitCompareI64(LCompareI64*)
  {
-@@ -871,94 +805,40 @@ CodeGenerator::visitCompareI64(LCompareI
+@@ -1029,94 +963,40 @@ CodeGenerator::visitCompareI64(LCompareI
  
  void
  CodeGenerator::visitNearbyIntF(LNearbyIntF*)
@@ -18400,7 +18400,7 @@ diff --git a/js/src/jit/arm64/CodeGenerator-arm64.cpp b/js/src/jit/arm64/CodeGen
  void
  CodeGenerator::visitWasmAddOffset(LWasmAddOffset*)
  {
-@@ -997,154 +877,40 @@ CodeGenerator::visitTestI64AndBranch(LTe
+@@ -1155,154 +1035,40 @@ CodeGenerator::visitTestI64AndBranch(LTe
  
  void
  CodeGenerator::visitWrapInt64ToInt32(LWrapInt64ToInt32*)
@@ -18558,7 +18558,7 @@ diff --git a/js/src/jit/arm64/CodeGenerator-arm64.cpp b/js/src/jit/arm64/CodeGen
 diff --git a/js/src/jit/arm64/Lowering-arm64.cpp b/js/src/jit/arm64/Lowering-arm64.cpp
 --- a/js/src/jit/arm64/Lowering-arm64.cpp
 +++ b/js/src/jit/arm64/Lowering-arm64.cpp
-@@ -349,68 +349,8 @@ LIRGenerator::visitExtendInt32ToInt64(ME
+@@ -397,68 +397,8 @@ LIRGenerator::visitExtendInt32ToInt64(ME
      MOZ_CRASH("NYI");
  }
  
@@ -22045,7 +22045,7 @@ diff --git a/js/src/jit/x86-shared/Lowering-x86-shared.h b/js/src/jit/x86-shared
 diff --git a/js/src/jit/x86-shared/MacroAssembler-x86-shared-inl.h b/js/src/jit/x86-shared/MacroAssembler-x86-shared-inl.h
 --- a/js/src/jit/x86-shared/MacroAssembler-x86-shared-inl.h
 +++ b/js/src/jit/x86-shared/MacroAssembler-x86-shared-inl.h
-@@ -1098,39 +1098,16 @@ void
+@@ -1145,39 +1145,16 @@ void
  MacroAssembler::spectreZeroRegister(Condition cond, Register scratch, Register dest)
  {
      // Note: use movl instead of move32/xorl to ensure flags are not clobbered.
@@ -29744,7 +29744,7 @@ diff --git a/js/src/tests/non262/TypedObject/method_from.js b/js/src/tests/non26
 diff --git a/js/src/vm/ArrayBufferObject.cpp b/js/src/vm/ArrayBufferObject.cpp
 --- a/js/src/vm/ArrayBufferObject.cpp
 +++ b/js/src/vm/ArrayBufferObject.cpp
-@@ -926,18 +926,18 @@ ArrayBufferObject::prepareForAsmJS(JSCon
+@@ -923,18 +923,18 @@ ArrayBufferObject::prepareForAsmJS(JSCon
      if (buffer->forInlineTypedObject())
          return false;
  
@@ -29816,7 +29816,7 @@ diff --git a/js/src/vm/GlobalObject.h b/js/src/vm/GlobalObject.h
      }
  
      static JSFunction*
-@@ -776,20 +762,16 @@ class GlobalObject : public NativeObject
+@@ -777,20 +763,16 @@ class GlobalObject : public NativeObject
      static bool initModuleProto(JSContext* cx, Handle<GlobalObject*> global);
      static bool initImportEntryProto(JSContext* cx, Handle<GlobalObject*> global);
      static bool initExportEntryProto(JSContext* cx, Handle<GlobalObject*> global);
@@ -29884,7 +29884,7 @@ diff --git a/js/src/vm/SelfHosting.cpp b/js/src/vm/SelfHosting.cpp
  #include "gc/Marking.h"
  #include "gc/Policy.h"
  #include "jit/AtomicOperations.h"
-@@ -2409,29 +2408,16 @@ static const JSFunctionSpec intrinsic_fu
+@@ -2410,29 +2409,16 @@ static const JSFunctionSpec intrinsic_fu
      JS_FN("std_String_localeCompare",            str_localeCompare,            1,0),
  #else
      JS_FN("std_String_normalize",                str_normalize,                0,0),
@@ -29914,7 +29914,7 @@ diff --git a/js/src/vm/SelfHosting.cpp b/js/src/vm/SelfHosting.cpp
                      IntrinsicIsCrossRealmArrayConstructor),
      JS_INLINABLE_FN("ToInteger",     intrinsic_ToInteger,               1,0, IntrinsicToInteger),
      JS_INLINABLE_FN("ToString",      intrinsic_ToString,                1,0, IntrinsicToString),
-@@ -2619,17 +2605,16 @@ static const JSFunctionSpec intrinsic_fu
+@@ -2620,17 +2606,16 @@ static const JSFunctionSpec intrinsic_fu
      JS_FN("NewDerivedTypedObject",          js::NewDerivedTypedObject, 3, 0),
      JS_FN("TypedObjectBuffer",              TypedObject::GetBuffer, 1, 0),
      JS_FN("TypedObjectByteOffset",          TypedObject::GetByteOffset, 1, 0),
@@ -29935,7 +29935,7 @@ diff --git a/js/src/vm/SelfHosting.cpp b/js/src/vm/SelfHosting.cpp
 diff --git a/js/src/vm/TypedArrayObject.cpp b/js/src/vm/TypedArrayObject.cpp
 --- a/js/src/vm/TypedArrayObject.cpp
 +++ b/js/src/vm/TypedArrayObject.cpp
-@@ -1799,20 +1799,16 @@ TypedArrayObject::getElement(uint32_t in
+@@ -1797,20 +1797,16 @@ TypedArrayObject::getElement(uint32_t in
          return Uint32Array::getIndexValue(this, index);
        case Scalar::Float32:
          return Float32Array::getIndexValue(this, index);
@@ -29956,7 +29956,7 @@ diff --git a/js/src/vm/TypedArrayObject.cpp b/js/src/vm/TypedArrayObject.cpp
  }
  
  void
-@@ -1849,20 +1845,16 @@ TypedArrayObject::setElement(TypedArrayO
+@@ -1847,20 +1843,16 @@ TypedArrayObject::setElement(TypedArrayO
          return;
        case Scalar::Float32:
          Float32Array::setIndexValue(obj, index, d);

+ 151 - 127
frg/work-js/mozilla-release/patches/mozilla-central-push_428611.patch → frg/work-js/mozilla-release/patches/1416723-2-63a1.patchx

@@ -1,14 +1,59 @@
 # HG changeset patch
 # User Benjamin Bouvier <benj@benj.me>
 # Date 1532438101 -7200
-#      Tue Jul 24 15:15:01 2018 +0200
 # Node ID 4534ae540e86d686f29098cbcc2f932a6b83117b
-# Parent  3d7a2ff6821ff741268ba2f4fb27d682002bc788
+# Parent  7ee4f4b8eaeafdda95702c39cc1b07de2f2460d2
 Bug 1416723: Remove SIMD.js support; r=luke, r=nbp
 
-diff --git a/dom/serviceworkers/test/test_serviceworker_interfaces.js b/dom/serviceworkers/test/test_serviceworker_interfaces.js
---- a/dom/serviceworkers/test/test_serviceworker_interfaces.js
-+++ b/dom/serviceworkers/test/test_serviceworker_interfaces.js
+diff --git a/dom/serviceworkers/test/test_serviceworker_interfaces.js.1416723-2.later b/dom/serviceworkers/test/test_serviceworker_interfaces.js.1416723-2.later
+new file mode 100644
+--- /dev/null
++++ b/dom/serviceworkers/test/test_serviceworker_interfaces.js.1416723-2.later
+@@ -0,0 +1,20 @@
++--- test_serviceworker_interfaces.js
+++++ test_serviceworker_interfaces.js
++@@ -52,17 +52,16 @@ var ecmaGlobals =
++     "Proxy",
++     "RangeError",
++     {name: "ReadableStream", optional: true},
++     "ReferenceError",
++     "Reflect",
++     "RegExp",
++     "Set",
++     {name: "SharedArrayBuffer", disabled: true},
++-    {name: "SIMD", nightly: true},
++     "String",
++     "Symbol",
++     "SyntaxError",
++     {name: "TypedObject", nightly: true},
++     "TypeError",
++     "Uint16Array",
++     "Uint32Array",
++     "Uint8Array",
+diff --git a/dom/tests/mochitest/general/test_interfaces.js b/dom/tests/mochitest/general/test_interfaces.js
+--- a/dom/tests/mochitest/general/test_interfaces.js
++++ b/dom/tests/mochitest/general/test_interfaces.js
+@@ -57,17 +57,16 @@ var ecmaGlobals =
+     "Proxy",
+     "RangeError",
+     {name: "ReadableStream", disabled: true},
+     "ReferenceError",
+     "Reflect",
+     "RegExp",
+     "Set",
+     {name: "SharedArrayBuffer", disabled: true},
+-    {name: "SIMD", nightly: true},
+     "String",
+     "Symbol",
+     "SyntaxError",
+     {name: "TypedObject", nightly: true},
+     "TypeError",
+     "Uint16Array",
+     "Uint32Array",
+     "Uint8Array",
+diff --git a/dom/workers/test/serviceworkers/test_serviceworker_interfaces.js b/dom/workers/test/serviceworkers/test_serviceworker_interfaces.js
+--- a/dom/workers/test/serviceworkers/test_serviceworker_interfaces.js
++++ b/dom/workers/test/serviceworkers/test_serviceworker_interfaces.js
 @@ -52,17 +52,16 @@ var ecmaGlobals =
      "Proxy",
      "RangeError",
@@ -27,48 +72,27 @@ diff --git a/dom/serviceworkers/test/test_serviceworker_interfaces.js b/dom/serv
      "Uint16Array",
      "Uint32Array",
      "Uint8Array",
-diff --git a/dom/tests/mochitest/general/test_interfaces.js b/dom/tests/mochitest/general/test_interfaces.js
---- a/dom/tests/mochitest/general/test_interfaces.js
-+++ b/dom/tests/mochitest/general/test_interfaces.js
-@@ -73,17 +73,16 @@ var ecmaGlobals =
-     {name: "Proxy", insecureContext: true},
-     {name: "RangeError", insecureContext: true},
-     {name: "ReadableStream", insecureContext: true, disabled: true},
-     {name: "ReferenceError", insecureContext: true},
-     {name: "Reflect", insecureContext: true},
-     {name: "RegExp", insecureContext: true},
-     {name: "Set", insecureContext: true},
-     {name: "SharedArrayBuffer", insecureContext: true, disabled: true},
--    {name: "SIMD", insecureContext: true, nightly: true},
-     {name: "String", insecureContext: true},
-     {name: "Symbol", insecureContext: true},
-     {name: "SyntaxError", insecureContext: true},
-     {name: "TypedObject", insecureContext: true, nightly: true},
-     {name: "TypeError", insecureContext: true},
-     {name: "Uint16Array", insecureContext: true},
-     {name: "Uint32Array", insecureContext: true},
-     {name: "Uint8Array", insecureContext: true},
 diff --git a/dom/workers/test/test_worker_interfaces.js b/dom/workers/test/test_worker_interfaces.js
 --- a/dom/workers/test/test_worker_interfaces.js
 +++ b/dom/workers/test/test_worker_interfaces.js
-@@ -58,17 +58,16 @@ var ecmaGlobals =
-     {name: "Proxy", insecureContext: true},
-     {name: "RangeError", insecureContext: true},
-     {name: "ReadableStream", insecureContext: true, disabled: true},
-     {name: "ReferenceError", insecureContext: true},
-     {name: "Reflect", insecureContext: true},
-     {name: "RegExp", insecureContext: true},
-     {name: "Set", insecureContext: true},
-     {name: "SharedArrayBuffer", insecureContext: true, disabled: true},
--    {name: "SIMD", insecureContext: true, nightly: true},
-     {name: "String", insecureContext: true},
-     {name: "Symbol", insecureContext: true},
-     {name: "SyntaxError", insecureContext: true},
-     {name: "TypedObject", insecureContext: true, nightly: true},
-     {name: "TypeError", insecureContext: true},
-     {name: "Uint16Array", insecureContext: true},
-     {name: "Uint32Array", insecureContext: true},
-     {name: "Uint8Array", insecureContext: true},
+@@ -52,17 +52,16 @@ var ecmaGlobals =
+     "Proxy",
+     "RangeError",
+     {name: "ReadableStream", disabled: true},
+     "ReferenceError",
+     "Reflect",
+     "RegExp",
+     "Set",
+     {name: "SharedArrayBuffer", disabled: true},
+-    {name: "SIMD", nightly: true},
+     "String",
+     "Symbol",
+     "SyntaxError",
+     {name: "TypedObject", nightly: true},
+     "TypeError",
+     "Uint16Array",
+     "Uint32Array",
+     "Uint8Array",
 diff --git a/js/public/ProtoKey.h b/js/public/ProtoKey.h
 --- a/js/public/ProtoKey.h
 +++ b/js/public/ProtoKey.h
@@ -3014,7 +3038,7 @@ deleted file mode 100644
 diff --git a/js/src/builtin/TestingFunctions.cpp b/js/src/builtin/TestingFunctions.cpp
 --- a/js/src/builtin/TestingFunctions.cpp
 +++ b/js/src/builtin/TestingFunctions.cpp
-@@ -3975,22 +3975,17 @@ ShellCloneAndExecuteScript(JSContext* cx
+@@ -3976,22 +3976,17 @@ ShellCloneAndExecuteScript(JSContext* cx
      args.rval().setUndefined();
      return true;
  }
@@ -3162,7 +3186,7 @@ diff --git a/js/src/builtin/TypedObject.cpp b/js/src/builtin/TypedObject.cpp
   *
   *   var A = new TypedObject.ArrayType(uint8, 10);
   *   var S = new TypedObject.StructType({...});
-@@ -1661,17 +1608,16 @@ OutlineTypedObject::obj_trace(JSTracer* 
+@@ -1659,17 +1606,16 @@ OutlineTypedObject::obj_trace(JSTracer* 
  }
  
  bool
@@ -3180,7 +3204,7 @@ diff --git a/js/src/builtin/TypedObject.cpp b/js/src/builtin/TypedObject.cpp
          return IdIsIndex(id, &index) || JSID_IS_ATOM(id, names.length);
        }
  
-@@ -1734,17 +1680,16 @@ TypedObject::obj_defineProperty(JSContex
+@@ -1732,17 +1678,16 @@ TypedObject::obj_defineProperty(JSContex
  
  bool
  TypedObject::obj_hasProperty(JSContext* cx, HandleObject obj, HandleId id, bool* foundp)
@@ -3198,7 +3222,7 @@ diff --git a/js/src/builtin/TypedObject.cpp b/js/src/builtin/TypedObject.cpp
              return true;
          }
          uint32_t index;
-@@ -1786,19 +1731,16 @@ TypedObject::obj_getProperty(JSContext* 
+@@ -1784,19 +1729,16 @@ TypedObject::obj_getProperty(JSContext* 
  
      // Handle everything else here:
  
@@ -3218,7 +3242,7 @@ diff --git a/js/src/builtin/TypedObject.cpp b/js/src/builtin/TypedObject.cpp
                  return false;
              }
  
-@@ -1835,17 +1777,16 @@ TypedObject::obj_getElement(JSContext* c
+@@ -1833,17 +1775,16 @@ TypedObject::obj_getElement(JSContext* c
  {
      MOZ_ASSERT(obj->is<TypedObject>());
      Rooted<TypedObject*> typedObj(cx, &obj->as<TypedObject>());
@@ -3236,7 +3260,7 @@ diff --git a/js/src/builtin/TypedObject.cpp b/js/src/builtin/TypedObject.cpp
      }
  
      RootedObject proto(cx, obj->staticPrototype());
-@@ -1881,19 +1822,16 @@ TypedObject::obj_setProperty(JSContext* 
+@@ -1879,19 +1820,16 @@ TypedObject::obj_setProperty(JSContext* 
  {
      Rooted<TypedObject*> typedObj(cx, &obj->as<TypedObject>());
  
@@ -3256,7 +3280,7 @@ diff --git a/js/src/builtin/TypedObject.cpp b/js/src/builtin/TypedObject.cpp
                  return false;
              }
              return result.failReadOnly();
-@@ -1951,17 +1889,16 @@ TypedObject::obj_getOwnPropertyDescripto
+@@ -1949,17 +1887,16 @@ TypedObject::obj_getOwnPropertyDescripto
          JS_ReportErrorNumberASCII(cx, GetErrorMessage, nullptr, JSMSG_TYPEDOBJECT_HANDLE_UNATTACHED);
          return false;
      }
@@ -3274,7 +3298,7 @@ diff --git a/js/src/builtin/TypedObject.cpp b/js/src/builtin/TypedObject.cpp
          if (IdIsIndex(id, &index)) {
              if (!obj_getArrayElement(cx, typedObj, descr, index, desc.value()))
                  return false;
-@@ -2005,17 +1942,16 @@ TypedObject::obj_getOwnPropertyDescripto
+@@ -2003,17 +1940,16 @@ TypedObject::obj_getOwnPropertyDescripto
  static bool
  IsOwnId(JSContext* cx, HandleObject obj, HandleId id)
  {
@@ -3292,7 +3316,7 @@ diff --git a/js/src/builtin/TypedObject.cpp b/js/src/builtin/TypedObject.cpp
        case type::Struct:
          size_t index;
          if (typedObj->typeDescr().as<StructTypeDescr>().fieldIndex(id, &index))
-@@ -2044,18 +1980,17 @@ TypedObject::obj_newEnumerate(JSContext*
+@@ -2042,18 +1978,17 @@ TypedObject::obj_newEnumerate(JSContext*
  {
      MOZ_ASSERT(obj->is<TypedObject>());
      Rooted<TypedObject*> typedObj(cx, &obj->as<TypedObject>());
@@ -3312,7 +3336,7 @@ diff --git a/js/src/builtin/TypedObject.cpp b/js/src/builtin/TypedObject.cpp
          if (!properties.reserve(typedObj->length()))
              return false;
  
-@@ -2530,32 +2465,16 @@ js::GetTypedObjectModule(JSContext* cx, 
+@@ -2528,32 +2463,16 @@ js::GetTypedObjectModule(JSContext* cx, 
  {
      CallArgs args = CallArgsFromVp(argc, vp);
      Rooted<GlobalObject*> global(cx, cx->global());
@@ -3345,7 +3369,7 @@ diff --git a/js/src/builtin/TypedObject.cpp b/js/src/builtin/TypedObject.cpp
      MOZ_ASSERT(args.length() == 3);                                             \
      MOZ_ASSERT(args[0].isObject() && args[0].toObject().is<TypedObject>());     \
      MOZ_ASSERT(args[1].isInt32());                                              \
-@@ -2736,17 +2655,16 @@ visitReferences(TypeDescr& descr,
+@@ -2734,17 +2653,16 @@ visitReferences(TypeDescr& descr,
                  uint8_t* mem,
                  V& visitor)
  {
@@ -12015,7 +12039,7 @@ diff --git a/js/src/jit-test/tests/asm.js/testZOOB.js b/js/src/jit-test/tests/as
 diff --git a/js/src/jit/BaselineBailouts.cpp b/js/src/jit/BaselineBailouts.cpp
 --- a/js/src/jit/BaselineBailouts.cpp
 +++ b/js/src/jit/BaselineBailouts.cpp
-@@ -2007,17 +2007,16 @@ jit::FinishBailoutToBaseline(BaselineBai
+@@ -2004,17 +2004,16 @@ jit::FinishBailoutToBaseline(BaselineBai
        case Bailout_Hole:
        case Bailout_NegativeIndex:
        case Bailout_NonInt32Input:
@@ -12241,7 +12265,7 @@ diff --git a/js/src/jit/BaselineInspector.h b/js/src/jit/BaselineInspector.h
 diff --git a/js/src/jit/CodeGenerator.cpp b/js/src/jit/CodeGenerator.cpp
 --- a/js/src/jit/CodeGenerator.cpp
 +++ b/js/src/jit/CodeGenerator.cpp
-@@ -417,17 +417,16 @@ MNewStringObject::templateObj() const
+@@ -394,17 +394,16 @@ MNewStringObject::templateObj() const
  {
      return &templateObj_->as<StringObject>();
  }
@@ -12259,7 +12283,7 @@ diff --git a/js/src/jit/CodeGenerator.cpp b/js/src/jit/CodeGenerator.cpp
  {
      js_delete(scriptCounts_);
  }
-@@ -6422,92 +6421,16 @@ CodeGenerator::visitNewTypedObject(LNewT
+@@ -6387,92 +6386,16 @@ CodeGenerator::visitNewTypedObject(LNewT
                                     StoreRegisterTo(object));
  
      TemplateObject templateObj(templateObject);
@@ -12352,7 +12376,7 @@ diff --git a/js/src/jit/CodeGenerator.cpp b/js/src/jit/CodeGenerator.cpp
  void
  CodeGenerator::visitNewNamedLambdaObject(LNewNamedLambdaObject* lir)
  {
-@@ -7228,17 +7151,17 @@ CodeGenerator::visitWasmCallI64(LWasmCal
+@@ -7193,17 +7116,17 @@ CodeGenerator::visitWasmCallI64(LWasmCal
  }
  
  void
@@ -12371,7 +12395,7 @@ diff --git a/js/src/jit/CodeGenerator.cpp b/js/src/jit/CodeGenerator.cpp
          masm.loadPtr(addr, tmp);
          addr = Address(tmp, 0);
      }
-@@ -7255,33 +7178,29 @@ CodeGenerator::visitWasmLoadGlobalVar(LW
+@@ -7220,33 +7143,29 @@ CodeGenerator::visitWasmLoadGlobalVar(LW
        // Aligned access: code is aligned on PageSize + there is padding
        // before the global data section.
        case MIRType::Int8x16:
@@ -12406,7 +12430,7 @@ diff --git a/js/src/jit/CodeGenerator.cpp b/js/src/jit/CodeGenerator.cpp
          masm.loadPtr(addr, tmp);
          addr = Address(tmp, 0);
      }
-@@ -7298,21 +7217,17 @@ CodeGenerator::visitWasmStoreGlobalVar(L
+@@ -7263,21 +7182,17 @@ CodeGenerator::visitWasmStoreGlobalVar(L
        // Aligned access: code is aligned on PageSize + there is padding
        // before the global data section.
        case MIRType::Int8x16:
@@ -12428,7 +12452,7 @@ diff --git a/js/src/jit/CodeGenerator.cpp b/js/src/jit/CodeGenerator.cpp
  void
  CodeGenerator::visitWasmLoadGlobalVarI64(LWasmLoadGlobalVarI64* ins)
  {
-@@ -10357,17 +10272,16 @@ CodeGenerator::link(JSContext* cx, Compi
+@@ -10323,17 +10238,16 @@ CodeGenerator::link(JSContext* cx, Compi
  
      RootedScript script(cx, gen->info().script());
      OptimizationLevel optimizationLevel = gen->optimizationInfo().level();
@@ -12446,7 +12470,7 @@ diff --git a/js/src/jit/CodeGenerator.cpp b/js/src/jit/CodeGenerator.cpp
          // Do a normal invalidate, except don't cancel offThread compilations,
          // since that will cancel this compilation too.
          Invalidate(cx, script, /* resetUses */ false, /* cancelOffThread*/ false);
-@@ -11581,29 +11495,27 @@ CodeGenerator::visitLoadUnboxedScalar(LL
+@@ -11547,29 +11461,27 @@ CodeGenerator::visitLoadUnboxedScalar(LL
  {
      Register elements = ToRegister(lir->elements());
      Register temp = lir->temp()->isBogusTemp() ? InvalidReg : ToRegister(lir->temp());
@@ -12478,7 +12502,7 @@ diff --git a/js/src/jit/CodeGenerator.cpp b/js/src/jit/CodeGenerator.cpp
  
  void
  CodeGenerator::visitLoadTypedArrayElementHole(LLoadTypedArrayElementHole* lir)
-@@ -11872,23 +11784,20 @@ CodeGenerator::visitLoadElementFromState
+@@ -11838,23 +11750,20 @@ CodeGenerator::visitLoadElementFromState
  
      addOutOfLineCode(jumpTable, lir->mir());
      masm.bind(&join);
@@ -12506,7 +12530,7 @@ diff --git a/js/src/jit/CodeGenerator.cpp b/js/src/jit/CodeGenerator.cpp
      }
  }
  
-@@ -11896,27 +11805,26 @@ void
+@@ -11862,27 +11771,26 @@ void
  CodeGenerator::visitStoreUnboxedScalar(LStoreUnboxedScalar* lir)
  {
      Register elements = ToRegister(lir->elements());
@@ -12740,7 +12764,7 @@ deleted file mode 100644
 diff --git a/js/src/jit/InlinableNatives.h b/js/src/jit/InlinableNatives.h
 --- a/js/src/jit/InlinableNatives.h
 +++ b/js/src/jit/InlinableNatives.h
-@@ -92,27 +92,16 @@
+@@ -93,27 +93,16 @@
      _(IntrinsicStringReplaceString) \
      _(IntrinsicStringSplitString)   \
                                      \
@@ -12870,7 +12894,7 @@ diff --git a/js/src/jit/Ion.cpp b/js/src/jit/Ion.cpp
 diff --git a/js/src/jit/IonBuilder.cpp b/js/src/jit/IonBuilder.cpp
 --- a/js/src/jit/IonBuilder.cpp
 +++ b/js/src/jit/IonBuilder.cpp
-@@ -7897,21 +7897,16 @@ IonBuilder::getElemTryTypedObject(bool* 
+@@ -7877,21 +7877,16 @@ IonBuilder::getElemTryTypedObject(bool* 
      if (elemPrediction.isUseless())
          return Ok();
  
@@ -12892,7 +12916,7 @@ diff --git a/js/src/jit/IonBuilder.cpp b/js/src/jit/IonBuilder.cpp
                                                    objPrediction,
                                                    elemPrediction,
                                                    elemSize);
-@@ -8959,21 +8954,16 @@ IonBuilder::setElemTryTypedObject(bool* 
+@@ -8939,21 +8934,16 @@ IonBuilder::setElemTryTypedObject(bool* 
      if (elemPrediction.isUseless())
          return Ok();
  
@@ -12914,7 +12938,7 @@ diff --git a/js/src/jit/IonBuilder.cpp b/js/src/jit/IonBuilder.cpp
          return setElemTryScalarElemOfTypedObject(emitted,
                                                   obj,
                                                   index,
-@@ -10591,20 +10581,16 @@ IonBuilder::getPropTryTypedObject(bool* 
+@@ -10571,20 +10561,16 @@ IonBuilder::getPropTryTypedObject(bool* 
  {
      TypedObjectPrediction fieldPrediction;
      size_t fieldOffset;
@@ -12935,7 +12959,7 @@ diff --git a/js/src/jit/IonBuilder.cpp b/js/src/jit/IonBuilder.cpp
                                                    fieldPrediction,
                                                    fieldIndex);
  
-@@ -11737,20 +11723,16 @@ IonBuilder::setPropTryTypedObject(bool* 
+@@ -11717,20 +11703,16 @@ IonBuilder::setPropTryTypedObject(bool* 
  {
      TypedObjectPrediction fieldPrediction;
      size_t fieldOffset;
@@ -12959,7 +12983,7 @@ diff --git a/js/src/jit/IonBuilder.cpp b/js/src/jit/IonBuilder.cpp
 diff --git a/js/src/jit/IonBuilder.h b/js/src/jit/IonBuilder.h
 --- a/js/src/jit/IonBuilder.h
 +++ b/js/src/jit/IonBuilder.h
-@@ -725,61 +725,16 @@ class IonBuilder
+@@ -726,61 +726,16 @@ class IonBuilder
      InliningResult inlinePossiblyWrappedTypedArrayLength(CallInfo& callInfo);
      InliningResult inlineSetDisjointTypedElements(CallInfo& callInfo);
  
@@ -13341,7 +13365,7 @@ diff --git a/js/src/jit/IonTypes.h b/js/src/jit/IonTypes.h
 diff --git a/js/src/jit/JSJitFrameIter.h b/js/src/jit/JSJitFrameIter.h
 --- a/js/src/jit/JSJitFrameIter.h
 +++ b/js/src/jit/JSJitFrameIter.h
-@@ -402,19 +402,17 @@ struct MaybeReadFallback
+@@ -403,19 +403,17 @@ struct MaybeReadFallback
  
      NoGCValue noGCPlaceholder(const Value& v) const {
          if (v.isMagic(JS_OPTIMIZED_OUT))
@@ -13361,7 +13385,7 @@ diff --git a/js/src/jit/JSJitFrameIter.h b/js/src/jit/JSJitFrameIter.h
    protected:
      SnapshotReader snapshot_;
      RecoverReader recover_;
-@@ -466,17 +464,16 @@ class SnapshotIterator
+@@ -467,17 +465,16 @@ class SnapshotIterator
      Value fromInstructionResult(uint32_t index) const;
  
      Value allocationValue(const RValueAllocation& a, ReadMethod rm = RM_Normal);
@@ -13426,7 +13450,7 @@ diff --git a/js/src/jit/JitOptions.h b/js/src/jit/JitOptions.h
 diff --git a/js/src/jit/JitRealm.h b/js/src/jit/JitRealm.h
 --- a/js/src/jit/JitRealm.h
 +++ b/js/src/jit/JitRealm.h
-@@ -502,49 +502,28 @@ class JitRealm
+@@ -500,49 +500,28 @@ class JitRealm
          RegExpMatcher,
          RegExpSearcher,
          RegExpTester,
@@ -13476,7 +13500,7 @@ diff --git a/js/src/jit/JitRealm.h b/js/src/jit/JitRealm.h
      }
      MOZ_MUST_USE bool putStubCode(JSContext* cx, uint32_t key, Handle<JitCode*> stubCode) {
          MOZ_ASSERT(stubCode);
-@@ -615,25 +594,23 @@ class JitRealm
+@@ -613,25 +592,23 @@ class JitRealm
  
      MOZ_MUST_USE bool ensureRegExpTesterStubExists(JSContext* cx) {
          if (stubs_[RegExpTester])
@@ -13510,7 +13534,7 @@ diff --git a/js/src/jit/JitRealm.h b/js/src/jit/JitRealm.h
 diff --git a/js/src/jit/Lowering.cpp b/js/src/jit/Lowering.cpp
 --- a/js/src/jit/Lowering.cpp
 +++ b/js/src/jit/Lowering.cpp
-@@ -3684,18 +3684,17 @@ void
+@@ -3666,18 +3666,17 @@ void
  LIRGenerator::visitLoadUnboxedScalar(MLoadUnboxedScalar* ins)
  {
      MOZ_ASSERT(IsValidElementsType(ins->elements(), ins->offsetAdjustment()));
@@ -13530,7 +13554,7 @@ diff --git a/js/src/jit/Lowering.cpp b/js/src/jit/Lowering.cpp
  
      Synchronization sync = Synchronization::Load();
      if (ins->requiresMemoryBarrier()) {
-@@ -3766,22 +3765,17 @@ LIRGenerator::visitLoadTypedArrayElement
+@@ -3748,22 +3747,17 @@ LIRGenerator::visitLoadTypedArrayElement
  }
  
  void
@@ -13554,7 +13578,7 @@ diff --git a/js/src/jit/Lowering.cpp b/js/src/jit/Lowering.cpp
  
      LUse elements = useRegister(ins->elements());
      LAllocation index = useRegisterOrConstant(ins->index());
-@@ -4705,17 +4699,17 @@ LIRGenerator::visitWasmParameter(MWasmPa
+@@ -4687,17 +4681,17 @@ LIRGenerator::visitWasmParameter(MWasmPa
  #if defined(JS_NUNBOX32)
              LInt64Allocation(LArgument(abi.offsetFromArgBase() + INT64HIGH_OFFSET),
                               LArgument(abi.offsetFromArgBase() + INT64LOW_OFFSET))
@@ -13573,7 +13597,7 @@ diff --git a/js/src/jit/Lowering.cpp b/js/src/jit/Lowering.cpp
  LIRGenerator::visitWasmReturn(MWasmReturn* ins)
  {
      MDefinition* rval = ins->getOperand(0);
-@@ -4725,18 +4719,16 @@ LIRGenerator::visitWasmReturn(MWasmRetur
+@@ -4707,18 +4701,16 @@ LIRGenerator::visitWasmReturn(MWasmRetur
          return;
      }
  
@@ -13592,7 +13616,7 @@ diff --git a/js/src/jit/Lowering.cpp b/js/src/jit/Lowering.cpp
      add(lir);
  }
  
-@@ -4746,17 +4738,17 @@ LIRGenerator::visitWasmReturnVoid(MWasmR
+@@ -4728,17 +4720,17 @@ LIRGenerator::visitWasmReturnVoid(MWasmR
      add(new(alloc()) LWasmReturnVoid);
  }
  
@@ -13611,7 +13635,7 @@ diff --git a/js/src/jit/Lowering.cpp b/js/src/jit/Lowering.cpp
  }
  
  template <typename LClass>
-@@ -4882,227 +4874,16 @@ void
+@@ -4864,227 +4856,16 @@ void
  LIRGenerator::visitRecompileCheck(MRecompileCheck* ins)
  {
      LRecompileCheck* lir = new(alloc()) LRecompileCheck(temp());
@@ -13860,7 +13884,7 @@ diff --git a/js/src/jit/MCallOptimize.cpp b/js/src/jit/MCallOptimize.cpp
  #include "jit/IonBuilder.h"
  #include "jit/Lowering.h"
  #include "jit/MIR.h"
-@@ -258,38 +257,16 @@ IonBuilder::inlineNativeCall(CallInfo& c
+@@ -260,38 +259,16 @@ IonBuilder::inlineNativeCall(CallInfo& c
          return inlineObject(callInfo);
        case InlinableNative::ObjectCreate:
          return inlineObjectCreate(callInfo);
@@ -13899,7 +13923,7 @@ diff --git a/js/src/jit/MCallOptimize.cpp b/js/src/jit/MCallOptimize.cpp
        case InlinableNative::TestAssertRecoveredOnBailout:
          return inlineAssertRecoveredOnBailout(callInfo);
  
-@@ -474,19 +451,16 @@ IonBuilder::inlineNonFunctionCall(CallIn
+@@ -476,19 +453,16 @@ IonBuilder::inlineNonFunctionCall(CallIn
      if (callInfo.constructing() && callInfo.getNewTarget() != callInfo.fun()) {
          trackOptimizationOutcome(TrackedOutcome::CantInlineUnexpectedNewTarget);
          return InliningStatus_NotInlined;
@@ -13919,7 +13943,7 @@ diff --git a/js/src/jit/MCallOptimize.cpp b/js/src/jit/MCallOptimize.cpp
  {
      return bytecodeTypes(pc);
  }
-@@ -3792,775 +3766,15 @@ IonBuilder::inlineConstructTypedObject(C
+@@ -3832,775 +3806,15 @@ IonBuilder::inlineConstructTypedObject(C
      MNewTypedObject* ins = MNewTypedObject::New(alloc(), constraints(), templateObject,
                                                  templateObject->group()->initialHeap(constraints()));
      current->add(ins);
@@ -16553,7 +16577,7 @@ diff --git a/js/src/jit/MIR.h b/js/src/jit/MIR.h
  // reference like `a.b.c` -- here, the `a.b` will create an ephemeral
  // derived type object that aliases the memory of `a` itself. The
  // specific nature of `a.b` is revealed by using
-@@ -10510,28 +9287,26 @@ enum MemoryBarrierRequirement
+@@ -10476,28 +9253,26 @@ enum MemoryBarrierRequirement
  
  // Load an unboxed scalar value from a typed array or other object.
  class MLoadUnboxedScalar
@@ -16582,7 +16606,7 @@ diff --git a/js/src/jit/MIR.h b/js/src/jit/MIR.h
          if (requiresBarrier_)
              setGuard();         // Not removable or movable
          else
-@@ -10541,23 +9316,16 @@ class MLoadUnboxedScalar
+@@ -10507,23 +9282,16 @@ class MLoadUnboxedScalar
          MOZ_ASSERT(storageType >= 0 && storageType < Scalar::MaxTypedArrayViewType);
      }
  
@@ -16606,7 +16630,7 @@ diff --git a/js/src/jit/MIR.h b/js/src/jit/MIR.h
          return storageType_;
      }
      bool fallible() const {
-@@ -10589,18 +9357,16 @@ class MLoadUnboxedScalar
+@@ -10555,18 +9323,16 @@ class MLoadUnboxedScalar
              return false;
          if (!ins->isLoadUnboxedScalar())
              return false;
@@ -16625,7 +16649,7 @@ diff --git a/js/src/jit/MIR.h b/js/src/jit/MIR.h
      }
  
  #ifdef JS_JITSPEW
-@@ -10668,17 +9434,17 @@ class MLoadTypedArrayElementHole
+@@ -10634,17 +9400,17 @@ class MLoadTypedArrayElementHole
  class StoreUnboxedScalarBase
  {
      Scalar::Type writeType_;
@@ -16644,7 +16668,7 @@ diff --git a/js/src/jit/MIR.h b/js/src/jit/MIR.h
      }
      Scalar::Type writeType() const {
          return writeType_;
-@@ -10694,19 +9460,16 @@ class StoreUnboxedScalarBase
+@@ -10660,19 +9426,16 @@ class StoreUnboxedScalarBase
                 writeType_ == Scalar::Uint16 ||
                 writeType_ == Scalar::Int32 ||
                 writeType_ == Scalar::Uint32;
@@ -16664,7 +16688,7 @@ diff --git a/js/src/jit/MIR.h b/js/src/jit/MIR.h
      public StoreUnboxedScalarBase,
      public StoreUnboxedScalarPolicy::Data
  {
-@@ -10719,52 +9482,42 @@ class MStoreUnboxedScalar
+@@ -10685,52 +9448,42 @@ class MStoreUnboxedScalar
    private:
      Scalar::Type storageType_;
  
@@ -16718,7 +16742,7 @@ diff --git a/js/src/jit/MIR.h b/js/src/jit/MIR.h
      }
      TruncateInputKind truncateInput() const {
          return truncateInput_;
-@@ -10802,18 +9555,16 @@ class MStoreTypedArrayElementHole
+@@ -10768,18 +9521,16 @@ class MStoreTypedArrayElementHole
      }
  
    public:
@@ -16737,7 +16761,7 @@ diff --git a/js/src/jit/MIR.h b/js/src/jit/MIR.h
      TruncateKind operandTruncateKind(size_t index) const override;
  
      bool canConsumeFloat32(MUse* use) const override {
-@@ -14578,17 +13329,16 @@ class MAsmJSMemoryAccess
+@@ -14546,17 +13297,16 @@ class MAsmJSMemoryAccess
  
    public:
      explicit MAsmJSMemoryAccess(Scalar::Type accessType)
@@ -16755,7 +16779,7 @@ diff --git a/js/src/jit/MIR.h b/js/src/jit/MIR.h
      unsigned byteSize() const { return TypedArrayElemSize(accessType()); }
      bool needsBoundsCheck() const { return needsBoundsCheck_; }
  
-@@ -14888,17 +13638,17 @@ class MWasmLoadGlobalVar
+@@ -14856,17 +13606,17 @@ class MWasmLoadGlobalVar
  {
      MWasmLoadGlobalVar(MIRType type, unsigned globalDataOffset, bool isConstant, bool isIndirect,
                         MDefinition* tlsPtr)
@@ -16798,11 +16822,11 @@ diff --git a/js/src/jit/MIRGenerator.h b/js/src/jit/MIRGenerator.h
  
      // When aborting with AbortReason::PreliminaryObjects, all groups with
      // preliminary objects which haven't been analyzed yet.
-@@ -186,18 +182,16 @@ class MIRGenerator
+@@ -185,18 +181,16 @@ class MIRGenerator
+     MIRGraph* graph_;
      AbortReasonOr<Ok> offThreadStatus_;
      ObjectGroupVector abortedPreliminaryGroups_;
-     mozilla::Atomic<bool, mozilla::Relaxed,
-                     mozilla::recordreplay::Behavior::DontPreserve> cancelBuild_;
+     mozilla::Atomic<bool, mozilla::Relaxed> cancelBuild_;
  
      uint32_t wasmMaxStackArgBytes_;
      bool needsOverrecursedCheck_;
@@ -16883,9 +16907,9 @@ diff --git a/js/src/jit/MIRGraph.cpp b/js/src/jit/MIRGraph.cpp
 diff --git a/js/src/jit/MacroAssembler.cpp b/js/src/jit/MacroAssembler.cpp
 --- a/js/src/jit/MacroAssembler.cpp
 +++ b/js/src/jit/MacroAssembler.cpp
-@@ -335,90 +335,47 @@ template void MacroAssembler::guardTypeS
+@@ -401,90 +401,47 @@ template void MacroAssembler::guardTypeS
                                             Label* miss);
- template void MacroAssembler::guardTypeSet(const TypedOrValueRegister& value, const TypeSet* types,
+ template void MacroAssembler::guardTypeSet(const ValueOperand& value, const TypeSet* types,
                                             BarrierKind kind, Register unboxScratch,
                                             Register objScratch, Register spectreRegToZero,
                                             Label* miss);
@@ -16980,7 +17004,7 @@ diff --git a/js/src/jit/MacroAssembler.cpp b/js/src/jit/MacroAssembler.cpp
        case Scalar::Uint8:
        case Scalar::Uint8Clamped:
          load8ZeroExtend(src, dest.gpr());
-@@ -449,69 +406,27 @@ MacroAssembler::loadFromTypedArray(Scala
+@@ -515,69 +472,27 @@ MacroAssembler::loadFromTypedArray(Scala
          loadFloat32(src, dest.fpu());
          canonicalizeFloat(dest.fpu());
          break;
@@ -17056,7 +17080,7 @@ diff --git a/js/src/jit/MacroAssembler.cpp b/js/src/jit/MacroAssembler.cpp
  {
      switch (arrayType) {
        case Scalar::Int8:
-@@ -3391,51 +3306,16 @@ void
+@@ -3452,51 +3367,16 @@ void
  MacroAssembler::branchIfInlineTypedObject(Register obj, Register scratch, Label* label)
  {
      loadObjClassUnsafe(obj, scratch);
@@ -17111,7 +17135,7 @@ diff --git a/js/src/jit/MacroAssembler.cpp b/js/src/jit/MacroAssembler.cpp
 diff --git a/js/src/jit/MacroAssembler.h b/js/src/jit/MacroAssembler.h
 --- a/js/src/jit/MacroAssembler.h
 +++ b/js/src/jit/MacroAssembler.h
-@@ -1192,18 +1192,16 @@ class MacroAssembler : public MacroAssem
+@@ -1151,18 +1151,16 @@ class MacroAssembler : public MacroAssem
                                    Register scratch, Label* label);
      void branchIfObjGroupHasNoAddendum(Register obj, Register scratch, Label* label);
      void branchIfPretenuredGroup(const ObjectGroup* group, Register scratch, Label* label);
@@ -17130,7 +17154,7 @@ diff --git a/js/src/jit/MacroAssembler.h b/js/src/jit/MacroAssembler.h
                                               const void* handlerp, Label* label);
  
      void copyObjGroupNoPreBarrier(Register sourceObj, Register destObj, Register scratch);
-@@ -1410,19 +1408,16 @@ class MacroAssembler : public MacroAssem
+@@ -1369,19 +1367,16 @@ class MacroAssembler : public MacroAssem
      // ========================================================================
      // Canonicalization primitives.
      inline void canonicalizeDouble(FloatRegister reg);
@@ -17150,7 +17174,7 @@ diff --git a/js/src/jit/MacroAssembler.h b/js/src/jit/MacroAssembler.h
      inline void storeUncanonicalizedDouble(FloatRegister src, const BaseIndex& dest)
          DEFINED_ON(x86_shared, arm, arm64, mips32, mips64);
      inline void storeUncanonicalizedDouble(FloatRegister src, const Operand& dest)
-@@ -2187,17 +2182,17 @@ class MacroAssembler : public MacroAssem
+@@ -2146,17 +2141,17 @@ class MacroAssembler : public MacroAssem
          call(preBarrier);
          Pop(PreBarrierReg);
  
@@ -17169,7 +17193,7 @@ diff --git a/js/src/jit/MacroAssembler.h b/js/src/jit/MacroAssembler.h
      template<typename S, typename T>
      void storeToTypedIntArray(Scalar::Type arrayType, const S& value, const T& dest) {
          switch (arrayType) {
-@@ -2214,20 +2209,18 @@ class MacroAssembler : public MacroAssem
+@@ -2173,20 +2168,18 @@ class MacroAssembler : public MacroAssem
            case Scalar::Uint32:
              store32(value, dest);
              break;
@@ -18181,7 +18205,7 @@ diff --git a/js/src/jit/arm/MacroAssembler-arm.h b/js/src/jit/arm/MacroAssembler
 diff --git a/js/src/jit/arm64/CodeGenerator-arm64.cpp b/js/src/jit/arm64/CodeGenerator-arm64.cpp
 --- a/js/src/jit/arm64/CodeGenerator-arm64.cpp
 +++ b/js/src/jit/arm64/CodeGenerator-arm64.cpp
-@@ -843,76 +843,16 @@ CodeGenerator::visitAtomicExchangeTypedA
+@@ -685,76 +685,16 @@ CodeGenerator::visitAtomicExchangeTypedA
          masm.atomicExchangeJS(arrayType, Synchronization::Full(), dest, value, temp, output);
      } else {
          BaseIndex dest(elements, ToRegister(lir->index()), ScaleFromElemWidth(width));
@@ -18258,7 +18282,7 @@ diff --git a/js/src/jit/arm64/CodeGenerator-arm64.cpp b/js/src/jit/arm64/CodeGen
  void
  CodeGenerator::visitClzI64(LClzI64*)
  {
-@@ -1005,22 +945,16 @@ CodeGenerator::visitPopcntI64(LPopcntI64
+@@ -847,22 +787,16 @@ CodeGenerator::visitPopcntI64(LPopcntI64
  
  void
  CodeGenerator::visitRotateI64(LRotateI64*)
@@ -18281,7 +18305,7 @@ diff --git a/js/src/jit/arm64/CodeGenerator-arm64.cpp b/js/src/jit/arm64/CodeGen
  void
  CodeGenerator::visitCompareI64(LCompareI64*)
  {
-@@ -1029,94 +963,40 @@ CodeGenerator::visitCompareI64(LCompareI
+@@ -871,94 +805,40 @@ CodeGenerator::visitCompareI64(LCompareI
  
  void
  CodeGenerator::visitNearbyIntF(LNearbyIntF*)
@@ -18376,7 +18400,7 @@ diff --git a/js/src/jit/arm64/CodeGenerator-arm64.cpp b/js/src/jit/arm64/CodeGen
  void
  CodeGenerator::visitWasmAddOffset(LWasmAddOffset*)
  {
-@@ -1155,154 +1035,40 @@ CodeGenerator::visitTestI64AndBranch(LTe
+@@ -997,154 +877,40 @@ CodeGenerator::visitTestI64AndBranch(LTe
  
  void
  CodeGenerator::visitWrapInt64ToInt32(LWrapInt64ToInt32*)
@@ -18534,7 +18558,7 @@ diff --git a/js/src/jit/arm64/CodeGenerator-arm64.cpp b/js/src/jit/arm64/CodeGen
 diff --git a/js/src/jit/arm64/Lowering-arm64.cpp b/js/src/jit/arm64/Lowering-arm64.cpp
 --- a/js/src/jit/arm64/Lowering-arm64.cpp
 +++ b/js/src/jit/arm64/Lowering-arm64.cpp
-@@ -397,68 +397,8 @@ LIRGenerator::visitExtendInt32ToInt64(ME
+@@ -349,68 +349,8 @@ LIRGenerator::visitExtendInt32ToInt64(ME
      MOZ_CRASH("NYI");
  }
  
@@ -19372,7 +19396,7 @@ diff --git a/js/src/jit/shared/CodeGenerator-shared-inl.h b/js/src/jit/shared/Co
 diff --git a/js/src/jit/shared/CodeGenerator-shared.cpp b/js/src/jit/shared/CodeGenerator-shared.cpp
 --- a/js/src/jit/shared/CodeGenerator-shared.cpp
 +++ b/js/src/jit/shared/CodeGenerator-shared.cpp
-@@ -84,27 +84,20 @@ CodeGeneratorShared::CodeGeneratorShared
+@@ -83,27 +83,20 @@ CodeGeneratorShared::CodeGeneratorShared
  
      if (gen->compilingWasm()) {
          // Since wasm uses the system ABI which does not necessarily use a
@@ -22021,7 +22045,7 @@ diff --git a/js/src/jit/x86-shared/Lowering-x86-shared.h b/js/src/jit/x86-shared
 diff --git a/js/src/jit/x86-shared/MacroAssembler-x86-shared-inl.h b/js/src/jit/x86-shared/MacroAssembler-x86-shared-inl.h
 --- a/js/src/jit/x86-shared/MacroAssembler-x86-shared-inl.h
 +++ b/js/src/jit/x86-shared/MacroAssembler-x86-shared-inl.h
-@@ -1145,39 +1145,16 @@ void
+@@ -1098,39 +1098,16 @@ void
  MacroAssembler::spectreZeroRegister(Condition cond, Register scratch, Register dest)
  {
      // Note: use movl instead of move32/xorl to ensure flags are not clobbered.
@@ -22445,7 +22469,7 @@ diff --git a/js/src/jit/x86/MacroAssembler-x86.cpp b/js/src/jit/x86/MacroAssembl
 diff --git a/js/src/js.msg b/js/src/js.msg
 --- a/js/src/js.msg
 +++ b/js/src/js.msg
-@@ -316,17 +316,16 @@ MSG_DEF(JSMSG_SELFHOSTED_METHOD_CALL,  0
+@@ -318,17 +318,16 @@ MSG_DEF(JSMSG_SELFHOSTED_METHOD_CALL,  0
  MSG_DEF(JSMSG_SELFHOSTED_UNBOUND_NAME, 0, JSEXN_TYPEERR, "self-hosted code may not contain unbound name lookups")
  MSG_DEF(JSMSG_SEMI_AFTER_FOR_COND,     0, JSEXN_SYNTAXERR, "missing ; after for-loop condition")
  MSG_DEF(JSMSG_SEMI_AFTER_FOR_INIT,     0, JSEXN_SYNTAXERR, "missing ; after for-loop initializer")
@@ -22463,7 +22487,7 @@ diff --git a/js/src/js.msg b/js/src/js.msg
  MSG_DEF(JSMSG_TOO_MANY_LOCALS,         0, JSEXN_SYNTAXERR, "too many local variables")
  MSG_DEF(JSMSG_TOO_MANY_YIELDS,         0, JSEXN_SYNTAXERR, "too many yield expressions")
  MSG_DEF(JSMSG_TOUGH_BREAK,             0, JSEXN_SYNTAXERR, "unlabeled break must be inside loop or switch")
-@@ -531,25 +530,23 @@ MSG_DEF(JSMSG_TOO_MANY_PARENS,         0
+@@ -533,25 +532,23 @@ MSG_DEF(JSMSG_TOO_MANY_PARENS,         0
  MSG_DEF(JSMSG_UNICODE_OVERFLOW,        1, JSEXN_SYNTAXERR, "Unicode codepoint must not be greater than 0x10FFFF in {0}")
  MSG_DEF(JSMSG_UNMATCHED_RIGHT_PAREN,   0, JSEXN_SYNTAXERR, "unmatched ) in regular expression")
  MSG_DEF(JSMSG_UNTERM_CLASS,            0, JSEXN_SYNTAXERR, "unterminated character class")
@@ -22516,7 +22540,7 @@ diff --git a/js/src/jsapi.cpp b/js/src/jsapi.cpp
 diff --git a/js/src/jsfriendapi.h b/js/src/jsfriendapi.h
 --- a/js/src/jsfriendapi.h
 +++ b/js/src/jsfriendapi.h
-@@ -1608,20 +1608,16 @@ enum Type {
+@@ -1609,20 +1609,16 @@ enum Type {
      Uint8Clamped,
  
      /**
@@ -22537,7 +22561,7 @@ diff --git a/js/src/jsfriendapi.h b/js/src/jsfriendapi.h
      switch (atype) {
        case Int8:
        case Uint8:
-@@ -1632,101 +1628,42 @@ byteSize(Type atype)
+@@ -1633,101 +1629,42 @@ byteSize(Type atype)
          return 2;
        case Int32:
        case Uint32:
@@ -22678,7 +22702,7 @@ diff --git a/js/src/moz.build b/js/src/moz.build
      'jit/Ion.cpp',
      'jit/IonAnalysis.cpp',
      'jit/IonBuilder.cpp',
-@@ -696,17 +694,16 @@ ReservedWordsGenerated.inputs += [
+@@ -699,17 +697,16 @@ ReservedWordsGenerated.inputs += [
  DIRS += [
      'build',
  ]
@@ -22693,9 +22717,9 @@ diff --git a/js/src/moz.build b/js/src/moz.build
      DEFINES['ENABLE_WASM_THREAD_OPS'] = True
      DEFINES['ENABLE_WASM_GC'] = True
  
- if CONFIG['JS_BUILD_BINAST']:
-     # Using SOURCES, as UNIFIED_SOURCES causes mysterious bugs on 32-bit platforms.
-     # These parts of BinAST are designed only to test evolutions of the
+ # Some huge-mapping optimization instead of bounds checks on supported
+ # platforms.
+ if CONFIG['JS_CODEGEN_X64'] or CONFIG['JS_CODEGEN_ARM64']:
 diff --git a/js/src/tests/jstests.list b/js/src/tests/jstests.list
 --- a/js/src/tests/jstests.list
 +++ b/js/src/tests/jstests.list
@@ -22721,7 +22745,7 @@ diff --git a/js/src/tests/jstests.list b/js/src/tests/jstests.list
  
  
  #####################################
-@@ -352,29 +348,16 @@ skip script test262/annexB/language/eval
+@@ -348,29 +344,16 @@ skip script test262/annexB/language/eval
  skip script test262/annexB/language/eval-code/indirect/global-switch-dflt-eval-global-existing-global-init.js
  skip script test262/annexB/language/eval-code/indirect/global-if-decl-no-else-eval-global-existing-global-init.js
  skip script test262/annexB/language/eval-code/indirect/global-if-decl-else-stmt-eval-global-existing-global-init.js
@@ -29720,7 +29744,7 @@ diff --git a/js/src/tests/non262/TypedObject/method_from.js b/js/src/tests/non26
 diff --git a/js/src/vm/ArrayBufferObject.cpp b/js/src/vm/ArrayBufferObject.cpp
 --- a/js/src/vm/ArrayBufferObject.cpp
 +++ b/js/src/vm/ArrayBufferObject.cpp
-@@ -923,18 +923,18 @@ ArrayBufferObject::prepareForAsmJS(JSCon
+@@ -926,18 +926,18 @@ ArrayBufferObject::prepareForAsmJS(JSCon
      if (buffer->forInlineTypedObject())
          return false;
  
@@ -29764,7 +29788,7 @@ diff --git a/js/src/vm/GlobalObject.h b/js/src/vm/GlobalObject.h
   *   use. As with all reserved slots these start out as UndefinedValue() and
   *   are traced for GC purposes. Apart from that the engine never touches
   *   these slots, so the embedding can do whatever it wants with them.
-@@ -445,27 +442,16 @@ class GlobalObject : public NativeObject
+@@ -448,27 +445,16 @@ class GlobalObject : public NativeObject
      }
  
      static JSObject*
@@ -29792,7 +29816,7 @@ diff --git a/js/src/vm/GlobalObject.h b/js/src/vm/GlobalObject.h
      }
  
      static JSFunction*
-@@ -774,20 +760,16 @@ class GlobalObject : public NativeObject
+@@ -776,20 +762,16 @@ class GlobalObject : public NativeObject
      static bool initModuleProto(JSContext* cx, Handle<GlobalObject*> global);
      static bool initImportEntryProto(JSContext* cx, Handle<GlobalObject*> global);
      static bool initExportEntryProto(JSContext* cx, Handle<GlobalObject*> global);
@@ -29860,7 +29884,7 @@ diff --git a/js/src/vm/SelfHosting.cpp b/js/src/vm/SelfHosting.cpp
  #include "gc/Marking.h"
  #include "gc/Policy.h"
  #include "jit/AtomicOperations.h"
-@@ -2399,29 +2398,16 @@ static const JSFunctionSpec intrinsic_fu
+@@ -2409,29 +2408,16 @@ static const JSFunctionSpec intrinsic_fu
      JS_FN("std_String_localeCompare",            str_localeCompare,            1,0),
  #else
      JS_FN("std_String_normalize",                str_normalize,                0,0),
@@ -29890,7 +29914,7 @@ diff --git a/js/src/vm/SelfHosting.cpp b/js/src/vm/SelfHosting.cpp
                      IntrinsicIsCrossRealmArrayConstructor),
      JS_INLINABLE_FN("ToInteger",     intrinsic_ToInteger,               1,0, IntrinsicToInteger),
      JS_INLINABLE_FN("ToString",      intrinsic_ToString,                1,0, IntrinsicToString),
-@@ -2608,17 +2594,16 @@ static const JSFunctionSpec intrinsic_fu
+@@ -2619,17 +2605,16 @@ static const JSFunctionSpec intrinsic_fu
      JS_FN("NewDerivedTypedObject",          js::NewDerivedTypedObject, 3, 0),
      JS_FN("TypedObjectBuffer",              TypedObject::GetBuffer, 1, 0),
      JS_FN("TypedObjectByteOffset",          TypedObject::GetByteOffset, 1, 0),
@@ -29911,7 +29935,7 @@ diff --git a/js/src/vm/SelfHosting.cpp b/js/src/vm/SelfHosting.cpp
 diff --git a/js/src/vm/TypedArrayObject.cpp b/js/src/vm/TypedArrayObject.cpp
 --- a/js/src/vm/TypedArrayObject.cpp
 +++ b/js/src/vm/TypedArrayObject.cpp
-@@ -1797,20 +1797,16 @@ TypedArrayObject::getElement(uint32_t in
+@@ -1799,20 +1799,16 @@ TypedArrayObject::getElement(uint32_t in
          return Uint32Array::getIndexValue(this, index);
        case Scalar::Float32:
          return Float32Array::getIndexValue(this, index);
@@ -29932,7 +29956,7 @@ diff --git a/js/src/vm/TypedArrayObject.cpp b/js/src/vm/TypedArrayObject.cpp
  }
  
  void
-@@ -1847,20 +1843,16 @@ TypedArrayObject::setElement(TypedArrayO
+@@ -1849,20 +1845,16 @@ TypedArrayObject::setElement(TypedArrayO
          return;
        case Scalar::Float32:
          Float32Array::setIndexValue(obj, index, d);

+ 4 - 3
frg/work-js/mozilla-release/patches/1426865-2-72a1.patch

@@ -3,7 +3,7 @@
 # Date 1572215651 0
 #      Sun Oct 27 22:34:11 2019 +0000
 # Node ID 01c0d41a024b581d3c168ae3501f7e65ea99c550
-# Parent  d4737c7e022600cb3db4986a05ce3be70a94fcc1
+# Parent  4af6f0dafaa5ff6c01ca55f86a19fc37c572152c
 Bug 1426865 - Remove JS_BROKEN_GCC_ATTRIBUTE_WARNING. r=sfink
 
 This macro makes any forward declarations unnecessarily verbose, and the
@@ -124,7 +124,7 @@ new file mode 100644
 diff --git a/js/src/gc/Barrier.cpp b/js/src/gc/Barrier.cpp
 --- a/js/src/gc/Barrier.cpp
 +++ b/js/src/gc/Barrier.cpp
-@@ -205,32 +205,23 @@ MovableCellHasher<T>::match(const Key& k
+@@ -205,33 +205,24 @@ MovableCellHasher<T>::match(const Key& k
      if (!zone->maybeGetUniqueId(k, &keyId)) {
          // Key is dead and cannot match lookup which must be live.
          return false;
@@ -144,6 +144,7 @@ diff --git a/js/src/gc/Barrier.cpp b/js/src/gc/Barrier.cpp
  template struct JS_PUBLIC_API(MovableCellHasher<EnvironmentObject*>);
  template struct JS_PUBLIC_API(MovableCellHasher<WasmInstanceObject*>);
  template struct JS_PUBLIC_API(MovableCellHasher<JSScript*>);
+ template struct JS_PUBLIC_API(MovableCellHasher<LazyScript*>);
  
 -#ifdef JS_BROKEN_GCC_ATTRIBUTE_WARNING
 -#pragma GCC diagnostic pop
@@ -197,7 +198,7 @@ diff --git a/js/src/jstypes.h b/js/src/jstypes.h
 diff --git a/js/src/vm/Stack.h b/js/src/vm/Stack.h
 --- a/js/src/vm/Stack.h
 +++ b/js/src/vm/Stack.h
-@@ -28,26 +28,19 @@
+@@ -29,26 +29,19 @@
  #include "vm/JSScript.h"
  #include "vm/SavedFrame.h"
  #include "wasm/WasmFrameIter.h"

+ 0 - 0
frg/work-js/mozilla-release/patches/mozilla-central-push_428519.patch → frg/work-js/mozilla-release/patches/1434305-01-63a1.patch


+ 0 - 0
frg/work-js/mozilla-release/patches/mozilla-central-push_428520.patch → frg/work-js/mozilla-release/patches/1434305-02-63a1.patch


+ 2 - 11
frg/work-js/mozilla-release/patches/mozilla-central-push_428521.patch → frg/work-js/mozilla-release/patches/1434305-03-63a1.patch

@@ -3,7 +3,7 @@
 # Date 1532576176 -32400
 #      Thu Jul 26 12:36:16 2018 +0900
 # Node ID 49f82b7a2cb1991eec2db836efca5762d1e50a06
-# Parent  dea04c3e53869104c0e79e6b5ecc4cd9df2f0d17
+# Parent  295e3f8d90345c9111f06acc9a656fcc4fe709e8
 Bug 1434305 - Part 3: Support LazyScript in WeakMap. r=jimb,sfink
 
 diff --git a/js/src/gc/Barrier.cpp b/js/src/gc/Barrier.cpp
@@ -73,20 +73,11 @@ diff --git a/js/src/gc/WeakMap.h b/js/src/gc/WeakMap.h
 diff --git a/xpcom/base/CycleCollectedJSRuntime.h b/xpcom/base/CycleCollectedJSRuntime.h
 --- a/xpcom/base/CycleCollectedJSRuntime.h
 +++ b/xpcom/base/CycleCollectedJSRuntime.h
-@@ -406,20 +406,26 @@ private:
- 
- #endif // defined(NIGHTLY_BUILD)
- 
- };
+@@ -370,16 +370,17 @@ private:
  
  void TraceScriptHolder(nsISupports* aHolder, JSTracer* aTracer);
  
  // Returns true if the JS::TraceKind is one the cycle collector cares about.
-+// Everything used as WeakMap key should be listed here, to represent the key
-+// in cycle collector's graph, otherwise the key is considered to be pointed
-+// from somewhere unknown, and results in leaking the subgraph which contains
-+// the key.
-+// See the comments in NoteWeakMapsTracer::trace for more details.
  inline bool AddToCCKind(JS::TraceKind aKind)
  {
    return aKind == JS::TraceKind::Object ||

+ 0 - 0
frg/work-js/mozilla-release/patches/mozilla-central-push_428522.patch → frg/work-js/mozilla-release/patches/1434305-04-63a1.patch


+ 0 - 0
frg/work-js/mozilla-release/patches/mozilla-central-push_428523.patch → frg/work-js/mozilla-release/patches/1434305-05-63a1.patch


+ 0 - 0
frg/work-js/mozilla-release/patches/mozilla-central-push_428524.patch → frg/work-js/mozilla-release/patches/1434305-06-63a1.patch


+ 22 - 67
frg/work-js/mozilla-release/patches/mozilla-central-push_428525.patch → frg/work-js/mozilla-release/patches/1434305-07-PARTIAL-63a1.patch

@@ -3,13 +3,13 @@
 # Date 1532576177 -32400
 #      Thu Jul 26 12:36:17 2018 +0900
 # Node ID ec8c69da8281a0798132b68b82accf0ab241df9d
-# Parent  cac8918606978b862db740fb865f4e155e442125
+# Parent  342efbb0af1333a7e740f2c93254015f2491e60b
 Bug 1434305 - Part 7: Support LazyScript variant in DebuggerScriptReferent, and support LazyScript in Debugger.Script accessors and methods. r=jimb
 
 diff --git a/js/src/vm/Debugger.cpp b/js/src/vm/Debugger.cpp
 --- a/js/src/vm/Debugger.cpp
 +++ b/js/src/vm/Debugger.cpp
-@@ -5171,16 +5171,18 @@ GetScriptReferentCell(JSObject* obj)
+@@ -5149,16 +5149,18 @@ GetScriptReferentCell(JSObject* obj)
  
  static inline DebuggerScriptReferent
  GetScriptReferent(JSObject* obj)
@@ -28,7 +28,7 @@ diff --git a/js/src/vm/Debugger.cpp b/js/src/vm/Debugger.cpp
  
  void
  DebuggerScript_trace(JSTracer* trc, JSObject* obj)
-@@ -5198,17 +5200,17 @@ DebuggerScript_trace(JSTracer* trc, JSOb
+@@ -5176,17 +5178,17 @@ DebuggerScript_trace(JSTracer* trc, JSOb
              TraceManuallyBarrieredCrossCompartmentEdge(trc, obj, &wasm,
                                                         "Debugger.Script wasm referent");
              MOZ_ASSERT(wasm->is<WasmInstanceObject>());
@@ -47,7 +47,7 @@ diff --git a/js/src/vm/Debugger.cpp b/js/src/vm/Debugger.cpp
      // JSFunction::getOrCreateScript requires the enclosing script not to be
      // lazified.
      MOZ_ASSERT(lazyScript->hasEnclosingLazyScript() || lazyScript->hasEnclosingScope());
-@@ -5229,16 +5231,17 @@ DelazifyScript(JSContext* cx, Handle<Laz
+@@ -5207,16 +5209,17 @@ DelazifyScript(JSContext* cx, Handle<Laz
  
  class DebuggerScriptSetPrivateMatcher
  {
@@ -65,7 +65,7 @@ diff --git a/js/src/vm/Debugger.cpp b/js/src/vm/Debugger.cpp
  {
      assertSameCompartment(cx, object.get());
  
-@@ -5340,112 +5343,158 @@ DebuggerScript_check(JSContext* cx, cons
+@@ -5318,112 +5321,158 @@ DebuggerScript_check(JSContext* cx, cons
          JS_ReportErrorNumberASCII(cx, GetErrorMessage, nullptr, JSMSG_INCOMPATIBLE_PROTO,
                                    "Debugger.Script", fnname, "prototype object");
          return nullptr;
@@ -246,7 +246,7 @@ diff --git a/js/src/vm/Debugger.cpp b/js/src/vm/Debugger.cpp
  static bool
  DebuggerScript_getStartLine(JSContext* cx, unsigned argc, Value* vp)
  {
-@@ -5465,16 +5514,22 @@ struct DebuggerScriptGetLineCountMatcher
+@@ -5443,16 +5492,22 @@ struct DebuggerScriptGetLineCountMatcher
          totalLines(0.0)
      {}
      using ReturnType = bool;
@@ -269,7 +269,7 @@ diff --git a/js/src/vm/Debugger.cpp b/js/src/vm/Debugger.cpp
          return true;
      }
  };
-@@ -5498,21 +5553,28 @@ class DebuggerScriptGetSourceMatcher
+@@ -5476,21 +5531,28 @@ class DebuggerScriptGetSourceMatcher
    public:
      DebuggerScriptGetSourceMatcher(JSContext* cx, Debugger* dbg)
        : cx_(cx), dbg_(dbg)
@@ -299,7 +299,7 @@ diff --git a/js/src/vm/Debugger.cpp b/js/src/vm/Debugger.cpp
  static bool
  DebuggerScript_getSource(JSContext* cx, unsigned argc, Value* vp)
  {
-@@ -5526,73 +5588,78 @@ DebuggerScript_getSource(JSContext* cx, 
+@@ -5504,65 +5566,70 @@ DebuggerScript_getSource(JSContext* cx, 
  
      args.rval().setObject(*sourceObject);
      return true;
@@ -329,15 +329,6 @@ diff --git a/js/src/vm/Debugger.cpp b/js/src/vm/Debugger.cpp
      return true;
  }
  
- static bool
- DebuggerScript_getMainOffset(JSContext* cx, unsigned argc, Value* vp)
- {
--    THIS_DEBUGSCRIPT_SCRIPT(cx, argc, vp, "(get mainOffset)", args, obj, script);
-+    THIS_DEBUGSCRIPT_SCRIPT_DELAZIFY(cx, argc, vp, "(get mainOffset)", args, obj, script);
-     args.rval().setNumber(uint32_t(script->mainOffset()));
-     return true;
- }
- 
  static bool
  DebuggerScript_getGlobal(JSContext* cx, unsigned argc, Value* vp)
  {
@@ -385,7 +376,7 @@ diff --git a/js/src/vm/Debugger.cpp b/js/src/vm/Debugger.cpp
      if (script->hasObjects()) {
          // script->savedCallerFun indicates that this is a direct eval script
          // and the calling function is stored as script->objects()->vector[0].
-@@ -5885,17 +5952,22 @@ class DebuggerScriptGetOffsetLocationMat
+@@ -5855,17 +5922,22 @@ class DebuggerScriptGetOffsetLocationMat
                          (flowData[offset].lineno() != r.frontLineNumber() ||
                           flowData[offset].column() != r.frontColumnNumber()));
          value.setBoolean(isEntryPoint);
@@ -409,46 +400,10 @@ diff --git a/js/src/vm/Debugger.cpp b/js/src/vm/Debugger.cpp
              return false;
  
          if (!found) {
-@@ -5975,28 +6047,34 @@ class DebuggerScriptGetSuccessorOrPredec
-             return false;
+@@ -5911,17 +5983,17 @@ DebuggerScript_getOffsetLocation(JSConte
  
-         for (jsbytecode* pc : adjacent) {
-             if (!NewbornArrayPush(cx_, result_, NumberValue(pc - script->code())))
-                 return false;
-         }
-         return true;
-     }
--
-+    ReturnType match(Handle<LazyScript*> lazyScript) {
-+        RootedScript script(cx_, DelazifyScript(cx_, lazyScript));
-+        if (!script)
-+            return false;
-+        return match(script);
-+    }
-     ReturnType match(Handle<WasmInstanceObject*> instance) {
-         JS_ReportErrorASCII(cx_, "getSuccessorOrPredecessorOffsets NYI on wasm instances");
-         return false;
-     }
- };
- 
- static bool
- DebuggerScript_getSuccessorOrPredecessorOffsets(JSContext* cx, unsigned argc, Value* vp,
-                                                 const char* name, bool successor)
- {
-     THIS_DEBUGSCRIPT_REFERENT(cx, argc, vp, name, args, obj, referent);
-+
-     if (!args.requireAtLeast(cx, name, 1))
-         return false;
-     size_t offset;
-     if (!ScriptOffset(cx, args[0], &offset))
-         return false;
- 
-     RootedObject result(cx);
-     DebuggerScriptGetSuccessorOrPredecessorOffsetsMatcher matcher(cx, offset, successor, &result);
-@@ -6019,17 +6097,17 @@ DebuggerScript_getPredecessorOffsets(JSC
- {
-     return DebuggerScript_getSuccessorOrPredecessorOffsets(cx, argc, vp,
-                                                            "getPredecessorOffsets", false);
+     args.rval().setObject(*result);
+     return true;
  }
  
  static bool
@@ -464,7 +419,7 @@ diff --git a/js/src/vm/Debugger.cpp b/js/src/vm/Debugger.cpp
          return false;
  
      // Second pass: build the result array.
-@@ -6143,17 +6221,22 @@ class DebuggerScriptGetAllColumnOffsetsM
+@@ -6035,17 +6107,22 @@ class DebuggerScriptGetAllColumnOffsetsM
                  (flowData[offset].lineno() != lineno ||
                   flowData[offset].column() != column)) {
                  if (!appendColumnOffsetEntry(lineno, column, offset))
@@ -488,7 +443,7 @@ diff --git a/js/src/vm/Debugger.cpp b/js/src/vm/Debugger.cpp
          result_.set(NewDenseEmptyArray(cx_));
          if (!result_)
              return false;
-@@ -6218,17 +6301,22 @@ class DebuggerScriptGetLineOffsetsMatche
+@@ -6110,17 +6187,22 @@ class DebuggerScriptGetLineOffsetsMatche
              {
                  if (!NewbornArrayPush(cx_, result_, NumberValue(offset)))
                      return false;
@@ -512,7 +467,7 @@ diff --git a/js/src/vm/Debugger.cpp b/js/src/vm/Debugger.cpp
          result_.set(NewDenseEmptyArray(cx_));
          if (!result_)
              return false;
-@@ -6517,17 +6605,22 @@ struct DebuggerScriptSetBreakpointMatche
+@@ -6409,17 +6491,22 @@ struct DebuggerScriptSetBreakpointMatche
              return false;
          site->inc(cx_->runtime()->defaultFreeOp());
          if (cx_->zone()->new_<Breakpoint>(dbg_, site, handler_))
@@ -536,7 +491,7 @@ diff --git a/js/src/vm/Debugger.cpp b/js/src/vm/Debugger.cpp
          }
          WasmBreakpointSite* site = instance.debug().getOrCreateBreakpointSite(cx_, offset_);
          if (!site)
-@@ -6562,17 +6655,17 @@ DebuggerScript_setBreakpoint(JSContext* 
+@@ -6454,17 +6541,17 @@ DebuggerScript_setBreakpoint(JSContext* 
          return false;
      args.rval().setUndefined();
      return true;
@@ -555,7 +510,7 @@ diff --git a/js/src/vm/Debugger.cpp b/js/src/vm/Debugger.cpp
          if (!ScriptOffset(cx, args[0], &offset) || !EnsureScriptOffsetIsValid(cx, script, offset))
              return false;
          pc = script->offsetToPC(offset);
-@@ -6612,17 +6705,22 @@ class DebuggerScriptClearBreakpointMatch
+@@ -6504,17 +6591,22 @@ class DebuggerScriptClearBreakpointMatch
    public:
      explicit DebuggerScriptClearBreakpointMatcher(JSContext* cx, Debugger* dbg, JSObject* handler) : cx_(cx), dbg_(dbg), handler_(handler) { }
      using ReturnType = bool;
@@ -579,7 +534,7 @@ diff --git a/js/src/vm/Debugger.cpp b/js/src/vm/Debugger.cpp
  
  static bool
  DebuggerScript_clearBreakpoint(JSContext* cx, unsigned argc, Value* vp)
-@@ -6692,17 +6790,22 @@ class DebuggerScriptIsInCatchScopeMatche
+@@ -6584,17 +6676,22 @@ class DebuggerScriptIsInCatchScopeMatche
                      return true;
                  }
                  ++tnBegin;
@@ -603,7 +558,7 @@ diff --git a/js/src/vm/Debugger.cpp b/js/src/vm/Debugger.cpp
  
  static bool
  DebuggerScript_isInCatchScope(JSContext* cx, unsigned argc, Value* vp)
-@@ -6720,17 +6823,17 @@ DebuggerScript_isInCatchScope(JSContext*
+@@ -6612,17 +6709,17 @@ DebuggerScript_isInCatchScope(JSContext*
          return false;
      args.rval().setBoolean(matcher.isInCatch());
      return true;
@@ -622,7 +577,7 @@ diff --git a/js/src/vm/Debugger.cpp b/js/src/vm/Debugger.cpp
          return true;
      }
  
-@@ -11481,16 +11584,22 @@ CheckDebuggeeThingRealm(Realm* realm, bo
+@@ -11371,16 +11468,22 @@ CheckDebuggeeThingRealm(Realm* realm, bo
  
  void
  js::CheckDebuggeeThing(JSScript* script, bool invisibleOk)
@@ -699,7 +654,7 @@ diff --git a/js/src/vm/Debugger.h b/js/src/vm/Debugger.h
 diff --git a/js/src/vm/JSScript.h b/js/src/vm/JSScript.h
 --- a/js/src/vm/JSScript.h
 +++ b/js/src/vm/JSScript.h
-@@ -1369,16 +1369,20 @@ class JSScript : public js::gc::TenuredC
+@@ -1366,16 +1366,20 @@ class JSScript : public js::gc::TenuredC
      uint32_t sourceStart() const {
          return sourceStart_;
      }
@@ -720,7 +675,7 @@ diff --git a/js/src/vm/JSScript.h b/js/src/vm/JSScript.h
          return toStringEnd_;
      }
  
-@@ -2525,16 +2529,19 @@ class LazyScript : public gc::TenuredCel
+@@ -2518,16 +2522,19 @@ class LazyScript : public gc::TenuredCel
          return scriptSource()->filename();
      }
      uint32_t sourceStart() const {

+ 0 - 0
frg/work-js/mozilla-release/patches/mozilla-central-push_428526.patch → frg/work-js/mozilla-release/patches/1434305-08-63a1.patch


+ 0 - 0
frg/work-js/mozilla-release/patches/mozilla-central-push_428527.patch → frg/work-js/mozilla-release/patches/1434305-09-63a1.patch


+ 0 - 0
frg/work-js/mozilla-release/patches/mozilla-central-push_428528.patch → frg/work-js/mozilla-release/patches/1434305-10-63a1.patch


+ 0 - 0
frg/work-js/mozilla-release/patches/mozilla-central-push_428529.patch → frg/work-js/mozilla-release/patches/1434305-11-63a1.patch


+ 0 - 0
frg/work-js/mozilla-release/patches/mozilla-central-push_428530.patch → frg/work-js/mozilla-release/patches/1434305-12-63a1.patch


+ 0 - 0
frg/work-js/mozilla-release/patches/mozilla-central-push_428531.patch → frg/work-js/mozilla-release/patches/1434305-13-63a1.patch


+ 0 - 0
frg/work-js/mozilla-release/patches/mozilla-central-push_428532.patch → frg/work-js/mozilla-release/patches/1434305-14-63a1.patch


+ 0 - 0
frg/work-js/mozilla-release/patches/mozilla-central-push_428137.patch → frg/work-js/mozilla-release/patches/1438727-00-63a1.patch


+ 0 - 0
frg/work-js/mozilla-release/patches/mozilla-central-push_428138.patch → frg/work-js/mozilla-release/patches/1438727-01-63a1.patch


+ 0 - 0
frg/work-js/mozilla-release/patches/mozilla-central-push_428139.patch → frg/work-js/mozilla-release/patches/1438727-02-63a1.patch


+ 0 - 0
frg/work-js/mozilla-release/patches/mozilla-central-push_428140.patch → frg/work-js/mozilla-release/patches/1438727-03-63a1.patch


+ 0 - 0
frg/work-js/mozilla-release/patches/mozilla-central-push_428141.patch → frg/work-js/mozilla-release/patches/1438727-04-63a1.patch


+ 0 - 0
frg/work-js/mozilla-release/patches/mozilla-central-push_428142.patch → frg/work-js/mozilla-release/patches/1438727-05-63a1.patch


+ 0 - 0
frg/work-js/mozilla-release/patches/mozilla-central-push_428143.patch → frg/work-js/mozilla-release/patches/1438727-06-63a1.patch


+ 0 - 0
frg/work-js/mozilla-release/patches/mozilla-central-push_428144.patch → frg/work-js/mozilla-release/patches/1438727-07-63a1.patch


+ 0 - 0
frg/work-js/mozilla-release/patches/mozilla-central-push_428145.patch → frg/work-js/mozilla-release/patches/1438727-08-63a1.patch


+ 0 - 0
frg/work-js/mozilla-release/patches/mozilla-central-push_428596.patch → frg/work-js/mozilla-release/patches/1438727-09-63a1.patch


+ 0 - 0
frg/work-js/mozilla-release/patches/mozilla-central-push_428597.patch → frg/work-js/mozilla-release/patches/1438727-10-63a1.patch


+ 0 - 0
frg/work-js/mozilla-release/patches/mozilla-central-push_428598.patch → frg/work-js/mozilla-release/patches/1438727-11-63a1.patch


+ 0 - 0
frg/work-js/mozilla-release/patches/mozilla-central-push_428599.patch → frg/work-js/mozilla-release/patches/1438727-12-63a1.patch


+ 0 - 0
frg/work-js/mozilla-release/patches/mozilla-central-push_428600.patch → frg/work-js/mozilla-release/patches/1438727-13-63a1.patch


+ 0 - 0
frg/work-js/mozilla-release/patches/mozilla-central-push_428601.patch → frg/work-js/mozilla-release/patches/1438727-14-63a1.patch


+ 0 - 0
frg/work-js/mozilla-release/patches/mozilla-central-push_428602.patch → frg/work-js/mozilla-release/patches/1438727-15-63a1.patch


+ 0 - 0
frg/work-js/mozilla-release/patches/mozilla-central-push_428603.patch → frg/work-js/mozilla-release/patches/1438727-16-63a1.patch


+ 0 - 0
frg/work-js/mozilla-release/patches/mozilla-central-push_429183.patch → frg/work-js/mozilla-release/patches/1438727-17-63a1.patch


+ 0 - 0
frg/work-js/mozilla-release/patches/mozilla-central-push_429184.patch → frg/work-js/mozilla-release/patches/1438727-18-63a1.patch


+ 0 - 0
frg/work-js/mozilla-release/patches/mozilla-central-push_429185.patch → frg/work-js/mozilla-release/patches/1438727-19-63a1.patch


+ 0 - 0
frg/work-js/mozilla-release/patches/mozilla-central-push_429186.patch → frg/work-js/mozilla-release/patches/1438727-20-63a1.patch


+ 0 - 0
frg/work-js/mozilla-release/patches/mozilla-central-push_429187.patch → frg/work-js/mozilla-release/patches/1438727-21-63a1.patch


+ 0 - 0
frg/work-js/mozilla-release/patches/mozilla-central-push_429188.patch → frg/work-js/mozilla-release/patches/1438727-22-63a1.patch


+ 8 - 8
frg/work-js/mozilla-release/patches/mozilla-central-push_428738.patch → frg/work-js/mozilla-release/patches/1448277-63a1.patch

@@ -3,7 +3,7 @@
 # Date 1532686291 -7200
 #      Fri Jul 27 12:11:31 2018 +0200
 # Node ID 3430a73e5f1c35e93997d95b25252403dc7709d0
-# Parent  53ea40188efab3406b5ec7709699bb673176bee6
+# Parent  7e9f63e6578c28075e3d8e46a95fdb12542d25ed
 Bug 1448277 - Generate GVN-able references to indirect wasm globals.  r=lth.
 
 Wasm-via-IonMonkey creates accesses to indirect globals using a double
@@ -154,7 +154,7 @@ new file mode 100644
 diff --git a/js/src/jit/AliasAnalysis.cpp b/js/src/jit/AliasAnalysis.cpp
 --- a/js/src/jit/AliasAnalysis.cpp
 +++ b/js/src/jit/AliasAnalysis.cpp
-@@ -181,17 +181,19 @@ GetObject(const MDefinition* ins)
+@@ -180,17 +180,19 @@ GetObject(const MDefinition* ins)
        case MDefinition::Opcode::AsmJSStoreHeap:
        case MDefinition::Opcode::WasmLoadTls:
        case MDefinition::Opcode::WasmLoad:
@@ -167,14 +167,14 @@ diff --git a/js/src/jit/AliasAnalysis.cpp b/js/src/jit/AliasAnalysis.cpp
        case MDefinition::Opcode::WasmStoreGlobalVar:
 +      case MDefinition::Opcode::WasmStoreGlobalCell:
        case MDefinition::Opcode::ArrayJoin:
+       case MDefinition::Opcode::ArraySlice:
+       case MDefinition::Opcode::StoreElementHole:
+       case MDefinition::Opcode::FallibleStoreElement:
          return nullptr;
        default:
  #ifdef DEBUG
          // Crash when the default aliasSet is overriden, but when not added in the list above.
-         if (!ins->getAliasSet().isStore() || ins->getAliasSet().flags() != AliasSet::Flag::Any)
-             MOZ_CRASH("Overridden getAliasSet without updating AliasAnalysis GetObject");
- #endif
-@@ -445,9 +447,9 @@ AliasAnalysis::analyze()
+@@ -447,9 +449,9 @@ AliasAnalysis::analyze()
              loop_ = loop_->outer();
          }
      }
@@ -189,7 +189,7 @@ diff --git a/js/src/jit/AliasAnalysis.cpp b/js/src/jit/AliasAnalysis.cpp
 diff --git a/js/src/jit/CodeGenerator.cpp b/js/src/jit/CodeGenerator.cpp
 --- a/js/src/jit/CodeGenerator.cpp
 +++ b/js/src/jit/CodeGenerator.cpp
-@@ -7145,127 +7145,181 @@ CodeGenerator::visitWasmCallVoid(LWasmCa
+@@ -7137,127 +7137,181 @@ CodeGenerator::visitWasmCallVoid(LWasmCa
  }
  
  void
@@ -672,7 +672,7 @@ diff --git a/js/src/jit/MIR.h b/js/src/jit/MIR.h
      static_assert((1 << NumCategories) - 1 == Any,
                    "NumCategories must include all flags present in Any");
  
-@@ -13631,78 +13632,117 @@ class MWasmAtomicBinopHeap
+@@ -13615,78 +13616,117 @@ class MWasmAtomicBinopHeap
          return AliasSet::Store(AliasSet::WasmHeap);
      }
  };

+ 31 - 0
frg/work-js/mozilla-release/patches/1448439-1-61a1.patch

@@ -0,0 +1,31 @@
+# HG changeset patch
+# User Botond Ballo <botond@mozilla.com>
+# Date 1524269032 14400
+# Node ID 79bbfba09e528f51091c26a84454c0d865f5b466
+# Parent  d52b265b6b52a817374add2c4e927530dab571a6
+Bug 1448439 - Fix unified build bustage. r=kats
+
+MozReview-Commit-ID: 3HAcjOB1tjn
+
+diff --git a/gfx/layers/ipc/LayerTreeOwnerTracker.h b/gfx/layers/ipc/LayerTreeOwnerTracker.h
+--- a/gfx/layers/ipc/LayerTreeOwnerTracker.h
++++ b/gfx/layers/ipc/LayerTreeOwnerTracker.h
+@@ -3,16 +3,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/. */
+ 
+ #ifndef mozilla_layers_LayerTreeOwnerTracker_h
+ #define mozilla_layers_LayerTreeOwnerTracker_h
+ 
+ #include "base/process.h"  // for base::ProcessId
++#include "LayersTypes.h"   // for LayersId
+ #include "mozilla/Mutex.h" // for mozilla::Mutex
+ 
+ #include <functional>
+ #include <map>
+ 
+ namespace mozilla {
+ 
+ namespace dom {
+

+ 4 - 4
frg/work-js/mozilla-release/patches/mozilla-central-push_427609.patch → frg/work-js/mozilla-release/patches/1449986-63a1.patch

@@ -3,7 +3,7 @@
 # Date 1532108796 25200
 #      Fri Jul 20 10:46:36 2018 -0700
 # Node ID 1f10db43a17ef31d377709c7ec966a45de2c166e
-# Parent  f09c12fc7f40945e4751818ef011fe800097e6e7
+# Parent  a9849b9cd6985704e05cb527c4736b80224b0724
 Bug 1449986: Use NewBuiltinClassInstance when requesting default prototype. r=jorendorff
 
 diff --git a/js/src/builtin/Promise.cpp b/js/src/builtin/Promise.cpp
@@ -148,7 +148,7 @@ diff --git a/js/src/builtin/Stream.cpp b/js/src/builtin/Stream.cpp
 diff --git a/js/src/jit/CacheIR.cpp b/js/src/jit/CacheIR.cpp
 --- a/js/src/jit/CacheIR.cpp
 +++ b/js/src/jit/CacheIR.cpp
-@@ -4697,17 +4697,17 @@ static const size_t SHAPE_CONTAINER_SLOT
+@@ -4696,17 +4696,17 @@ static const size_t SHAPE_CONTAINER_SLOT
  JSObject*
  jit::NewWrapperWithObjectShape(JSContext* cx, HandleNativeObject obj)
  {
@@ -170,7 +170,7 @@ diff --git a/js/src/jit/CacheIR.cpp b/js/src/jit/CacheIR.cpp
 diff --git a/js/src/jsapi.cpp b/js/src/jsapi.cpp
 --- a/js/src/jsapi.cpp
 +++ b/js/src/jsapi.cpp
-@@ -1910,17 +1910,17 @@ JS_NewObject(JSContext* cx, const JSClas
+@@ -1898,17 +1898,17 @@ JS_NewObject(JSContext* cx, const JSClas
  
      const Class* clasp = Valueify(jsclasp);
      if (!clasp)
@@ -189,7 +189,7 @@ diff --git a/js/src/jsapi.cpp b/js/src/jsapi.cpp
      MOZ_ASSERT(!cx->zone()->isAtomsZone());
      AssertHeapIsIdle();
      CHECK_REQUEST(cx);
-@@ -3087,17 +3087,17 @@ JS_DefineObject(JSContext* cx, HandleObj
+@@ -3102,17 +3102,17 @@ JS_DefineObject(JSContext* cx, HandleObj
      AssertHeapIsIdle();
      CHECK_REQUEST(cx);
      assertSameCompartment(cx, obj);

+ 0 - 0
frg/work-js/mozilla-release/patches/mozilla-central-push_428684.patch → frg/work-js/mozilla-release/patches/1467022-63a1.patch


+ 0 - 0
frg/work-js/mozilla-release/patches/mozilla-central-push_428347.patch → frg/work-js/mozilla-release/patches/1467273-63a1.patch


+ 16 - 16
frg/work-js/mozilla-release/patches/mozilla-central-push_428836.patch → frg/work-js/mozilla-release/patches/1470985-1-63a1.patch

@@ -3,7 +3,7 @@
 # Date 1530589064 25200
 #      Mon Jul 02 20:37:44 2018 -0700
 # Node ID cffca1854a032479d908982f97f88a4c18cb6015
-# Parent  020682cafeffdceca5cf480414645533e142e516
+# Parent  f310b52fbca3ddfa9be625dcc79ce2d0f7ef606a
 Bug 1470985 - s/PodEqual/ArrayEqual/ from ArrayUtils.h. - r=waldo
 
 We can't use memcmp to compare PODs, largely because of undefined
@@ -15,25 +15,25 @@ MozReview-Commit-ID: LSspAi8qCWw
 diff --git a/dom/bindings/WebIDLGlobalNameHash.cpp b/dom/bindings/WebIDLGlobalNameHash.cpp
 --- a/dom/bindings/WebIDLGlobalNameHash.cpp
 +++ b/dom/bindings/WebIDLGlobalNameHash.cpp
-@@ -6,16 +6,17 @@
+@@ -2,16 +2,17 @@
+ /* vim: set ts=8 sts=2 et sw=2 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 "WebIDLGlobalNameHash.h"
- #include "js/Class.h"
  #include "js/GCAPI.h"
- #include "js/Id.h"
  #include "js/Wrapper.h"
- #include "jsapi.h"
- #include "jsfriendapi.h"
 +#include "mozilla/ArrayUtils.h"
  #include "mozilla/ErrorResult.h"
  #include "mozilla/HashFunctions.h"
  #include "mozilla/Maybe.h"
  #include "mozilla/dom/DOMJSClass.h"
  #include "mozilla/dom/DOMJSProxyHandler.h"
- #include "mozilla/dom/JSSlots.h"
  #include "mozilla/dom/PrototypeList.h"
  #include "mozilla/dom/RegisterBindings.h"
-@@ -87,17 +88,17 @@ struct WebIDLNameTableEntry : public PLD
+ #include "nsGlobalWindow.h"
+@@ -82,17 +83,17 @@ struct WebIDLNameTableEntry : public PLD
    {
      if (mNameLength != aKey->mLength) {
        return false;
@@ -113,7 +113,7 @@ diff --git a/gfx/src/FilterSupport.cpp b/gfx/src/FilterSupport.cpp
                         colorMatrix[2], colorMatrix[7], colorMatrix[12],  colorMatrix[17],
                         colorMatrix[3], colorMatrix[8], colorMatrix[13],  colorMatrix[18],
                         colorMatrix[4], colorMatrix[9], colorMatrix[14],  colorMatrix[19]);
-@@ -969,17 +970,17 @@ FilterNodeFromPrimitiveDescription(const
+@@ -958,17 +959,17 @@ FilterNodeFromPrimitiveDescription(const
        uint32_t op = atts.GetUint(eCompositeOperator);
        if (op == SVG_FECOMPOSITE_OPERATOR_ARITHMETIC) {
          const nsTArray<float>& coefficients = atts.GetFloats(eCompositeCoefficients);
@@ -358,7 +358,7 @@ diff --git a/js/src/jsapi-tests/testExternalStrings.cpp b/js/src/jsapi-tests/tes
 diff --git a/js/src/shell/js.cpp b/js/src/shell/js.cpp
 --- a/js/src/shell/js.cpp
 +++ b/js/src/shell/js.cpp
-@@ -122,24 +122,23 @@
+@@ -119,24 +119,23 @@
  #include "vm/Stack-inl.h"
  
  using namespace js;
@@ -384,7 +384,7 @@ diff --git a/js/src/shell/js.cpp b/js/src/shell/js.cpp
  
  enum PRLibSpecType { PR_LibSpec_Pathname };
  
-@@ -2069,17 +2068,17 @@ Evaluate(JSContext* cx, unsigned argc, V
+@@ -2037,17 +2036,17 @@ Evaluate(JSContext* cx, unsigned argc, V
                  char saveLengthStr[16];
                  SprintfLiteral(saveLengthStr,"%zu", saveBuffer.length());
  
@@ -403,7 +403,7 @@ diff --git a/js/src/shell/js.cpp b/js/src/shell/js.cpp
  
          size_t saveLength = saveBuffer.length();
          if (saveLength >= INT32_MAX) {
-@@ -5577,17 +5576,17 @@ SingleStepCallback(void* arg, jit::Simul
+@@ -5401,17 +5400,17 @@ SingleStepCallback(void* arg, jit::Simul
          }
      }
  
@@ -581,7 +581,7 @@ diff --git a/js/src/vm/JSScript.h b/js/src/vm/JSScript.h
  #include "gc/Barrier.h"
  #include "gc/Rooting.h"
  #include "jit/IonCode.h"
-@@ -881,17 +881,17 @@ struct ScriptBytecodeHasher
+@@ -878,17 +878,17 @@ struct ScriptBytecodeHasher
      static bool match(SharedScriptData* entry, const Lookup& lookup) {
          const SharedScriptData* data = lookup.scriptData;
          if (entry->natoms() != data->natoms())
@@ -1093,7 +1093,7 @@ diff --git a/mfbt/PodOperations.h b/mfbt/PodOperations.h
 diff --git a/security/certverifier/ExtendedValidation.cpp b/security/certverifier/ExtendedValidation.cpp
 --- a/security/certverifier/ExtendedValidation.cpp
 +++ b/security/certverifier/ExtendedValidation.cpp
-@@ -1097,27 +1097,27 @@ CertIsAuthoritativeForEVPolicy(const Uni
+@@ -1200,27 +1200,27 @@ bool CertIsAuthoritativeForEVPolicy(cons
  
    const SECOidData* cabforumOIDData = SECOID_FindOIDByTag(sCABForumEVOIDTag);
    for (size_t i = 0; i < ArrayLength(kEVInfos); ++i) {
@@ -1123,8 +1123,8 @@ diff --git a/security/certverifier/ExtendedValidation.cpp b/security/certverifie
    return false;
  }
  
- nsresult
-@@ -1183,17 +1183,17 @@ LoadExtendedValidationInfo()
+ nsresult LoadExtendedValidationInfo() {
+@@ -1284,17 +1284,17 @@ nsresult LoadExtendedValidationInfo() {
      } else {
        unsigned char certFingerprint[SHA256_LENGTH];
        srv = PK11_HashBuf(SEC_OID_SHA256, certFingerprint, cert->derCert.data,

+ 0 - 0
frg/work-js/mozilla-release/patches/mozilla-central-push_428837.patch → frg/work-js/mozilla-release/patches/1470985-2-63a1.patch


+ 0 - 0
frg/work-js/mozilla-release/patches/mozilla-central-push_428838.patch → frg/work-js/mozilla-release/patches/1470985-3-63a1.patch


+ 0 - 0
frg/work-js/mozilla-release/patches/mozilla-central-push_428753.patch → frg/work-js/mozilla-release/patches/1472178-63a1.patch


+ 0 - 0
frg/work-js/mozilla-release/patches/mozilla-central-push_427853.patch → frg/work-js/mozilla-release/patches/1472681-63a1.patch


+ 1312 - 0
frg/work-js/mozilla-release/patches/1473301-63a1.patch

@@ -0,0 +1,1312 @@
+# HG changeset patch
+# User Ryan Hunt <rhunt@eqrion.net>
+# Date 1530652558 18000
+# Node ID bd8c8fb537cf56f21f10810f53a7f00ac027f516
+# Parent  0ed4f121eb2c61c9bccf3958d275b2ae31b4eaa0
+Bug 1473301 - Remove BorderLayer. r=mattwoodrow
+
+MozReview-Commit-ID: KGXW2lYBZ3c
+
+diff --git a/gfx/layers/LayerTreeInvalidation.cpp b/gfx/layers/LayerTreeInvalidation.cpp
+--- a/gfx/layers/LayerTreeInvalidation.cpp
++++ b/gfx/layers/LayerTreeInvalidation.cpp
+@@ -601,62 +601,16 @@ public:
+     AddTransformedRegion(aOutRegion, boundsDiff, mTransform);
+     return true;
+   }
+ 
+   Color mColor;
+   IntRect mBounds;
+ };
+ 
+-struct BorderLayerProperties : public LayerPropertiesBase
+-{
+-  explicit BorderLayerProperties(BorderLayer *aLayer)
+-    : LayerPropertiesBase(aLayer)
+-    , mColors(aLayer->GetColors())
+-    , mRect(aLayer->GetRect())
+-    , mCorners(aLayer->GetCorners())
+-    , mWidths(aLayer->GetWidths())
+-  { }
+-
+-protected:
+-  BorderLayerProperties(const BorderLayerProperties& a) = delete;
+-  BorderLayerProperties& operator=(const BorderLayerProperties& a) = delete;
+-
+-public:
+-  bool ComputeChangeInternal(const char* aPrefix,
+-                             nsIntRegion& aOutRegion,
+-                             NotifySubDocInvalidationFunc aCallback) override
+-  {
+-    BorderLayer* border = static_cast<BorderLayer*>(mLayer.get());
+-
+-    if (!border->GetLocalVisibleRegion().ToUnknownRegion().IsEqual(mVisibleRegion)) {
+-      IntRect result = NewTransformedBoundsForLeaf();
+-      result = result.Union(OldTransformedBoundsForLeaf());
+-      aOutRegion = result;
+-      return true;
+-    }
+-
+-    if (!PodEqual(&mColors[0], &border->GetColors()[0], 4) ||
+-        !PodEqual(&mWidths[0], &border->GetWidths()[0], 4) ||
+-        !PodEqual(&mCorners[0], &border->GetCorners()[0], 4) ||
+-        !mRect.IsEqualEdges(border->GetRect())) {
+-      LTI_DUMP(NewTransformedBoundsForLeaf(), "bounds");
+-      aOutRegion = NewTransformedBoundsForLeaf();
+-      return true;
+-    }
+-
+-    return true;
+-  }
+-
+-  BorderColors mColors;
+-  LayerRect mRect;
+-  BorderCorners mCorners;
+-  BorderWidths mWidths;
+-};
+-
+ static ImageHost* GetImageHost(Layer* aLayer)
+ {
+   HostLayer* compositor = aLayer->AsHostLayer();
+   if (compositor) {
+     return static_cast<ImageHost*>(compositor->GetCompositableHost());
+   }
+   return nullptr;
+ }
+@@ -781,18 +735,16 @@ CloneLayerTreePropertiesInternal(Layer* 
+     case Layer::TYPE_REF:
+       return MakeUnique<ContainerLayerProperties>(aRoot->AsContainerLayer());
+     case Layer::TYPE_COLOR:
+       return MakeUnique<ColorLayerProperties>(static_cast<ColorLayer*>(aRoot));
+     case Layer::TYPE_IMAGE:
+       return MakeUnique<ImageLayerProperties>(static_cast<ImageLayer*>(aRoot), aIsMask);
+     case Layer::TYPE_CANVAS:
+       return MakeUnique<CanvasLayerProperties>(static_cast<CanvasLayer*>(aRoot));
+-    case Layer::TYPE_BORDER:
+-      return MakeUnique<BorderLayerProperties>(static_cast<BorderLayer*>(aRoot));
+     case Layer::TYPE_DISPLAYITEM:
+     case Layer::TYPE_READBACK:
+     case Layer::TYPE_SHADOW:
+     case Layer::TYPE_PAINTED:
+       return MakeUnique<LayerPropertiesBase>(aRoot);
+   }
+ 
+   MOZ_ASSERT_UNREACHABLE("Unexpected root layer type");
+diff --git a/gfx/layers/Layers.cpp b/gfx/layers/Layers.cpp
+--- a/gfx/layers/Layers.cpp
++++ b/gfx/layers/Layers.cpp
+@@ -2102,28 +2102,16 @@ ColorLayer::DumpPacket(layerscope::Layer
+   Layer::DumpPacket(aPacket, aParent);
+   // Get this layer data
+   using namespace layerscope;
+   LayersPacket::Layer* layer = aPacket->mutable_layer(aPacket->layer_size()-1);
+   layer->set_type(LayersPacket::Layer::ColorLayer);
+   layer->set_color(mColor.ToABGR());
+ }
+ 
+-void
+-BorderLayer::PrintInfo(std::stringstream& aStream, const char* aPrefix)
+-{
+-  Layer::PrintInfo(aStream, aPrefix);
+-}
+-
+-void
+-BorderLayer::DumpPacket(layerscope::LayersPacket* aPacket, const void* aParent)
+-{
+-  Layer::DumpPacket(aPacket, aParent);
+-}
+-
+ CanvasLayer::CanvasLayer(LayerManager* aManager, void* aImplData)
+   : Layer(aManager, aImplData)
+   , mSamplingFilter(SamplingFilter::GOOD)
+ {
+ }
+ 
+ CanvasLayer::~CanvasLayer() = default;
+ 
+diff --git a/gfx/layers/Layers.h b/gfx/layers/Layers.h
+--- a/gfx/layers/Layers.h
++++ b/gfx/layers/Layers.h
+@@ -87,17 +87,16 @@ class Layer;
+ class LayerMetricsWrapper;
+ class PaintedLayer;
+ class ContainerLayer;
+ class ImageLayer;
+ class ColorLayer;
+ class CompositorAnimations;
+ class CompositorBridgeChild;
+ class CanvasLayer;
+-class BorderLayer;
+ class ReadbackLayer;
+ class ReadbackProcessor;
+ class RefLayer;
+ class HostLayer;
+ class FocusTarget;
+ class KnowsCompositor;
+ class ShadowableLayer;
+ class ShadowLayerForwarder;
+@@ -420,21 +419,16 @@ public:
+   virtual already_AddRefed<ImageLayer> CreateImageLayer() = 0;
+   /**
+    * CONSTRUCTION PHASE ONLY
+    * Create a ColorLayer for this manager's layer tree.
+    */
+   virtual already_AddRefed<ColorLayer> CreateColorLayer() = 0;
+   /**
+    * CONSTRUCTION PHASE ONLY
+-   * Create a BorderLayer for this manager's layer tree.
+-   */
+-  virtual already_AddRefed<BorderLayer> CreateBorderLayer() = 0;
+-  /**
+-   * CONSTRUCTION PHASE ONLY
+    * Create a CanvasLayer for this manager's layer tree.
+    */
+   virtual already_AddRefed<CanvasLayer> CreateCanvasLayer() = 0;
+   /**
+    * CONSTRUCTION PHASE ONLY
+    * Create a ReadbackLayer for this manager's layer tree.
+    */
+   virtual already_AddRefed<ReadbackLayer> CreateReadbackLayer() { return nullptr; }
+@@ -787,17 +781,16 @@ class Layer {
+ public:
+   // Keep these in alphabetical order
+   enum LayerType {
+     TYPE_CANVAS,
+     TYPE_COLOR,
+     TYPE_CONTAINER,
+     TYPE_DISPLAYITEM,
+     TYPE_IMAGE,
+-    TYPE_BORDER,
+     TYPE_READBACK,
+     TYPE_REF,
+     TYPE_SHADOW,
+     TYPE_PAINTED
+   };
+ 
+   /**
+    * Returns the LayerManager this Layer belongs to. Note that the layer
+@@ -1507,22 +1500,16 @@ public:
+ 
+    /**
+     * Dynamic cast to a Color. Returns null if this is not a
+     * ColorLayer.
+     */
+   virtual ColorLayer* AsColorLayer() { return nullptr; }
+ 
+   /**
+-    * Dynamic cast to a Border. Returns null if this is not a
+-    * ColorLayer.
+-    */
+-  virtual BorderLayer* AsBorderLayer() { return nullptr; }
+-
+-  /**
+     * Dynamic cast to a Canvas. Returns null if this is not a
+     * ColorLayer.
+     */
+   virtual CanvasLayer* AsCanvasLayer() { return nullptr; }
+ 
+   /**
+     * Dynamic cast to an Image. Returns null if this is not a
+     * ColorLayer.
+@@ -2410,96 +2397,16 @@ protected:
+ 
+   virtual void DumpPacket(layerscope::LayersPacket* aPacket, const void* aParent) override;
+ 
+   gfx::IntRect mBounds;
+   gfx::Color mColor;
+ };
+ 
+ /**
+- * A Layer which renders a rounded rect.
+- */
+-class BorderLayer : public Layer {
+-public:
+-  virtual BorderLayer* AsBorderLayer() override { return this; }
+-
+-  /**
+-   * CONSTRUCTION PHASE ONLY
+-   * Set the color of the layer.
+-   */
+-
+-  // Colors of each side as in css::Side
+-  virtual void SetColors(const BorderColors& aColors)
+-  {
+-    MOZ_LAYERS_LOG_IF_SHADOWABLE(this, ("Layer::Mutated(%p) Colors", this));
+-    PodCopy(&mColors[0], &aColors[0], 4);
+-    Mutated();
+-  }
+-
+-  virtual void SetRect(const LayerRect& aRect)
+-  {
+-    MOZ_LAYERS_LOG_IF_SHADOWABLE(this, ("Layer::Mutated(%p) Rect", this));
+-    mRect = aRect;
+-    Mutated();
+-  }
+-
+-  // Size of each rounded corner as in css::Corner, 0.0 means a
+-  // rectangular corner.
+-  virtual void SetCornerRadii(const BorderCorners& aCorners)
+-  {
+-    MOZ_LAYERS_LOG_IF_SHADOWABLE(this, ("Layer::Mutated(%p) Corners", this));
+-    PodCopy(&mCorners[0], &aCorners[0], 4);
+-    Mutated();
+-  }
+-
+-  virtual void SetWidths(const BorderWidths& aWidths)
+-  {
+-    MOZ_LAYERS_LOG_IF_SHADOWABLE(this, ("Layer::Mutated(%p) Widths", this));
+-    PodCopy(&mWidths[0], &aWidths[0], 4);
+-    Mutated();
+-  }
+-
+-  virtual void SetStyles(const BorderStyles& aBorderStyles)
+-  {
+-    MOZ_LAYERS_LOG_IF_SHADOWABLE(this, ("Layer::Mutated(%p) Widths", this));
+-    PodCopy(&mBorderStyles[0], &aBorderStyles[0], 4);
+-    Mutated();
+-  }
+-
+-  MOZ_LAYER_DECL_NAME("BorderLayer", TYPE_BORDER)
+-
+-  virtual void ComputeEffectiveTransforms(const gfx::Matrix4x4& aTransformToSurface) override
+-  {
+-    gfx::Matrix4x4 idealTransform = GetLocalTransform() * aTransformToSurface;
+-    mEffectiveTransform = SnapTransformTranslation(idealTransform, nullptr);
+-    ComputeEffectiveTransformForMaskLayers(aTransformToSurface);
+-  }
+-
+-  const BorderColors& GetColors() { return mColors; }
+-  const LayerRect& GetRect() { return mRect; }
+-  const BorderCorners& GetCorners() { return mCorners; }
+-  const BorderWidths& GetWidths() { return mWidths; }
+-
+-protected:
+-  BorderLayer(LayerManager* aManager, void* aImplData)
+-    : Layer(aManager, aImplData)
+-  {}
+-
+-  virtual void PrintInfo(std::stringstream& aStream, const char* aPrefix) override;
+-
+-  virtual void DumpPacket(layerscope::LayersPacket* aPacket, const void* aParent) override;
+-
+-  BorderColors mColors;
+-  LayerRect mRect;
+-  BorderCorners mCorners;
+-  BorderWidths mWidths;
+-  BorderStyles mBorderStyles;
+-};
+-
+-/**
+  * A Layer for HTML Canvas elements.  It's backed by either a
+  * gfxASurface or a GLContext (for WebGL layers), and has some control
+  * for intelligent updating from the source if necessary (for example,
+  * if hardware compositing is not available, for reading from the GL
+  * buffer into an image surface that we can layer composite.)
+  *
+  * After Initialize is called, the underlying canvas Surface/GLContext
+  * must not be modified during a layer transaction.
+diff --git a/gfx/layers/basic/BasicBorderLayer.cpp b/gfx/layers/basic/BasicBorderLayer.cpp
+deleted file mode 100644
+--- a/gfx/layers/basic/BasicBorderLayer.cpp
++++ /dev/null
+@@ -1,84 +0,0 @@
+-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+-/* vim: set ts=8 sts=2 et sw=2 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 "BasicLayersImpl.h"            // for FillRectWithMask, etc
+-#include "Layers.h"                     // for ColorLayer, etc
+-#include "BasicImplData.h"              // for BasicImplData
+-#include "BasicLayers.h"                // for BasicLayerManager
+-#include "gfxContext.h"                 // for gfxContext, etc
+-#include "gfxRect.h"                    // for gfxRect
+-#include "gfx2DGlue.h"
+-#include "mozilla/mozalloc.h"           // for operator new
+-#include "nsCOMPtr.h"                   // for already_AddRefed
+-#include "nsDebug.h"                    // for NS_ASSERTION
+-#include "nsISupportsImpl.h"            // for Layer::AddRef, etc
+-#include "nsRect.h"                     // for mozilla::gfx::IntRect
+-#include "nsRegion.h"                   // for nsIntRegion
+-#include "mozilla/gfx/PathHelpers.h"
+-
+-using namespace mozilla::gfx;
+-
+-namespace mozilla {
+-namespace layers {
+-
+-class BasicBorderLayer : public BorderLayer, public BasicImplData {
+-public:
+-  explicit BasicBorderLayer(BasicLayerManager* aLayerManager) :
+-    BorderLayer(aLayerManager, static_cast<BasicImplData*>(this))
+-  {
+-    MOZ_COUNT_CTOR(BasicBorderLayer);
+-  }
+-
+-protected:
+-  virtual ~BasicBorderLayer()
+-  {
+-    MOZ_COUNT_DTOR(BasicBorderLayer);
+-  }
+-
+-public:
+-  virtual void SetVisibleRegion(const LayerIntRegion& aRegion) override
+-  {
+-    NS_ASSERTION(BasicManager()->InConstruction(),
+-                 "Can only set properties in construction phase");
+-    BorderLayer::SetVisibleRegion(aRegion);
+-  }
+-
+-  virtual void Paint(DrawTarget* aDT,
+-                     const gfx::Point& aDeviceOffset,
+-                     Layer* aMaskLayer) override
+-  {
+-    if (IsHidden()) {
+-      return;
+-    }
+-
+-    // We currently assume that we never have rounded corners,
+-    // and that all borders have the same width and color.
+-
+-    ColorPattern color(mColors[0]);
+-    StrokeOptions strokeOptions(mWidths[0]);
+-
+-    Rect rect = mRect.ToUnknownRect();
+-    rect.Deflate(mWidths[0] / 2.0);
+-    aDT->StrokeRect(rect, color, strokeOptions);
+-  }
+-
+-protected:
+-  BasicLayerManager* BasicManager()
+-  {
+-    return static_cast<BasicLayerManager*>(mManager);
+-  }
+-};
+-
+-already_AddRefed<BorderLayer>
+-BasicLayerManager::CreateBorderLayer()
+-{
+-  NS_ASSERTION(InConstruction(), "Only allowed in construction phase");
+-  RefPtr<BorderLayer> layer = new BasicBorderLayer(this);
+-  return layer.forget();
+-}
+-
+-} // namespace layers
+-} // namespace mozilla
+diff --git a/gfx/layers/basic/BasicLayers.h b/gfx/layers/basic/BasicLayers.h
+--- a/gfx/layers/basic/BasicLayers.h
++++ b/gfx/layers/basic/BasicLayers.h
+@@ -109,17 +109,16 @@ public:
+ 
+   virtual void SetRoot(Layer* aLayer) override;
+ 
+   virtual already_AddRefed<PaintedLayer> CreatePaintedLayer() override;
+   virtual already_AddRefed<ContainerLayer> CreateContainerLayer() override;
+   virtual already_AddRefed<ImageLayer> CreateImageLayer() override;
+   virtual already_AddRefed<CanvasLayer> CreateCanvasLayer() override;
+   virtual already_AddRefed<ColorLayer> CreateColorLayer() override;
+-  virtual already_AddRefed<BorderLayer> CreateBorderLayer() override;
+   virtual already_AddRefed<ReadbackLayer> CreateReadbackLayer() override;
+   virtual ImageFactory *GetImageFactory();
+ 
+   virtual LayersBackend GetBackendType() override { return LayersBackend::LAYERS_BASIC; }
+   virtual void GetBackendName(nsAString& name) override { name.AssignLiteral("Basic"); }
+ 
+   bool InConstruction() { return mPhase == PHASE_CONSTRUCTION; }
+ #ifdef DEBUG
+diff --git a/gfx/layers/client/ClientBorderLayer.cpp b/gfx/layers/client/ClientBorderLayer.cpp
+deleted file mode 100644
+--- a/gfx/layers/client/ClientBorderLayer.cpp
++++ /dev/null
+@@ -1,75 +0,0 @@
+-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+-/* vim: set ts=8 sts=2 et sw=2 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 "ClientLayerManager.h"         // for ClientLayerManager, etc
+-#include "Layers.h"                     // for ColorLayer, etc
+-#include "mozilla/layers/LayersMessages.h"  // for ColorLayerAttributes, etc
+-#include "mozilla/mozalloc.h"           // for operator new
+-#include "nsCOMPtr.h"                   // for already_AddRefed
+-#include "nsDebug.h"                    // for NS_ASSERTION
+-#include "nsISupportsImpl.h"            // for Layer::AddRef, etc
+-#include "nsRegion.h"                   // for nsIntRegion
+-
+-namespace mozilla {
+-namespace layers {
+-
+-using namespace mozilla::gfx;
+-
+-class ClientBorderLayer : public BorderLayer,
+-                          public ClientLayer {
+-public:
+-  explicit ClientBorderLayer(ClientLayerManager* aLayerManager) :
+-    BorderLayer(aLayerManager, static_cast<ClientLayer*>(this))
+-  {
+-    MOZ_COUNT_CTOR(ClientBorderLayer);
+-  }
+-
+-protected:
+-  virtual ~ClientBorderLayer()
+-  {
+-    MOZ_COUNT_DTOR(ClientBorderLayer);
+-  }
+-
+-public:
+-  virtual void SetVisibleRegion(const LayerIntRegion& aRegion) override
+-  {
+-    NS_ASSERTION(ClientManager()->InConstruction(),
+-                 "Can only set properties in construction phase");
+-    BorderLayer::SetVisibleRegion(aRegion);
+-  }
+-
+-  virtual void RenderLayer() override
+-  {
+-    RenderMaskLayers(this);
+-  }
+-
+-  virtual void FillSpecificAttributes(SpecificLayerAttributes& aAttrs) override
+-  {
+-    aAttrs = BorderLayerAttributes(mRect, mColors, mCorners, mWidths);
+-  }
+-
+-  virtual Layer* AsLayer() override { return this; }
+-  virtual ShadowableLayer* AsShadowableLayer() override { return this; }
+-
+-protected:
+-  ClientLayerManager* ClientManager()
+-  {
+-    return static_cast<ClientLayerManager*>(mManager);
+-  }
+-};
+-
+-already_AddRefed<BorderLayer>
+-ClientLayerManager::CreateBorderLayer()
+-{
+-  NS_ASSERTION(InConstruction(), "Only allowed in construction phase");
+-  RefPtr<ClientBorderLayer> layer =
+-    new ClientBorderLayer(this);
+-  CREATE_SHADOW(Border);
+-  return layer.forget();
+-}
+-
+-} // namespace layers
+-} // namespace mozilla
+diff --git a/gfx/layers/client/ClientLayerManager.h b/gfx/layers/client/ClientLayerManager.h
+--- a/gfx/layers/client/ClientLayerManager.h
++++ b/gfx/layers/client/ClientLayerManager.h
+@@ -101,17 +101,16 @@ public:
+ 
+   virtual already_AddRefed<PaintedLayer> CreatePaintedLayer() override;
+   virtual already_AddRefed<PaintedLayer> CreatePaintedLayerWithHint(PaintedLayerCreationHint aHint) override;
+   virtual already_AddRefed<ContainerLayer> CreateContainerLayer() override;
+   virtual already_AddRefed<ImageLayer> CreateImageLayer() override;
+   virtual already_AddRefed<CanvasLayer> CreateCanvasLayer() override;
+   virtual already_AddRefed<ReadbackLayer> CreateReadbackLayer() override;
+   virtual already_AddRefed<ColorLayer> CreateColorLayer() override;
+-  virtual already_AddRefed<BorderLayer> CreateBorderLayer() override;
+   virtual already_AddRefed<RefLayer> CreateRefLayer() override;
+ 
+   virtual void UpdateTextureFactoryIdentifier(const TextureFactoryIdentifier& aNewIdentifier) override;
+   virtual TextureFactoryIdentifier GetTextureFactoryIdentifier() override
+   {
+     return AsShadowForwarder()->GetTextureFactoryIdentifier();
+   }
+ 
+diff --git a/gfx/layers/composite/LayerManagerComposite.cpp b/gfx/layers/composite/LayerManagerComposite.cpp
+--- a/gfx/layers/composite/LayerManagerComposite.cpp
++++ b/gfx/layers/composite/LayerManagerComposite.cpp
+@@ -1228,60 +1228,16 @@ LayerManagerComposite::HandlePixelsTarge
+   GLContext* gl = compositor->gl();
+   MOZ_ASSERT(gl);
+   gl->fReadPixels(0, 0, bufferWidth, bufferHeight, LOCAL_GL_RGBA, LOCAL_GL_UNSIGNED_BYTE, mem.get<uint8_t>());
+   Unused << mScreenPixelsTarget->SendScreenPixels(mem, ScreenIntSize(bufferWidth, bufferHeight));
+   mScreenPixelsTarget = nullptr;
+ }
+ #endif
+ 
+-class BorderLayerComposite : public BorderLayer,
+-                             public LayerComposite
+-{
+-public:
+-  explicit BorderLayerComposite(LayerManagerComposite *aManager)
+-    : BorderLayer(aManager, nullptr)
+-    , LayerComposite(aManager)
+-  {
+-    MOZ_COUNT_CTOR(BorderLayerComposite);
+-    mImplData = static_cast<LayerComposite*>(this);
+-  }
+-
+-protected:
+-  ~BorderLayerComposite()
+-  {
+-    MOZ_COUNT_DTOR(BorderLayerComposite);
+-    Destroy();
+-  }
+-
+-public:
+-  // LayerComposite Implementation
+-  virtual Layer* GetLayer() override { return this; }
+-
+-  virtual void SetLayerManager(HostLayerManager* aManager) override
+-  {
+-    LayerComposite::SetLayerManager(aManager);
+-    mManager = aManager;
+-  }
+-
+-  virtual void Destroy() override { mDestroyed = true; }
+-
+-  virtual void RenderLayer(const gfx::IntRect& aClipRect,
+-                           const Maybe<gfx::Polygon>& aGeometry) override {}
+-  virtual void CleanupResources() override {};
+-
+-  virtual void GenEffectChain(EffectChain& aEffect) override {}
+-
+-  CompositableHost* GetCompositableHost() override { return nullptr; }
+-
+-  virtual HostLayer* AsHostLayer() override { return this; }
+-
+-  virtual const char* Name() const override { return "BorderLayerComposite"; }
+-};
+-
+ already_AddRefed<PaintedLayer>
+ LayerManagerComposite::CreatePaintedLayer()
+ {
+   if (mDestroyed) {
+     NS_WARNING("Call on destroyed layer manager");
+     return nullptr;
+   }
+   return RefPtr<PaintedLayer>(new PaintedLayerComposite(this)).forget();
+@@ -1332,26 +1288,16 @@ LayerManagerComposite::CreateRefLayer()
+ {
+   if (LayerManagerComposite::mDestroyed) {
+     NS_WARNING("Call on destroyed layer manager");
+     return nullptr;
+   }
+   return RefPtr<RefLayer>(new RefLayerComposite(this)).forget();
+ }
+ 
+-already_AddRefed<BorderLayer>
+-LayerManagerComposite::CreateBorderLayer()
+-{
+-  if (LayerManagerComposite::mDestroyed) {
+-    NS_WARNING("Call on destroyed layer manager");
+-    return nullptr;
+-  }
+-  return RefPtr<BorderLayer>(new BorderLayerComposite(this)).forget();
+-}
+-
+ LayerManagerComposite::AutoAddMaskEffect::AutoAddMaskEffect(Layer* aMaskLayer,
+                                                             EffectChain& aEffects)
+   : mCompositable(nullptr), mFailed(false)
+ {
+   if (!aMaskLayer) {
+     return;
+   }
+ 
+diff --git a/gfx/layers/composite/LayerManagerComposite.h b/gfx/layers/composite/LayerManagerComposite.h
+--- a/gfx/layers/composite/LayerManagerComposite.h
++++ b/gfx/layers/composite/LayerManagerComposite.h
+@@ -299,17 +299,16 @@ public:
+   virtual bool CanUseCanvasLayerForSize(const gfx::IntSize &aSize) override;
+ 
+   virtual void ClearCachedResources(Layer* aSubtree = nullptr) override;
+ 
+   virtual already_AddRefed<PaintedLayer> CreatePaintedLayer() override;
+   virtual already_AddRefed<ContainerLayer> CreateContainerLayer() override;
+   virtual already_AddRefed<ImageLayer> CreateImageLayer() override;
+   virtual already_AddRefed<ColorLayer> CreateColorLayer() override;
+-  virtual already_AddRefed<BorderLayer> CreateBorderLayer() override;
+   virtual already_AddRefed<CanvasLayer> CreateCanvasLayer() override;
+   virtual already_AddRefed<RefLayer> CreateRefLayer() override;
+ 
+   virtual bool AreComponentAlphaLayersEnabled() override;
+ 
+   virtual already_AddRefed<DrawTarget>
+     CreateOptimalMaskDrawTarget(const IntSize &aSize) override;
+ 
+diff --git a/gfx/layers/ipc/LayerTransactionParent.cpp b/gfx/layers/ipc/LayerTransactionParent.cpp
+--- a/gfx/layers/ipc/LayerTransactionParent.cpp
++++ b/gfx/layers/ipc/LayerTransactionParent.cpp
+@@ -231,27 +231,16 @@ LayerTransactionParent::RecvUpdate(const
+       RefPtr<ColorLayer> layer = mLayerManager->CreateColorLayer();
+       if (!BindLayer(layer, edit.get_OpCreateColorLayer())) {
+         return IPC_FAIL_NO_REASON(this);
+       }
+ 
+       UpdateHitTestingTree(layer, "CreateColorLayer");
+       break;
+     }
+-    case Edit::TOpCreateBorderLayer: {
+-      MOZ_LAYERS_LOG(("[ParentSide] CreateBorderLayer"));
+-
+-      RefPtr<BorderLayer> layer = mLayerManager->CreateBorderLayer();
+-      if (!BindLayer(layer, edit.get_OpCreateBorderLayer())) {
+-        return IPC_FAIL_NO_REASON(this);
+-      }
+-
+-      UpdateHitTestingTree(layer, "CreateBorderLayer");
+-      break;
+-    }
+     case Edit::TOpCreateCanvasLayer: {
+       MOZ_LAYERS_LOG(("[ParentSide] CreateCanvasLayer"));
+ 
+       RefPtr<CanvasLayer> layer = mLayerManager->CreateCanvasLayer();
+       if (!BindLayer(layer, edit.get_OpCreateCanvasLayer())) {
+         return IPC_FAIL_NO_REASON(this);
+       }
+ 
+@@ -596,29 +585,16 @@ LayerTransactionParent::SetLayerAttribut
+     ColorLayer* colorLayer = layer->AsColorLayer();
+     if (!colorLayer) {
+       return false;
+     }
+     colorLayer->SetColor(specific.get_ColorLayerAttributes().color().value());
+     colorLayer->SetBounds(specific.get_ColorLayerAttributes().bounds());
+     break;
+   }
+-  case Specific::TBorderLayerAttributes: {
+-    MOZ_LAYERS_LOG(("[ParentSide]   border layer"));
+-
+-    BorderLayer* borderLayer = layer->AsBorderLayer();
+-    if (!borderLayer) {
+-      return false;
+-    }
+-    borderLayer->SetRect(specific.get_BorderLayerAttributes().rect());
+-    borderLayer->SetColors(specific.get_BorderLayerAttributes().colors());
+-    borderLayer->SetCornerRadii(specific.get_BorderLayerAttributes().corners());
+-    borderLayer->SetWidths(specific.get_BorderLayerAttributes().widths());
+-    break;
+-  }
+   case Specific::TCanvasLayerAttributes: {
+     MOZ_LAYERS_LOG(("[ParentSide]   canvas layer"));
+ 
+     CanvasLayer* canvasLayer = layer->AsCanvasLayer();
+     if (!canvasLayer) {
+       return false;
+     }
+     canvasLayer->SetSamplingFilter(specific.get_CanvasLayerAttributes().samplingFilter());
+diff --git a/gfx/layers/ipc/LayersMessages.ipdlh b/gfx/layers/ipc/LayersMessages.ipdlh
+--- a/gfx/layers/ipc/LayersMessages.ipdlh
++++ b/gfx/layers/ipc/LayersMessages.ipdlh
+@@ -41,19 +41,16 @@ using mozilla::layers::EventRegions from
+ using mozilla::layers::EventRegionsOverride from "mozilla/layers/LayersTypes.h";
+ using mozilla::layers::DiagnosticTypes from "mozilla/layers/CompositorTypes.h";
+ using mozilla::layers::FocusTarget from "mozilla/layers/FocusTarget.h";
+ using struct mozilla::layers::ScrollMetadata from "FrameMetrics.h";
+ using mozilla::layers::FrameMetrics::ViewID from "FrameMetrics.h";
+ using mozilla::layers::LayersBackend from "mozilla/layers/LayersTypes.h";
+ using mozilla::layers::MaybeLayerClip from "FrameMetrics.h";
+ using mozilla::gfx::Glyph from "Layers.h";
+-using mozilla::layers::BorderColors from "mozilla/layers/LayersTypes.h";
+-using mozilla::layers::BorderCorners from "mozilla/layers/LayersTypes.h";
+-using mozilla::layers::BorderWidths from "mozilla/layers/LayersTypes.h";
+ using mozilla::layers::LayerHandle from "mozilla/layers/LayersTypes.h";
+ using mozilla::layers::CompositableHandle from "mozilla/layers/LayersTypes.h";
+ using mozilla::layers::SimpleLayerAttributes from "mozilla/layers/LayerAttributes.h";
+ using mozilla::CrossProcessSemaphoreHandle from "mozilla/ipc/CrossProcessSemaphore.h";
+ using struct mozilla::void_t from "ipc/IPCMessageUtils.h";
+ using mozilla::layers::LayersId from "mozilla/layers/LayersTypes.h";
+ 
+ namespace mozilla {
+@@ -66,17 +63,16 @@ struct TargetConfig {
+   nsIntRegion clearRegion;
+ };
+ 
+ // Create a shadow layer for |layer|
+ struct OpCreatePaintedLayer    { LayerHandle layer; };
+ struct OpCreateContainerLayer  { LayerHandle layer; };
+ struct OpCreateImageLayer      { LayerHandle layer; };
+ struct OpCreateColorLayer      { LayerHandle layer; };
+-struct OpCreateBorderLayer       { LayerHandle layer; };
+ struct OpCreateCanvasLayer     { LayerHandle layer; };
+ struct OpCreateRefLayer        { LayerHandle layer; };
+ 
+ struct OpAttachCompositable {
+   LayerHandle layer;
+   CompositableHandle compositable;
+ };
+ 
+@@ -305,32 +301,25 @@ struct GlyphArray
+ 
+ struct ColorLayerAttributes     { LayerColor color; IntRect bounds; };
+ struct CanvasLayerAttributes    { SamplingFilter samplingFilter; IntRect bounds; };
+ struct RefLayerAttributes {
+   LayersId id;
+   EventRegionsOverride eventRegionsOverride;
+ };
+ struct ImageLayerAttributes     { SamplingFilter samplingFilter; IntSize scaleToSize; ScaleMode scaleMode; };
+-struct BorderLayerAttributes {
+-  LayerRect rect;
+-  BorderColors colors;
+-  BorderCorners corners;
+-  BorderWidths widths;
+-};
+ 
+ union SpecificLayerAttributes {
+   null_t;
+   PaintedLayerAttributes;
+   ContainerLayerAttributes;
+   ColorLayerAttributes;
+   CanvasLayerAttributes;
+   RefLayerAttributes;
+   ImageLayerAttributes;
+-  BorderLayerAttributes;
+ };
+ 
+ struct LayerAttributes {
+   CommonLayerAttributes common;
+   SpecificLayerAttributes specific;
+ };
+ 
+ struct OpSetSimpleLayerAttributes {
+@@ -483,17 +472,16 @@ struct CompositableOperation {
+ // A unit of a changeset; a set of these comprise a changeset
+ // If adding a new edit type that requires the hit testing tree to be updated,
+ // set the updateHitTestingTree flag to true in RecvUpdate()
+ union Edit {
+   OpCreatePaintedLayer;
+   OpCreateContainerLayer;
+   OpCreateImageLayer;
+   OpCreateColorLayer;
+-  OpCreateBorderLayer;
+   OpCreateCanvasLayer;
+   OpCreateRefLayer;
+ 
+   OpSetDiagnosticTypes;
+   OpWindowOverlayChanged;
+ 
+   OpSetRoot;
+   OpInsertAfter;
+diff --git a/gfx/layers/ipc/ShadowLayers.cpp b/gfx/layers/ipc/ShadowLayers.cpp
+--- a/gfx/layers/ipc/ShadowLayers.cpp
++++ b/gfx/layers/ipc/ShadowLayers.cpp
+@@ -318,21 +318,16 @@ ShadowLayerForwarder::CreatedImageLayer(
+   CreatedLayer<OpCreateImageLayer>(mTxn, aImage);
+ }
+ void
+ ShadowLayerForwarder::CreatedColorLayer(ShadowableLayer* aColor)
+ {
+   CreatedLayer<OpCreateColorLayer>(mTxn, aColor);
+ }
+ void
+-ShadowLayerForwarder::CreatedBorderLayer(ShadowableLayer* aBorder)
+-{
+-  CreatedLayer<OpCreateBorderLayer>(mTxn, aBorder);
+-}
+-void
+ ShadowLayerForwarder::CreatedCanvasLayer(ShadowableLayer* aCanvas)
+ {
+   CreatedLayer<OpCreateCanvasLayer>(mTxn, aCanvas);
+ }
+ void
+ ShadowLayerForwarder::CreatedRefLayer(ShadowableLayer* aRef)
+ {
+   CreatedLayer<OpCreateRefLayer>(mTxn, aRef);
+diff --git a/gfx/layers/ipc/ShadowLayers.h b/gfx/layers/ipc/ShadowLayers.h
+--- a/gfx/layers/ipc/ShadowLayers.h
++++ b/gfx/layers/ipc/ShadowLayers.h
+@@ -172,17 +172,16 @@ public:
+    * the compositing process.
+    */
+   void CreatedPaintedLayer(ShadowableLayer* aThebes);
+   void CreatedContainerLayer(ShadowableLayer* aContainer);
+   void CreatedImageLayer(ShadowableLayer* aImage);
+   void CreatedColorLayer(ShadowableLayer* aColor);
+   void CreatedCanvasLayer(ShadowableLayer* aCanvas);
+   void CreatedRefLayer(ShadowableLayer* aRef);
+-  void CreatedBorderLayer(ShadowableLayer* aRef);
+ 
+   /**
+    * At least one attribute of |aMutant| has changed, and |aMutant|
+    * needs to sync to its shadow layer.  This initial implementation
+    * forwards all attributes when any of the appropriate attribute
+    * set is mutated.
+    */
+   void Mutated(ShadowableLayer* aMutant);
+diff --git a/gfx/layers/mlgpu/LayerManagerMLGPU.cpp b/gfx/layers/mlgpu/LayerManagerMLGPU.cpp
+--- a/gfx/layers/mlgpu/LayerManagerMLGPU.cpp
++++ b/gfx/layers/mlgpu/LayerManagerMLGPU.cpp
+@@ -152,23 +152,16 @@ LayerManagerMLGPU::CreatePaintedLayer()
+ }
+ 
+ already_AddRefed<ImageLayer>
+ LayerManagerMLGPU::CreateImageLayer()
+ {
+   return MakeAndAddRef<ImageLayerMLGPU>(this);
+ }
+ 
+-already_AddRefed<BorderLayer>
+-LayerManagerMLGPU::CreateBorderLayer()
+-{
+-  MOZ_ASSERT_UNREACHABLE("Not yet implemented");
+-  return nullptr;
+-}
+-
+ already_AddRefed<CanvasLayer>
+ LayerManagerMLGPU::CreateCanvasLayer()
+ {
+   return MakeAndAddRef<CanvasLayerMLGPU>(this);
+ }
+ 
+ TextureFactoryIdentifier
+ LayerManagerMLGPU::GetTextureFactoryIdentifier()
+diff --git a/gfx/layers/mlgpu/LayerManagerMLGPU.h b/gfx/layers/mlgpu/LayerManagerMLGPU.h
+--- a/gfx/layers/mlgpu/LayerManagerMLGPU.h
++++ b/gfx/layers/mlgpu/LayerManagerMLGPU.h
+@@ -41,17 +41,16 @@ public:
+   void BeginTransactionWithDrawTarget(gfx::DrawTarget* aTarget, const gfx::IntRect& aRect) override;
+   void SetRoot(Layer* aLayer) override;
+   already_AddRefed<PaintedLayer> CreatePaintedLayer() override;
+   already_AddRefed<ContainerLayer> CreateContainerLayer() override;
+   already_AddRefed<ImageLayer> CreateImageLayer() override;
+   already_AddRefed<ColorLayer> CreateColorLayer() override;
+   already_AddRefed<CanvasLayer> CreateCanvasLayer() override;
+   already_AddRefed<RefLayer> CreateRefLayer() override;
+-  already_AddRefed<BorderLayer> CreateBorderLayer() override;
+ 
+   bool AreComponentAlphaLayersEnabled() override;
+   bool BlendingRequiresIntermediateSurface() override;
+ 
+   // HostLayerManager methods
+   void ForcePresent() override;
+   TextureFactoryIdentifier GetTextureFactoryIdentifier() override;
+   LayersBackend GetBackendType() override;
+diff --git a/gfx/layers/moz.build b/gfx/layers/moz.build
+--- a/gfx/layers/moz.build
++++ b/gfx/layers/moz.build
+@@ -331,32 +331,30 @@ UNIFIED_SOURCES += [
+     'apz/util/ContentProcessController.cpp',
+     'apz/util/DoubleTapToZoom.cpp',
+     'apz/util/InputAPZContext.cpp',
+     'apz/util/ScrollLinkedEffectDetector.cpp',
+     'apz/util/TouchActionHelper.cpp',
+     'AsyncCanvasRenderer.cpp',
+     'AxisPhysicsModel.cpp',
+     'AxisPhysicsMSDModel.cpp',
+-    'basic/BasicBorderLayer.cpp',
+     'basic/BasicCanvasLayer.cpp',
+     'basic/BasicColorLayer.cpp',
+     'basic/BasicCompositor.cpp',
+     'basic/BasicContainerLayer.cpp',
+     'basic/BasicImages.cpp',
+     'basic/BasicLayerManager.cpp',
+     'basic/BasicLayersImpl.cpp',
+     'basic/BasicPaintedLayer.cpp',
+     'basic/TextureHostBasic.cpp',
+     'BSPTree.cpp',
+     'BufferTexture.cpp',
+     'BufferUnrotate.cpp',
+     'CanvasRenderer.cpp',
+     'client/CanvasClient.cpp',
+-    'client/ClientBorderLayer.cpp',
+     'client/ClientCanvasLayer.cpp',
+     'client/ClientCanvasRenderer.cpp',
+     'client/ClientColorLayer.cpp',
+     'client/ClientContainerLayer.cpp',
+     'client/ClientImageLayer.cpp',
+     'client/ClientLayerManager.cpp',
+     'client/ClientPaintedLayer.cpp',
+     'client/ClientTiledPaintedLayer.cpp',
+diff --git a/gfx/layers/wr/WebRenderLayerManager.h b/gfx/layers/wr/WebRenderLayerManager.h
+--- a/gfx/layers/wr/WebRenderLayerManager.h
++++ b/gfx/layers/wr/WebRenderLayerManager.h
+@@ -81,17 +81,16 @@ public:
+   virtual const char* Name() const override { return "WebRender"; }
+ 
+   virtual void SetRoot(Layer* aLayer) override;
+ 
+   already_AddRefed<PaintedLayer> CreatePaintedLayer() override { return nullptr; }
+   already_AddRefed<ContainerLayer> CreateContainerLayer() override { return nullptr; }
+   already_AddRefed<ImageLayer> CreateImageLayer() override { return nullptr; }
+   already_AddRefed<ColorLayer> CreateColorLayer() override { return nullptr; }
+-  already_AddRefed<BorderLayer> CreateBorderLayer() override { return nullptr; }
+   already_AddRefed<CanvasLayer> CreateCanvasLayer() override { return nullptr; }
+ 
+   virtual bool NeedsWidgetInvalidation() override { return false; }
+ 
+   virtual void SetLayerObserverEpoch(uint64_t aLayerObserverEpoch) override;
+ 
+   virtual void DidComposite(uint64_t aTransactionId,
+                             const mozilla::TimeStamp& aCompositeStart,
+diff --git a/gfx/tests/gtest/TestLayers.cpp b/gfx/tests/gtest/TestLayers.cpp
+--- a/gfx/tests/gtest/TestLayers.cpp
++++ b/gfx/tests/gtest/TestLayers.cpp
+@@ -71,19 +71,16 @@ public:
+   }
+   virtual already_AddRefed<PaintedLayer> CreatePaintedLayer() {
+     RefPtr<PaintedLayer> layer = new TestPaintedLayer(this);
+     return layer.forget();
+   }
+   virtual already_AddRefed<ColorLayer> CreateColorLayer() {
+     MOZ_CRASH("Not implemented.");
+   }
+-  virtual already_AddRefed<BorderLayer> CreateBorderLayer() {
+-    MOZ_CRASH("Not implemented.");
+-  }
+   virtual void SetRoot(Layer* aLayer) {}
+   virtual bool BeginTransactionWithTarget(gfxContext* aTarget) { return true; }
+   virtual already_AddRefed<CanvasLayer> CreateCanvasLayer() {
+     MOZ_CRASH("Not implemented.");
+   }
+   virtual void EndTransaction(DrawPaintedLayerCallback aCallback,
+                               void* aCallbackData,
+                               EndTransactionFlags aFlags = END_DEFAULT) {}
+diff --git a/gfx/thebes/gfxPrefs.h b/gfx/thebes/gfxPrefs.h
+--- a/gfx/thebes/gfxPrefs.h
++++ b/gfx/thebes/gfxPrefs.h
+@@ -540,17 +540,16 @@ private:
+   DECL_GFX_PREF(Once, "image.multithreaded_decoding.idle_timeout", ImageMTDecodingIdleTimeout, int32_t, -1);
+   DECL_GFX_PREF(Live, "image.webp.enabled",                    ImageWebPEnabled, bool, false);
+ 
+   DECL_GFX_PREF(Once, "layers.acceleration.disabled",          LayersAccelerationDisabledDoNotUseDirectly, bool, false);
+   DECL_GFX_PREF(Live, "layers.acceleration.draw-fps",          LayersDrawFPS, bool, false);
+   DECL_GFX_PREF(Live, "layers.acceleration.draw-fps.print-histogram",  FPSPrintHistogram, bool, false);
+   DECL_GFX_PREF(Live, "layers.acceleration.draw-fps.write-to-file", WriteFPSToFile, bool, false);
+   DECL_GFX_PREF(Once, "layers.acceleration.force-enabled",     LayersAccelerationForceEnabledDoNotUseDirectly, bool, false);
+-  DECL_GFX_PREF(Live, "layers.advanced.border-layers",           LayersAllowBorderLayers, bool, false);
+   DECL_GFX_PREF(Live, "layers.advanced.basic-layer.enabled",          LayersAdvancedBasicLayerEnabled, bool, false);
+   DECL_GFX_PREF(Once, "layers.amd-switchable-gfx.enabled",     LayersAMDSwitchableGfxEnabled, bool, false);
+   DECL_GFX_PREF(Once, "layers.async-pan-zoom.enabled",         AsyncPanZoomEnabledDoNotUseDirectly, bool, true);
+   DECL_GFX_PREF(Live, "layers.bench.enabled",                  LayersBenchEnabled, bool, false);
+   DECL_GFX_PREF(Once, "layers.bufferrotation.enabled",         BufferRotationEnabled, bool, true);
+   DECL_GFX_PREF(Live, "layers.child-process-shutdown",         ChildProcessShutdown, bool, true);
+ #ifdef MOZ_GFX_OPTIMIZE_MOBILE
+   // If MOZ_GFX_OPTIMIZE_MOBILE is defined, we force component alpha off
+diff --git a/layout/painting/nsDisplayList.cpp b/layout/painting/nsDisplayList.cpp
+--- a/layout/painting/nsDisplayList.cpp
++++ b/layout/painting/nsDisplayList.cpp
+@@ -5319,17 +5319,16 @@ nsDisplayCaret::CreateWebRenderCommands(
+                       !BackfaceIsHidden(),
+                       wr::ToColorF(color));
+   }
+   return true;
+ }
+ 
+ nsDisplayBorder::nsDisplayBorder(nsDisplayListBuilder* aBuilder, nsIFrame* aFrame)
+   : nsDisplayItem(aBuilder, aFrame)
+-  , mBorderIsEmpty(false)
+ {
+   MOZ_COUNT_CTOR(nsDisplayBorder);
+ 
+   mBounds = CalculateBounds<nsRect>(*mFrame->StyleBorder());
+ }
+ 
+ bool
+ nsDisplayBorder::IsInvisibleInRect(const nsRect& aRect) const
+@@ -5379,100 +5378,17 @@ nsDisplayBorder::ComputeInvalidationRegi
+   }
+ }
+ 
+ LayerState
+ nsDisplayBorder::GetLayerState(nsDisplayListBuilder* aBuilder,
+                                LayerManager* aManager,
+                                const ContainerLayerParameters& aParameters)
+ {
+-  if (!ShouldUseAdvancedLayer(aManager, gfxPrefs::LayersAllowBorderLayers)) {
+-    return LAYER_NONE;
+-  }
+-
+-  mBorderIsEmpty = false;
+-  nsPoint offset = ToReferenceFrame();
+-  Maybe<nsCSSBorderRenderer> br =
+-    nsCSSRendering::CreateBorderRenderer(mFrame->PresContext(),
+-                                         nullptr,
+-                                         mFrame,
+-                                         nsRect(),
+-                                         nsRect(offset, mFrame->GetSize()),
+-                                         mFrame->StyleContext(),
+-                                         &mBorderIsEmpty,
+-                                         mFrame->GetSkipSides());
+-
+-  mBorderRenderer = Nothing();
+-  mBorderImageRenderer = Nothing();
+-  if (!br) {
+-    if (mBorderIsEmpty) {
+-      return LAYER_ACTIVE;
+-    }
+-    return LAYER_NONE;
+-  }
+-
+-  bool hasCompositeColors;
+-  if (!br->AllBordersSolid(&hasCompositeColors) || hasCompositeColors) {
+-    return LAYER_NONE;
+-  }
+-
+-  // We don't support this yet as we don't copy the values to
+-  // the layer, and BasicBorderLayer doesn't support it yet.
+-  if (!br->mNoBorderRadius) {
+-    return LAYER_NONE;
+-  }
+-
+-  // We copy these values correctly to the layer, but BasicBorderLayer
+-  // won't render them
+-  if (!br->AreBorderSideFinalStylesSame(eSideBitsAll) ||
+-      !br->AllBordersSameWidth()) {
+-    return LAYER_NONE;
+-  }
+-
+-  NS_FOR_CSS_SIDES(i) {
+-    if (br->mBorderStyles[i] == NS_STYLE_BORDER_STYLE_SOLID) {
+-      mColors[i] = ToDeviceColor(br->mBorderColors[i]);
+-      mWidths[i] = br->mBorderWidths[i];
+-      mBorderStyles[i] = br->mBorderStyles[i];
+-    } else {
+-      mWidths[i] = 0;
+-    }
+-  }
+-  NS_FOR_CSS_FULL_CORNERS(corner) {
+-    mCorners[corner] = LayerSize(br->mBorderRadii[corner].width, br->mBorderRadii[corner].height);
+-  }
+-
+-  mRect = ViewAs<LayerPixel>(br->mOuterRect);
+-  return LAYER_ACTIVE;
+-}
+-
+-already_AddRefed<Layer>
+-nsDisplayBorder::BuildLayer(nsDisplayListBuilder* aBuilder,
+-                            LayerManager* aManager,
+-                            const ContainerLayerParameters& aContainerParameters)
+-{
+-  if (mBorderIsEmpty) {
+-    return nullptr;
+-  }
+-
+-  RefPtr<BorderLayer> layer = static_cast<BorderLayer*>
+-    (aManager->GetLayerBuilder()->GetLeafLayerFor(aBuilder, this));
+-  if (!layer) {
+-    layer = aManager->CreateBorderLayer();
+-    if (!layer)
+-      return nullptr;
+-  }
+-  layer->SetRect(mRect);
+-  layer->SetCornerRadii(mCorners);
+-  layer->SetColors(mColors);
+-  layer->SetWidths(mWidths);
+-  layer->SetStyles(mBorderStyles);
+-  layer->SetBaseTransform(gfx::Matrix4x4::Translation(aContainerParameters.mOffset.x,
+-                                                      aContainerParameters.mOffset.y, 0));
+-  return layer.forget();
++  return LAYER_NONE;
+ }
+ 
+ bool
+ nsDisplayBorder::CreateWebRenderCommands(mozilla::wr::DisplayListBuilder& aBuilder,
+                                          mozilla::wr::IpcResourceUpdateQueue& aResources,
+                                          const StackingContextHelper& aSc,
+                                          mozilla::layers::WebRenderLayerManager* aManager,
+                                          nsDisplayListBuilder* aDisplayListBuilder)
+@@ -5485,137 +5401,16 @@ nsDisplayBorder::CreateWebRenderCommands
+                                                           aBuilder,
+                                                           aResources,
+                                                           aSc,
+                                                           aManager,
+                                                           aDisplayListBuilder);
+ };
+ 
+ void
+-nsDisplayBorder::CreateBorderImageWebRenderCommands(mozilla::wr::DisplayListBuilder& aBuilder,
+-                                                    mozilla::wr::IpcResourceUpdateQueue& aResources,
+-                                                    const StackingContextHelper& aSc,
+-                                                    mozilla::layers::WebRenderLayerManager* aManager,
+-                                                    nsDisplayListBuilder* aDisplayListBuilder)
+-{
+-  MOZ_ASSERT(mBorderImageRenderer);
+-  if (!mBorderImageRenderer->mImageRenderer.IsReady()) {
+-    return;
+-  }
+-
+-  float widths[4];
+-  float slice[4];
+-  float outset[4];
+-  const int32_t appUnitsPerDevPixel = mFrame->PresContext()->AppUnitsPerDevPixel();
+-  NS_FOR_CSS_SIDES(i) {
+-    slice[i] = (float)(mBorderImageRenderer->mSlice.Side(i)) / appUnitsPerDevPixel;
+-    widths[i] = (float)(mBorderImageRenderer->mWidths.Side(i)) / appUnitsPerDevPixel;
+-    outset[i] = (float)(mBorderImageRenderer->mImageOutset.Side(i)) / appUnitsPerDevPixel;
+-  }
+-
+-  LayoutDeviceRect destRect = LayoutDeviceRect::FromAppUnits(
+-    mBorderImageRenderer->mArea, appUnitsPerDevPixel);
+-  wr::LayoutRect dest = aSc.ToRelativeLayoutRect(destRect);
+-
+-  wr::LayoutRect clip = dest;
+-  if (!mBorderImageRenderer->mClip.IsEmpty()) {
+-    LayoutDeviceRect clipRect = LayoutDeviceRect::FromAppUnits(
+-      mBorderImageRenderer->mClip, appUnitsPerDevPixel);
+-    clip = aSc.ToRelativeLayoutRect(clipRect);
+-  }
+-
+-  switch (mBorderImageRenderer->mImageRenderer.GetType()) {
+-    case eStyleImageType_Image:
+-    {
+-      uint32_t flags = imgIContainer::FLAG_ASYNC_NOTIFY;
+-      if (aDisplayListBuilder->IsPaintingToWindow()) {
+-        flags |= imgIContainer::FLAG_HIGH_QUALITY_SCALING;
+-      }
+-      if (aDisplayListBuilder->ShouldSyncDecodeImages()) {
+-        flags |= imgIContainer::FLAG_SYNC_DECODE;
+-      }
+-
+-      RefPtr<imgIContainer> img = mBorderImageRenderer->mImageRenderer.GetImage();
+-      Maybe<SVGImageContext> svgContext;
+-      gfx::IntSize decodeSize =
+-        nsLayoutUtils::ComputeImageContainerDrawingParameters(img, mFrame, destRect,
+-                                                              aSc, flags, svgContext);
+-      RefPtr<layers::ImageContainer> container =
+-        img->GetImageContainerAtSize(aManager, decodeSize, svgContext, flags);
+-      if (!container) {
+-        return;
+-      }
+-
+-      gfx::IntSize size;
+-      Maybe<wr::ImageKey> key = aManager->CommandBuilder().CreateImageKey(this, container, aBuilder,
+-                                                                          aResources, aSc, size, Nothing());
+-      if (key.isNothing()) {
+-        return;
+-      }
+-
+-      aBuilder.PushBorderImage(dest,
+-                               clip,
+-                               !BackfaceIsHidden(),
+-                               wr::ToBorderWidths(widths[0], widths[1], widths[2], widths[3]),
+-                               key.value(),
+-                               wr::ToNinePatchDescriptor(
+-                                 (float)(mBorderImageRenderer->mImageSize.width) / appUnitsPerDevPixel,
+-                                 (float)(mBorderImageRenderer->mImageSize.height) / appUnitsPerDevPixel,
+-                                 wr::ToSideOffsets2D_u32(slice[0], slice[1], slice[2], slice[3])),
+-                               wr::ToSideOffsets2D_f32(outset[0], outset[1], outset[2], outset[3]),
+-                               wr::ToRepeatMode(mBorderImageRenderer->mRepeatModeHorizontal),
+-                               wr::ToRepeatMode(mBorderImageRenderer->mRepeatModeVertical));
+-      break;
+-    }
+-    case eStyleImageType_Gradient:
+-    {
+-      RefPtr<nsStyleGradient> gradientData = mBorderImageRenderer->mImageRenderer.GetGradientData();
+-      nsCSSGradientRenderer renderer =
+-        nsCSSGradientRenderer::Create(mFrame->PresContext(), gradientData,
+-                                      mBorderImageRenderer->mImageSize);
+-
+-      wr::ExtendMode extendMode;
+-      nsTArray<wr::GradientStop> stops;
+-      LayoutDevicePoint lineStart;
+-      LayoutDevicePoint lineEnd;
+-      LayoutDeviceSize gradientRadius;
+-      renderer.BuildWebRenderParameters(1.0, extendMode, stops, lineStart, lineEnd, gradientRadius);
+-
+-      if (gradientData->mShape == NS_STYLE_GRADIENT_SHAPE_LINEAR) {
+-        LayoutDevicePoint startPoint = LayoutDevicePoint(dest.origin.x, dest.origin.y) + lineStart;
+-        LayoutDevicePoint endPoint = LayoutDevicePoint(dest.origin.x, dest.origin.y) + lineEnd;
+-
+-        aBuilder.PushBorderGradient(dest,
+-                                    clip,
+-                                    !BackfaceIsHidden(),
+-                                    wr::ToBorderWidths(widths[0], widths[1], widths[2], widths[3]),
+-                                    wr::ToLayoutPoint(startPoint),
+-                                    wr::ToLayoutPoint(endPoint),
+-                                    stops,
+-                                    extendMode,
+-                                    wr::ToSideOffsets2D_f32(outset[0], outset[1], outset[2], outset[3]));
+-      } else {
+-        aBuilder.PushBorderRadialGradient(dest,
+-                                          clip,
+-                                          !BackfaceIsHidden(),
+-                                          wr::ToBorderWidths(widths[0], widths[1], widths[2], widths[3]),
+-                                          wr::ToLayoutPoint(lineStart),
+-                                          wr::ToLayoutSize(gradientRadius),
+-                                          stops,
+-                                          extendMode,
+-                                          wr::ToSideOffsets2D_f32(outset[0], outset[1], outset[2], outset[3]));
+-      }
+-      break;
+-    }
+-    default:
+-      MOZ_ASSERT_UNREACHABLE("Unsupport border image type");
+-  }
+-}
+-
+-void
+ nsDisplayBorder::Paint(nsDisplayListBuilder* aBuilder,
+                        gfxContext* aCtx) {
+   nsPoint offset = ToReferenceFrame();
+ 
+   PaintBorderFlags flags = aBuilder->ShouldSyncDecodeImages()
+                          ? PaintBorderFlags::SYNC_DECODE_IMAGES
+                          : PaintBorderFlags();
+ 
+diff --git a/layout/painting/nsDisplayList.h b/layout/painting/nsDisplayList.h
+--- a/layout/painting/nsDisplayList.h
++++ b/layout/painting/nsDisplayList.h
+@@ -3511,19 +3511,16 @@ public:
+ 
+   virtual bool IsInvisibleInRect(const nsRect& aRect) const override;
+   virtual nsRect GetBounds(nsDisplayListBuilder* aBuilder,
+                            bool* aSnap) const override;
+   virtual LayerState GetLayerState(nsDisplayListBuilder* aBuilder,
+                                    LayerManager* aManager,
+                                    const ContainerLayerParameters& aParameters) override;
+ 
+-  virtual already_AddRefed<Layer> BuildLayer(nsDisplayListBuilder* aBuilder,
+-                                             LayerManager* aManager,
+-                                             const ContainerLayerParameters& aContainerParameters) override;
+   virtual bool CreateWebRenderCommands(mozilla::wr::DisplayListBuilder& aBuilder,
+                                        mozilla::wr::IpcResourceUpdateQueue& aResources,
+                                        const StackingContextHelper& aSc,
+                                        mozilla::layers::WebRenderLayerManager* aManager,
+                                        nsDisplayListBuilder* aDisplayListBuilder) override;
+ 
+   virtual void Paint(nsDisplayListBuilder* aBuilder, gfxContext* aCtx) override;
+ 
+@@ -3538,21 +3535,16 @@ public:
+   virtual nsRegion GetTightBounds(nsDisplayListBuilder* aBuilder,
+                                   bool* aSnap) const override
+   {
+     *aSnap = true;
+     return CalculateBounds<nsRegion>(*mFrame->StyleBorder());
+   }
+ 
+ protected:
+-  void CreateBorderImageWebRenderCommands(mozilla::wr::DisplayListBuilder& aBuilder,
+-                                          mozilla::wr::IpcResourceUpdateQueue& aResource,
+-                                          const StackingContextHelper& aSc,
+-                                          mozilla::layers::WebRenderLayerManager* aManager,
+-                                          nsDisplayListBuilder* aDisplayListBuilder);
+   template<typename T>
+   T CalculateBounds(const nsStyleBorder& aStyleBorder) const
+   {
+     nsRect borderBounds(ToReferenceFrame(), mFrame->GetSize());
+     if (aStyleBorder.IsBorderImageLoaded()) {
+       borderBounds.Inflate(aStyleBorder.GetImageOutset());
+       return borderBounds;
+     } else {
+@@ -3589,27 +3581,17 @@ protected:
+           nsSize cornerSize(radii[mozilla::eCornerBottomLeftX], radii[mozilla::eCornerBottomLeftY]);
+           result.OrWith(nsRect(borderBounds.BottomLeft() - nsPoint(0, cornerSize.height), cornerSize));
+         }
+       }
+       return result;
+     }
+   }
+ 
+-  mozilla::Array<mozilla::gfx::Color, 4> mColors;
+-  mozilla::Array<mozilla::LayerCoord, 4> mWidths;
+-  mozilla::Array<mozilla::LayerSize, 4> mCorners;
+-  mozilla::Array<uint8_t, 4> mBorderStyles;
+-  mozilla::LayerRect mRect;
+-
+-  mozilla::Maybe<nsCSSBorderRenderer> mBorderRenderer;
+-  mozilla::Maybe<nsCSSBorderImageRenderer> mBorderImageRenderer;
+-
+   nsRect mBounds;
+-  bool mBorderIsEmpty;
+ };
+ 
+ /**
+  * A simple display item that just renders a solid color across the
+  * specified bounds. For canvas frames (in the CSS sense) we split off the
+  * drawing of the background color into this class (from nsDisplayBackground
+  * via nsDisplayCanvasBackground). This is done so that we can always draw a
+  * background color to avoid ugly flashes of white when we can't draw a full

+ 0 - 0
frg/work-js/mozilla-release/patches/mozilla-central-push_427911.patch → frg/work-js/mozilla-release/patches/1476124-63a1.patch


+ 0 - 0
frg/work-js/mozilla-release/patches/mozilla-central-push_428592.patch → frg/work-js/mozilla-release/patches/1476239-1-63a1.patch


+ 0 - 0
frg/work-js/mozilla-release/patches/mozilla-central-push_428593.patch → frg/work-js/mozilla-release/patches/1476239-2-63a1.patch


+ 0 - 0
frg/work-js/mozilla-release/patches/mozilla-central-push_428594.patch → frg/work-js/mozilla-release/patches/1476239-3-63a1.patch


+ 0 - 0
frg/work-js/mozilla-release/patches/mozilla-central-push_428595.patch → frg/work-js/mozilla-release/patches/1476239-4-63a1.patch


+ 5 - 6
frg/work-js/mozilla-release/patches/mozilla-central-push_428879.patch → frg/work-js/mozilla-release/patches/1476405-3-63a1.patch

@@ -1,7 +1,6 @@
 # HG changeset patch
 # User Kris Maglione <maglione.k@gmail.com>
 # Date 1532053796 25200
-#      Thu Jul 19 19:29:56 2018 -0700
 # Node ID 8db85769e159e32d4bee06ecb44e3c2e40d15303
 # Parent  995910a452a2160283d8f60e38c4c5700b3c1bf9
 Bug 1476405: Part 3 - Use reasonable stack sizes and create wrappers for JS threads. r=erahm,tcampbell
@@ -18,7 +17,7 @@ MozReview-Commit-ID: EuR3gL5JATL
 diff --git a/js/src/vm/HelperThreads.cpp b/js/src/vm/HelperThreads.cpp
 --- a/js/src/vm/HelperThreads.cpp
 +++ b/js/src/vm/HelperThreads.cpp
-@@ -938,17 +938,22 @@ js::EnqueuePendingParseTasksAfterGC(JSRu
+@@ -888,17 +888,22 @@ js::EnqueuePendingParseTasksAfterGC(JSRu
  bool
  js::CurrentThreadIsParseThread()
  {
@@ -45,13 +44,13 @@ diff --git a/js/src/vm/HelperThreads.cpp b/js/src/vm/HelperThreads.cpp
 diff --git a/js/xpconnect/src/XPCJSContext.cpp b/js/xpconnect/src/XPCJSContext.cpp
 --- a/js/xpconnect/src/XPCJSContext.cpp
 +++ b/js/xpconnect/src/XPCJSContext.cpp
-@@ -74,16 +74,20 @@
- 
+@@ -79,16 +79,20 @@
  static MOZ_THREAD_LOCAL(XPCJSContext*) gTlsContext;
  
  using namespace mozilla;
  using namespace xpc;
  using namespace JS;
+ using mozilla::dom::PerThreadAtomCache;
  using mozilla::dom::AutoEntryScript;
  
 +// The watchdog thread loop is pretty trivial, and should not require much stack
@@ -66,7 +65,7 @@ diff --git a/js/xpconnect/src/XPCJSContext.cpp b/js/xpconnect/src/XPCJSContext.c
      MOZ_DECL_USE_GUARD_OBJECT_NOTIFIER
      Watchdog* const mWatchdog;
  
-@@ -138,17 +142,17 @@ class Watchdog
+@@ -143,17 +147,17 @@ class Watchdog
          {
              AutoLockWatchdog lock(this);
  
@@ -85,7 +84,7 @@ diff --git a/js/xpconnect/src/XPCJSContext.cpp b/js/xpconnect/src/XPCJSContext.c
              // that it's atomic with the creation of the thread.
              mInitialized = true;
          }
-@@ -467,16 +471,18 @@ AutoLockWatchdog::~AutoLockWatchdog()
+@@ -476,16 +480,18 @@ AutoLockWatchdog::~AutoLockWatchdog()
          PR_Unlock(mWatchdog->GetLock());
      }
  }

+ 8 - 8
frg/work-js/mozilla-release/patches/mozilla-central-push_428135.patch → frg/work-js/mozilla-release/patches/1476423-63a1.patch

@@ -3,21 +3,21 @@
 # Date 1532457105 14400
 #      Tue Jul 24 14:31:45 2018 -0400
 # Node ID 6fcf54117a3b21164e6e769343416d2262991f6e
-# Parent  e59a3967c1e48ed155805fb4e6d3c7a11f778985
+# Parent  1c257276068d24230551a0d8d63f6d159ed229c0
 Bug 1476423 - add --enable-cranelift option; r=gps,sunfish
 
 diff --git a/js/moz.configure b/js/moz.configure
 --- a/js/moz.configure
 +++ b/js/moz.configure
-@@ -470,8 +470,22 @@ set_define('ENABLE_PIPELINE_OPERATOR', e
- def enable_build_binast(target, milestone):
-     # For reasons unknown at this time, BinAST causes timeouts on win32
-     # and failures on Android.
-     if milestone.is_nightly and not (target.kernel == 'WINNT' and target.cpu == 'x86') and not (target.os == 'Android'):
+@@ -455,8 +455,22 @@ js_option('--enable-pipeline-operator', 
+ 
+ @depends('--enable-pipeline-operator')
+ def enable_pipeline_operator(value):
+     if value:
          return True
  
- set_define('JS_BUILD_BINAST', enable_build_binast)
- set_config('JS_BUILD_BINAST', enable_build_binast)
+ set_config('ENABLE_PIPELINE_OPERATOR', enable_pipeline_operator)
+ set_define('ENABLE_PIPELINE_OPERATOR', enable_pipeline_operator)
 +
 +
 +# Experimental support for wasm code generation with Cranelift

+ 3 - 11
frg/work-js/mozilla-release/patches/mozilla-central-push_428107.patch → frg/work-js/mozilla-release/patches/1476955-63a1.patch

@@ -3,7 +3,7 @@
 # Date 1532449159 -7200
 #      Tue Jul 24 18:19:19 2018 +0200
 # Node ID 958b3cdb98f2183547aa74638305020230dd7877
-# Parent  f85380831fe4ba2a902a93146b6d9ff0043d1b59
+# Parent  5d6d14c0143fb1b84965be2462aa6c8d91ab4024
 Bug 1476955 - Structured clone algorithm doesn't serialize Array Length contrary to HTML spec, resulting in truncation of trailing sparse arrays like [1,2,3,,] (length=4) to [1,2,3] (length=3); r=sfink
 
 diff --git a/js/src/tests/non262/extensions/clone-object.js b/js/src/tests/non262/extensions/clone-object.js
@@ -157,7 +157,7 @@ diff --git a/js/src/tests/non262/extensions/shell.js b/js/src/tests/non262/exten
 diff --git a/js/src/vm/StructuredClone.cpp b/js/src/vm/StructuredClone.cpp
 --- a/js/src/vm/StructuredClone.cpp
 +++ b/js/src/vm/StructuredClone.cpp
-@@ -1400,17 +1400,26 @@ JSStructuredCloneWriter::traverseObject(
+@@ -1386,17 +1386,26 @@ JSStructuredCloneWriter::traverseObject(
          return false;
  
      checkStack();
@@ -185,7 +185,7 @@ diff --git a/js/src/vm/StructuredClone.cpp b/js/src/vm/StructuredClone.cpp
      Rooted<GCVector<Value>> newEntries(context(), GCVector<Value>(context()));
      {
          // If there is no wrapper, the compartment munging is a no-op.
-@@ -2354,17 +2363,17 @@ JSStructuredCloneReader::startRead(Mutab
+@@ -2340,17 +2349,17 @@ JSStructuredCloneReader::startRead(Mutab
              return false;
          vp.setObject(*reobj);
          break;
@@ -204,11 +204,3 @@ diff --git a/js/src/vm/StructuredClone.cpp b/js/src/vm/StructuredClone.cpp
        }
  
        case SCTAG_BACK_REFERENCE_OBJECT: {
-diff --git a/testing/web-platform/meta/IndexedDB/key_invalid.htm.ini b/testing/web-platform/meta/IndexedDB/key_invalid.htm.ini
-deleted file mode 100644
---- a/testing/web-platform/meta/IndexedDB/key_invalid.htm.ini
-+++ /dev/null
-@@ -1,3 +0,0 @@
--[key_invalid.htm]
--  [Invalid key - \[1,2,3,,\]]
--    expected: FAIL

+ 0 - 0
frg/work-js/mozilla-release/patches/mozilla-central-push_427990.patch → frg/work-js/mozilla-release/patches/1477073-63a1.patch


+ 0 - 0
frg/work-js/mozilla-release/patches/mozilla-central-push_427987.patch → frg/work-js/mozilla-release/patches/1477329-63a1.patch


+ 0 - 0
frg/work-js/mozilla-release/patches/mozilla-central-push_427910.patch → frg/work-js/mozilla-release/patches/1477375-63a1.patch


+ 0 - 0
frg/work-js/mozilla-release/patches/mozilla-central-push_427625.patch → frg/work-js/mozilla-release/patches/1477381-63a1.patch


+ 0 - 0
frg/work-js/mozilla-release/patches/mozilla-central-push_428617.patch → frg/work-js/mozilla-release/patches/1477742-63a1.patch


+ 87 - 36
frg/work-js/mozilla-release/patches/mozilla-central-push_428613.patch → frg/work-js/mozilla-release/patches/1477761-2only-63a1.patch

@@ -3,7 +3,7 @@
 # Date 1532622294 -3600
 #      Thu Jul 26 17:24:54 2018 +0100
 # Node ID 5e38f6929994ccd7905cbc0f62f057ef49d28d8a
-# Parent  764e0cce4cd1fbb79213252aec99a51f75c7f0be
+# Parent  d6be9fd3e61a907905499c3f4c18c50db40e2075
 Bug 1477761 - Use using declaration to make time related classes available in GC.cpp r=sfink
 
 diff --git a/js/src/gc/GC.cpp b/js/src/gc/GC.cpp
@@ -27,7 +27,26 @@ diff --git a/js/src/gc/GC.cpp b/js/src/gc/GC.cpp
   * This list is not complete, some tuning parameters are not listed here.
   *
   * If you change the values here, please also consider changing them in
-@@ -1410,17 +1411,17 @@ GCSchedulingTunables::setParameter(JSGCP
+@@ -952,17 +953,17 @@ GCRuntime::GCRuntime(JSRuntime* rt) :
+     atomsZone(nullptr),
+     stats_(rt),
+     marker(rt),
+     usage(nullptr),
+     nextCellUniqueId_(LargestTaggedNullCellPointer + 1), // Ensure disjoint from null tagged pointers.
+     numArenasFreeCommitted(0),
+     verifyPreData(nullptr),
+     chunkAllocationSinceLastGC(false),
+-    lastGCTime(mozilla::TimeStamp::Now()),
++    lastGCTime(TimeStamp::Now()),
+     mode(TuningDefaults::Mode),
+     numActiveZoneIters(0),
+     cleanUpEverything(false),
+     grayBufferState(GCRuntime::GrayBufferState::Unused),
+     grayBitsValid(false),
+     majorGCTriggerReason(JS::gcreason::NO_REASON),
+     fullGCForAtomsRequested_(false),
+     minorGCNumber(0),
+@@ -1416,17 +1417,17 @@ GCSchedulingTunables::setParameter(JSGCP
      switch(key) {
        case JSGC_MAX_BYTES:
          gcMaxBytes_ = value;
@@ -46,7 +65,7 @@ diff --git a/js/src/gc/GC.cpp b/js/src/gc/GC.cpp
          setHighFrequencyLowLimit(newLimit);
          break;
        }
-@@ -1566,17 +1567,17 @@ GCSchedulingTunables::GCSchedulingTunabl
+@@ -1575,17 +1576,17 @@ GCSchedulingTunables::GCSchedulingTunabl
    : gcMaxBytes_(0),
      maxMallocBytes_(TuningDefaults::MaxMallocBytes),
      gcMaxNurseryBytes_(0),
@@ -63,9 +82,9 @@ diff --git a/js/src/gc/GC.cpp b/js/src/gc/GC.cpp
      highFrequencyHeapGrowthMin_(TuningDefaults::HighFrequencyHeapGrowthMin),
      lowFrequencyHeapGrowth_(TuningDefaults::LowFrequencyHeapGrowth),
      dynamicMarkSliceEnabled_(TuningDefaults::DynamicMarkSliceEnabled),
+     refreshFrameSlicesEnabled_(TuningDefaults::RefreshFrameSlicesEnabled),
      minEmptyChunkCount_(TuningDefaults::MinEmptyChunkCount),
-     maxEmptyChunkCount_(TuningDefaults::MaxEmptyChunkCount),
-@@ -1618,17 +1619,17 @@ GCSchedulingTunables::resetParameter(JSG
+@@ -1628,17 +1629,17 @@ GCSchedulingTunables::resetParameter(JSG
        case JSGC_MAX_BYTES:
          gcMaxBytes_ = 0xffffffff;
          break;
@@ -84,7 +103,7 @@ diff --git a/js/src/gc/GC.cpp b/js/src/gc/GC.cpp
          setHighFrequencyHighLimit(TuningDefaults::HighFrequencyHighLimitBytes);
          break;
        case JSGC_HIGH_FREQUENCY_HEAP_GROWTH_MAX:
-@@ -2119,31 +2120,31 @@ GCMarker::delayMarkingChildren(const voi
+@@ -2134,31 +2135,31 @@ GCMarker::delayMarkingChildren(const voi
  
  bool
  GCRuntime::shouldCompact()
@@ -115,35 +134,10 @@ diff --git a/js/src/gc/GC.cpp b/js/src/gc/GC.cpp
  bool
  GCRuntime::isCompactingGCEnabled() const
  {
-     return compactingEnabled
-         && rt->mainContextFromOwnThread()->compactingDisabledCount == 0
-         && !mozilla::recordreplay::IsRecordingOrReplaying();
-@@ -3229,51 +3230,51 @@ void
- ArenaLists::queueForegroundThingsForSweep()
- {
-     gcShapeArenasToUpdate = arenaListsToSweep(AllocKind::SHAPE);
-     gcAccessorShapeArenasToUpdate = arenaListsToSweep(AllocKind::ACCESSOR_SHAPE);
-     gcObjectGroupArenasToUpdate = arenaListsToSweep(AllocKind::OBJECT_GROUP);
-     gcScriptArenasToUpdate = arenaListsToSweep(AllocKind::SCRIPT);
+     return compactingEnabled && rt->mainContextFromOwnThread()->compactingDisabledCount == 0;
  }
  
--mozilla::TimeStamp SliceBudget::unlimitedDeadline;
-+TimeStamp SliceBudget::unlimitedDeadline;
- 
- void
- SliceBudget::Init()
- {
-     MOZ_ASSERT(!unlimitedDeadline);
-     uint64_t oneYearsInSeconds = 365 * 24 * 60 * 60;
--    unlimitedDeadline = ReallyNow() + mozilla::TimeDuration::FromSeconds(100 * oneYearsInSeconds);
-+    unlimitedDeadline = ReallyNow() + TimeDuration::FromSeconds(100 * oneYearsInSeconds);
- }
- 
- SliceBudget::SliceBudget()
-   : timeBudget(UnlimitedTimeBudget), workBudget(UnlimitedWorkBudget)
- {
-     makeUnlimited();
- }
+@@ -3297,28 +3298,28 @@ SliceBudget::SliceBudget()
  
  SliceBudget::SliceBudget(TimeBudget time)
    : timeBudget(time), workBudget(UnlimitedWorkBudget)
@@ -152,8 +146,8 @@ diff --git a/js/src/gc/GC.cpp b/js/src/gc/GC.cpp
          makeUnlimited();
      } else {
          // Note: TimeBudget(0) is equivalent to WorkBudget(CounterReset).
--        deadline = ReallyNow() + mozilla::TimeDuration::FromMilliseconds(time.budget);
-+        deadline = ReallyNow() + TimeDuration::FromMilliseconds(time.budget);
+-        deadline = mozilla::TimeStamp::Now() + mozilla::TimeDuration::FromMilliseconds(time.budget);
++        deadline = TimeStamp::Now() + TimeDuration::FromMilliseconds(time.budget);
          counter = CounterReset;
      }
  }
@@ -174,7 +168,26 @@ diff --git a/js/src/gc/GC.cpp b/js/src/gc/GC.cpp
  SliceBudget::describe(char* buffer, size_t maxlen) const
  {
      if (isUnlimited())
-@@ -4051,20 +4052,20 @@ GCRuntime::purgeRuntime()
+@@ -3330,17 +3331,17 @@ SliceBudget::describe(char* buffer, size
+ }
+ 
+ bool
+ SliceBudget::checkOverBudget()
+ {
+     if (deadline.IsNull())
+         return true;
+ 
+-    bool over = mozilla::TimeStamp::Now() >= deadline;
++    bool over = TimeStamp::Now() >= deadline;
+     if (!over)
+         counter = CounterReset;
+     return over;
+ }
+ 
+ void
+ GCRuntime::requestMajorGC(JS::gcreason::Reason reason)
+ {
+@@ -4096,20 +4097,20 @@ GCRuntime::purgeRuntime()
      if (auto cache = rt->maybeThisRuntimeSharedImmutableStrings())
          cache->purge();
  
@@ -197,3 +210,41 @@ diff --git a/js/src/gc/GC.cpp b/js/src/gc/GC.cpp
  
      if (alwaysPreserveCode)
          return true;
+@@ -4288,17 +4289,17 @@ GCRuntime::prepareZonesForCollection(JS:
+         for (auto i : AllAllocKinds())
+             MOZ_ASSERT(!zone->arenas.arenaListsToSweep(i));
+     }
+ #endif
+ 
+     *isFullOut = true;
+     bool any = false;
+ 
+-    auto currentTime = mozilla::TimeStamp::Now();
++    auto currentTime = TimeStamp::Now();
+ 
+     for (ZonesIter zone(rt, WithAtoms); !zone.done(); zone.next()) {
+         /* Set up which zones will be collected. */
+         if (ShouldCollectZone(zone, reason)) {
+             MOZ_ASSERT(zone->canCollect());
+             any = true;
+             zone->changeGCState(Zone::NoGC, Zone::Mark);
+         } else {
+@@ -6834,17 +6835,17 @@ GCRuntime::endCompactPhase()
+ void
+ GCRuntime::finishCollection()
+ {
+     assertBackgroundSweepingFinished();
+     MOZ_ASSERT(marker.isDrained());
+     marker.stop();
+     clearBufferedGrayRoots();
+ 
+-    auto currentTime = mozilla::TimeStamp::Now();
++    auto currentTime = TimeStamp::Now();
+     schedulingState.updateHighFrequencyMode(lastGCTime, currentTime, tunables);
+ 
+     for (ZonesIter zone(rt, WithAtoms); !zone.done(); zone.next()) {
+         if (zone->isCollecting()) {
+             zone->changeGCState(Zone::Finished, Zone::NoGC);
+             zone->notifyObservingDebuggers();
+         }
+ 

+ 0 - 0
frg/work-js/mozilla-release/patches/mozilla-central-push_428751.patch → frg/work-js/mozilla-release/patches/1478616-1-63a1.patch


+ 0 - 0
frg/work-js/mozilla-release/patches/mozilla-central-push_428752.patch → frg/work-js/mozilla-release/patches/1478616-2-63a1.patch


+ 0 - 0
frg/work-js/mozilla-release/patches/mozilla-central-push_429174.patch → frg/work-js/mozilla-release/patches/1478943-63a1.patch


+ 1 - 1
frg/work-js/mozilla-release/patches/mozilla-central-push_429165.patch → frg/work-js/mozilla-release/patches/1479076-63a1.patch

@@ -1,7 +1,6 @@
 # HG changeset patch
 # User Tooru Fujisawa <arai_a@mac.com>
 # Date 1532945454 -32400
-#      Mon Jul 30 19:10:54 2018 +0900
 # Node ID 7252e88797e3912780c4a2637da8ff8e0e30f90b
 # Parent  1711e7ff10520bc2b99fad7a0fd823518814ad09
 Bug 1479076 - Add LazyScript::maybeCompartment. r=jonco
@@ -38,3 +37,4 @@ diff --git a/js/src/vm/JSScript.h b/js/src/vm/JSScript.h
          return script_;
      }
      const JSScript* maybeScriptUnbarriered() const {
+

+ 1 - 1
frg/work-js/mozilla-release/patches/mozilla-central-push_429161.patch → frg/work-js/mozilla-release/patches/1479204-63a1.patch

@@ -1,7 +1,6 @@
 # HG changeset patch
 # User Lars T Hansen <lhansen@mozilla.com>
 # Date 1532942898 -7200
-#      Mon Jul 30 11:28:18 2018 +0200
 # Node ID f587d77a778204e32d8d29af7b4c484a7d42b97d
 # Parent  45da2e0ebe71d84b773615e26d7ec971b096707d
 Bug 1479204 - Fix the placement of an #endif. r=me  DONTBUILD
@@ -36,3 +35,4 @@ diff --git a/js/src/wasm/WasmBaselineCompile.cpp b/js/src/wasm/WasmBaselineCompi
      // To disable this optimization it is enough always to return false from
      // sniffConditionalControl{Cmp,Eqz}.
  
+

+ 7 - 7
frg/work-js/mozilla-release/patches/1482931-1-63a1.patch

@@ -2,7 +2,7 @@
 # User Ted Campbell <tcampbell@mozilla.com>
 # Date 1534169521 14400
 # Node ID 490b0d605859e612832f6b655d4168e39a30ceb1
-# Parent  3b443d9bbb69ee797677759278e3c0b6a8178a99
+# Parent  ed9314668e62925e4f3b8004fe6aa17c2dbf2301
 Bug 1482931 - Cleanup const-ness of statics in js/src. r=waldo
 
 Mark read-only global data as const. Replacing |const char* x[]| with
@@ -14,7 +14,7 @@ MozReview-Commit-ID: Ftv7ziIAWGh
 diff --git a/js/src/gc/GC.cpp b/js/src/gc/GC.cpp
 --- a/js/src/gc/GC.cpp
 +++ b/js/src/gc/GC.cpp
-@@ -1037,17 +1037,17 @@ GCRuntime::GCRuntime(JSRuntime* rt) :
+@@ -1036,17 +1036,17 @@ GCRuntime::GCRuntime(JSRuntime* rt) :
  void
  GCRuntime::getZealBits(uint32_t* zealBits, uint32_t* frequency, uint32_t* scheduled)
  {
@@ -33,7 +33,7 @@ diff --git a/js/src/gc/GC.cpp b/js/src/gc/GC.cpp
      "    0:  (None) Normal amount of collection (resets all modes)\n"
      "    1:  (RootsChange) Collect when roots are added or removed\n"
      "    2:  (Alloc) Collect when every N allocations (default: 100)\n"
-@@ -1245,17 +1245,17 @@ GCRuntime::parseAndSetZeal(const char* s
+@@ -1244,17 +1244,17 @@ GCRuntime::parseAndSetZeal(const char* s
      }
  
      return true;
@@ -55,7 +55,7 @@ diff --git a/js/src/gc/GC.cpp b/js/src/gc/GC.cpp
 diff --git a/js/src/gc/GC.h b/js/src/gc/GC.h
 --- a/js/src/gc/GC.h
 +++ b/js/src/gc/GC.h
-@@ -135,17 +135,17 @@ void
+@@ -140,17 +140,17 @@ void
  MergeRealms(JS::Realm* source, JS::Realm* target);
  
  enum VerifierType {
@@ -121,7 +121,7 @@ diff --git a/js/src/jit/CacheIR.cpp b/js/src/jit/CacheIR.cpp
 diff --git a/js/src/jit/CacheIR.h b/js/src/jit/CacheIR.h
 --- a/js/src/jit/CacheIR.h
 +++ b/js/src/jit/CacheIR.h
-@@ -170,17 +170,17 @@ class TypedOperandId : public OperandId
+@@ -171,17 +171,17 @@ class TypedOperandId : public OperandId
  
  enum class CacheKind : uint8_t
  {
@@ -137,9 +137,9 @@ diff --git a/js/src/jit/CacheIR.h b/js/src/jit/CacheIR.h
      _(GuardIsObject)                      \
      _(GuardIsObjectOrNull)                \
      _(GuardIsNullOrUndefined)             \
+     _(GuardIsBoolean)                     \
      _(GuardIsString)                      \
      _(GuardIsSymbol)                      \
-     _(GuardIsNumber)                      \
 diff --git a/js/src/jit/IonOptimizationLevels.cpp b/js/src/jit/IonOptimizationLevels.cpp
 --- a/js/src/jit/IonOptimizationLevels.cpp
 +++ b/js/src/jit/IonOptimizationLevels.cpp
@@ -405,7 +405,7 @@ diff --git a/js/src/proxy/ScriptedProxyHandler.cpp b/js/src/proxy/ScriptedProxyH
 diff --git a/js/src/vm/ArrayBufferObject.cpp b/js/src/vm/ArrayBufferObject.cpp
 --- a/js/src/vm/ArrayBufferObject.cpp
 +++ b/js/src/vm/ArrayBufferObject.cpp
-@@ -1489,17 +1489,17 @@ ArrayBufferObject::addView(JSContext* cx
+@@ -1487,17 +1487,17 @@ ArrayBufferObject::addView(JSContext* cx
      }
      return ObjectRealm::get(this).innerViews.get().addView(cx, this, view);
  }

+ 9 - 9
frg/work-js/mozilla-release/patches/1486577-6-63a1.patch

@@ -3,7 +3,7 @@
 # Date 1535162518 18000
 #      Fri Aug 24 21:01:58 2018 -0500
 # Node ID 2dc7007e3924444f55345606b6785f2d2ba89ce1
-# Parent  00069e85edff7b5804c00d49ab64e3c379998be0
+# Parent  b069c90ac10e84324b9507a64d6815ee9bb46fe2
 Bug 1486577 - Don't #include js/SourceBufferHolder.h in jsapi.h, and instead require users to do so -- a minor translation-unit size improvement for anyone who never has to use SourceBufferHolder other than by reference.  r=jandem
 
 diff --git a/dom/base/nsFrameMessageManager.cpp b/dom/base/nsFrameMessageManager.cpp
@@ -275,7 +275,7 @@ diff --git a/js/src/builtin/TestingFunctions.cpp b/js/src/builtin/TestingFunctio
  #include "js/UniquePtr.h"
  #include "js/Vector.h"
  #include "js/Wrapper.h"
-@@ -83,16 +84,17 @@
+@@ -84,16 +85,17 @@
  #include "vm/StringType-inl.h"
  
  using namespace js;
@@ -533,7 +533,7 @@ diff --git a/js/src/jsapi.cpp b/js/src/jsapi.cpp
  #include "util/Text.h"
  #include "vm/AsyncFunction.h"
  #include "vm/AsyncIteration.h"
-@@ -107,16 +108,17 @@
+@@ -108,16 +109,17 @@
  using namespace js;
  using namespace js::gc;
  
@@ -606,7 +606,7 @@ diff --git a/js/src/shell/js.cpp b/js/src/shell/js.cpp
  #include "shell/jsoptparse.h"
  #include "shell/jsshell.h"
  #include "shell/OSObject.h"
-@@ -4265,18 +4266,18 @@ ParseModule(JSContext* cx, unsigned argc
+@@ -4274,18 +4275,18 @@ ParseModule(JSContext* cx, unsigned argc
          options.setFileAndLine("<string>", 1);
      }
  
@@ -648,7 +648,7 @@ diff --git a/js/src/vm/Debugger.cpp b/js/src/vm/Debugger.cpp
  #include "util/Text.h"
  #include "vm/ArgumentsObject.h"
  #include "vm/AsyncFunction.h"
-@@ -55,16 +56,17 @@
+@@ -56,16 +57,17 @@
  #include "vm/Stack-inl.h"
  
  using namespace js;
@@ -747,7 +747,7 @@ diff --git a/js/src/vm/JSScript.cpp b/js/src/vm/JSScript.cpp
  #include "vm/ArgumentsObject.h"
  #include "vm/BytecodeUtil.h"
  #include "vm/Compression.h"
-@@ -68,16 +69,17 @@
+@@ -69,16 +70,17 @@
  
  using namespace js;
  using namespace js::gc;
@@ -768,7 +768,7 @@ diff --git a/js/src/vm/JSScript.cpp b/js/src/vm/JSScript.cpp
 diff --git a/js/src/wasm/AsmJS.cpp b/js/src/wasm/AsmJS.cpp
 --- a/js/src/wasm/AsmJS.cpp
 +++ b/js/src/wasm/AsmJS.cpp
-@@ -30,16 +30,17 @@
+@@ -31,16 +31,17 @@
  
  #include "builtin/String.h"
  #include "frontend/Parser.h"
@@ -786,9 +786,9 @@ diff --git a/js/src/wasm/AsmJS.cpp b/js/src/wasm/AsmJS.cpp
  #include "vm/SelfHosting.h"
  #include "vm/Time.h"
  #include "vm/TypedArrayObject.h"
-@@ -69,16 +70,17 @@ using mozilla::IsPositiveZero;
+@@ -70,16 +71,17 @@ using mozilla::IsNegativeZero;
+ using mozilla::IsPositiveZero;
  using mozilla::IsPowerOfTwo;
- using mozilla::PodEqual;
  using mozilla::PodZero;
  using mozilla::PositiveInfinity;
  using mozilla::Unused;

+ 6 - 6
frg/work-js/mozilla-release/patches/1486577-7-63a1.patch

@@ -3,7 +3,7 @@
 # Date 1535163915 18000
 #      Fri Aug 24 21:25:15 2018 -0500
 # Node ID 1fb7ddfad86d5e085c4f2af23a2519d37e45a3e4
-# Parent  d405cc9b00915aad8408ad6309f0841507108d0f
+# Parent  d6a83a7db989d389bbd1098d452e72556b356006
 Bug 1486577 - Make all users of the various *CompileOptions classes #include "js/CompileOptions.h" so that nothing but that file has to know about these classes having a JS_PUBLIC_API on them, that would have to be present in forward-declarations.  r=jandem
 
 diff --git a/js/public/CompileOptions.h b/js/public/CompileOptions.h
@@ -845,11 +845,11 @@ diff --git a/js/src/shell/js.cpp b/js/src/shell/js.cpp
  
  using js::shell::RCFile;
  
+ using mozilla::ArrayEqual;
  using mozilla::ArrayLength;
  using mozilla::Atomic;
  using mozilla::MakeScopeExit;
  using mozilla::Maybe;
- using mozilla::Nothing;
 diff --git a/js/src/vm/Debugger.cpp b/js/src/vm/Debugger.cpp
 --- a/js/src/vm/Debugger.cpp
 +++ b/js/src/vm/Debugger.cpp
@@ -915,7 +915,7 @@ diff --git a/js/src/vm/HelperThreads.h b/js/src/vm/HelperThreads.h
  
  namespace JS {
  class OffThreadToken {};
-@@ -584,32 +585,32 @@ HasOffThreadIonCompile(JS::Realm* realm)
+@@ -567,32 +568,32 @@ HasOffThreadIonCompile(JS::Realm* realm)
  void
  CancelOffThreadParses(JSRuntime* runtime);
  
@@ -952,7 +952,7 @@ diff --git a/js/src/vm/HelperThreads.h b/js/src/vm/HelperThreads.h
   * atoms-zone GC to finish.
   */
  void
-@@ -658,17 +659,17 @@ class MOZ_RAII AutoUnlockHelperThreadSta
+@@ -641,17 +642,17 @@ class MOZ_RAII AutoUnlockHelperThreadSta
      {
          MOZ_GUARD_OBJECT_NOTIFIER_INIT;
      }
@@ -971,7 +971,7 @@ diff --git a/js/src/vm/HelperThreads.h b/js/src/vm/HelperThreads.h
  
      // Callback invoked off thread when the parse finishes.
      JS::OffThreadCompileCallback callback;
-@@ -687,17 +688,17 @@ struct ParseTask : public mozilla::Linke
+@@ -670,17 +671,17 @@ struct ParseTask : public mozilla::Linke
      Vector<UniquePtr<CompileError>, 0, SystemAllocPolicy> errors;
      bool overRecursed;
      bool outOfMemory;
@@ -1268,7 +1268,7 @@ diff --git a/js/src/vm/Xdr.h b/js/src/vm/Xdr.h
 diff --git a/js/src/wasm/AsmJS.cpp b/js/src/wasm/AsmJS.cpp
 --- a/js/src/wasm/AsmJS.cpp
 +++ b/js/src/wasm/AsmJS.cpp
-@@ -6532,17 +6532,17 @@ HandleInstantiationFailure(JSContext* cx
+@@ -6533,17 +6533,17 @@ HandleInstantiationFailure(JSContext* cx
          return false;
  
      RootedFunction fun(cx, NewScriptedFunction(cx, 0, JSFunction::INTERPRETED_NORMAL,

File diff suppressed because it is too large
+ 615 - 75
frg/work-js/mozilla-release/patches/1488698-7-WIP-64a1.patch


+ 92 - 0
frg/work-js/mozilla-release/patches/1491336-64a1.patch

@@ -0,0 +1,92 @@
+# HG changeset patch
+# User Tooru Fujisawa <arai_a@mac.com>
+# Date 1538742098 -32400
+# Node ID bc381243c490f6e5b54a65734af5504e598e129d
+# Parent  dc10d3d428b9dfd2db80fa0225948c07df45841a
+Bug 1491336 - Do not support delazification of functions which is optimized out. r=jorendorff
+
+diff --git a/js/src/jit-test/tests/debug/Debugger-findScripts-optimized-out.js b/js/src/jit-test/tests/debug/Debugger-findScripts-optimized-out.js
+new file mode 100644
+--- /dev/null
++++ b/js/src/jit-test/tests/debug/Debugger-findScripts-optimized-out.js
+@@ -0,0 +1,31 @@
++// Accessing Debugger.Script's properties which triggers delazification can
++// fail if the function for the script is optimized out.
++// It shouldn't crash but just throw an error.
++
++load(libdir + "asserts.js");
++
++var g = newGlobal();
++var dbg = new Debugger(g);
++g.eval(`
++function enclosing() {
++    (function g1() {});
++    (function* g2() {});
++    (async function g3() {});
++    (async function* g4() {});
++    () => {};
++    async () => {};
++}
++`);
++
++for (const s of dbg.findScripts()) {
++    if (!s.displayName) {
++        continue;
++    }
++
++    try {
++        s.lineCount;  // don't assert
++    } catch (exc) {
++        // If that didn't throw, it's fine. If it did, check the message.
++        assertEq(exc.message, "function is optimized out");
++    }
++}
+diff --git a/js/src/js.msg b/js/src/js.msg
+--- a/js/src/js.msg
++++ b/js/src/js.msg
+@@ -469,16 +469,17 @@ MSG_DEF(JSMSG_DEBUG_LOOP,              0
+ MSG_DEF(JSMSG_DEBUG_NOT_DEBUGGEE,      2, JSEXN_ERR, "{0} is not a debuggee {1}")
+ MSG_DEF(JSMSG_DEBUG_NOT_DEBUGGING,     0, JSEXN_ERR, "can't set breakpoint: script global is not a debuggee")
+ MSG_DEF(JSMSG_DEBUG_NOT_IDLE,          0, JSEXN_ERR, "can't start debugging: a debuggee script is on the stack")
+ MSG_DEF(JSMSG_DEBUG_NOT_LIVE,          1, JSEXN_ERR, "{0} is not live")
+ MSG_DEF(JSMSG_DEBUG_NO_ENV_OBJECT,     0, JSEXN_TYPEERR, "declarative Environments don't have binding objects")
+ MSG_DEF(JSMSG_DEBUG_PROTO,             2, JSEXN_TYPEERR, "{0}.prototype is not a valid {1} instance")
+ MSG_DEF(JSMSG_DEBUG_WRONG_OWNER,       1, JSEXN_TYPEERR, "{0} belongs to a different Debugger")
+ MSG_DEF(JSMSG_DEBUG_OPTIMIZED_OUT,     1, JSEXN_ERR, "variable `{0}' has been optimized out")
++MSG_DEF(JSMSG_DEBUG_OPTIMIZED_OUT_FUN, 0, JSEXN_ERR, "function is optimized out")
+ MSG_DEF(JSMSG_DEBUG_RESUMPTION_VALUE_DISALLOWED, 0, JSEXN_TYPEERR, "resumption values are disallowed in this hook")
+ MSG_DEF(JSMSG_DEBUG_VARIABLE_NOT_FOUND,0, JSEXN_TYPEERR, "variable not found in environment")
+ MSG_DEF(JSMSG_DEBUG_WRAPPER_IN_WAY,    3, JSEXN_TYPEERR, "{0} is {1}{2}a global object, but a direct reference is required")
+ MSG_DEF(JSMSG_DEBUGGEE_WOULD_RUN,      2, JSEXN_DEBUGGEEWOULDRUN, "debuggee `{0}:{1}' would run")
+ MSG_DEF(JSMSG_NOT_CALLABLE_OR_UNDEFINED, 0, JSEXN_TYPEERR, "value is not a function or undefined")
+ MSG_DEF(JSMSG_NOT_TRACKING_ALLOCATIONS, 1, JSEXN_ERR, "Cannot call {0} without setting trackingAllocationSites to true")
+ MSG_DEF(JSMSG_OBJECT_METADATA_CALLBACK_ALREADY_SET, 0, JSEXN_ERR, "Cannot track object allocation, because other tools are already doing so")
+ MSG_DEF(JSMSG_QUERY_INNERMOST_WITHOUT_LINE_URL, 0, JSEXN_TYPEERR, "findScripts query object with 'innermost' property must have 'line' and either 'displayURL', 'url', or 'source'")
+diff --git a/js/src/vm/Debugger.cpp b/js/src/vm/Debugger.cpp
+--- a/js/src/vm/Debugger.cpp
++++ b/js/src/vm/Debugger.cpp
+@@ -5273,16 +5273,24 @@ DelazifyScript(JSContext* cx, Handle<Laz
+ 
+     // JSFunction::getOrCreateScript requires the enclosing script not to be
+     // lazified.
+     MOZ_ASSERT(lazyScript->hasEnclosingLazyScript() || lazyScript->hasEnclosingScope());
+     if (lazyScript->hasEnclosingLazyScript()) {
+         Rooted<LazyScript*> enclosingLazyScript(cx, lazyScript->enclosingLazyScript());
+         if (!DelazifyScript(cx, enclosingLazyScript))
+             return nullptr;
++
++        if (!lazyScript->enclosingScriptHasEverBeenCompiled()) {
++            // It didn't work! Delazifying the enclosing script still didn't
++            // delazify this script. This happens when the function
++            // corresponding to this script was removed by constant folding.
++            JS_ReportErrorNumberASCII(cx, GetErrorMessage, nullptr, JSMSG_DEBUG_OPTIMIZED_OUT_FUN);
++            return nullptr;
++        }
+     }
+     MOZ_ASSERT(lazyScript->enclosingScriptHasEverBeenCompiled());
+ 
+     RootedFunction fun0(cx, lazyScript->functionNonDelazifying());
+     AutoRealm ar(cx, fun0);
+     RootedFunction fun(cx, LazyScript::functionDelazifying(cx, lazyScript));
+     if (!fun)
+         return nullptr;

+ 5 - 5
frg/work-js/mozilla-release/patches/1502159-2-65a1.patch

@@ -2,7 +2,7 @@
 # User Matthew Gaudet <mgaudet@mozilla.com>
 # Date 1540568623 0
 # Node ID 1c2afde752e7eb78e6d4b4ebe10b1f1e3c3842f7
-# Parent  8c66c26c75b5950ba88d33f26828254b151a86ef
+# Parent  cdfa5d21afd82b5ae71fb0e166e86fa13a2a843e
 Bug 1502159 - Remove C1Spewer r=jandem
 
 It appears the C1 Spewer is not partciularly well used. Loading logs into
@@ -299,13 +299,13 @@ deleted file mode 100644
 diff --git a/js/src/jit/CacheIRCompiler.cpp b/js/src/jit/CacheIRCompiler.cpp
 --- a/js/src/jit/CacheIRCompiler.cpp
 +++ b/js/src/jit/CacheIRCompiler.cpp
-@@ -7,16 +7,17 @@
- #include "jit/CacheIRCompiler.h"
- 
+@@ -9,16 +9,17 @@
+ #include "mozilla/ArrayUtils.h"
  #include "mozilla/ScopeExit.h"
  
  #include <utility>
  
+ #include "jslibmath.h"
  #include "jit/IonIC.h"
  #include "jit/SharedICHelpers.h"
 +#include "jit/SharedICRegisters.h"
@@ -468,7 +468,7 @@ diff --git a/js/src/jit/JitSpewer.h b/js/src/jit/JitSpewer.h
 diff --git a/js/src/moz.build b/js/src/moz.build
 --- a/js/src/moz.build
 +++ b/js/src/moz.build
-@@ -272,17 +272,16 @@ UNIFIED_SOURCES += [
+@@ -273,17 +273,16 @@ UNIFIED_SOURCES += [
      'jit/BaselineDebugModeOSR.cpp',
      'jit/BaselineFrame.cpp',
      'jit/BaselineFrameInfo.cpp',

+ 13 - 8
frg/work-js/mozilla-release/patches/1502886-1-65a1.patch

@@ -2,7 +2,7 @@
 # User Benjamin Bouvier <benj@benj.me>
 # Date 1540835717 -3600
 # Node ID ab04d8c725fd0cbd61e6c32e4096ee4caa53d55c
-# Parent  1eae55e648bdb8cc8b52654adc99f8939df0e66a
+# Parent  8d446a847e6a78f1343cd8851be248c3558bc9ec
 Bug 1502886: Delete wasm breakpoints when the wasm instance's Zone is swept; r=jonco
 
 diff --git a/js/src/gc/Zone.cpp b/js/src/gc/Zone.cpp
@@ -86,7 +86,7 @@ diff --git a/js/src/vm/Debugger.cpp b/js/src/vm/Debugger.cpp
  {
      return debuggerLink.mNext;
  }
-@@ -4087,18 +4089,18 @@ Debugger::removeDebuggeeGlobal(FreeOp* f
+@@ -4137,18 +4139,18 @@ Debugger::removeDebuggeeGlobal(FreeOp* f
          DebuggerFrame* frameobj = e.front().value();
          if (frame.global() == global) {
              frameobj->freeFrameIterData(fop);
@@ -107,7 +107,7 @@ diff --git a/js/src/vm/Debugger.cpp b/js/src/vm/Debugger.cpp
      // The debuggee zone set is recomputed on demand. This avoids refcounting
      // and in practice we have relatively few debuggees that tend to all be in
      // the same zone. If after recomputing the debuggee zone set, this global's
-@@ -4124,16 +4126,18 @@ Debugger::removeDebuggeeGlobal(FreeOp* f
+@@ -4174,16 +4176,18 @@ Debugger::removeDebuggeeGlobal(FreeOp* f
            case BreakpointSite::Type::JS:
              if (bp->site->asJS()->script->realm() == global->realm())
                  bp->destroy(fop);
@@ -126,7 +126,7 @@ diff --git a/js/src/vm/Debugger.cpp b/js/src/vm/Debugger.cpp
      // metadata callback from this global's realm.
      if (trackingAllocationSites)
          Debugger::removeAllocationsTracking(*global);
-@@ -6440,26 +6444,32 @@ DebuggerScript_getBreakpoints(JSContext*
+@@ -6710,31 +6714,37 @@ DebuggerScript_getBreakpoints(JSContext*
  
  class DebuggerScriptClearBreakpointMatcher
  {
@@ -147,7 +147,12 @@ diff --git a/js/src/vm/Debugger.cpp b/js/src/vm/Debugger.cpp
          script->clearBreakpointsIn(cx_->runtime()->defaultFreeOp(), dbg_, handler_);
          return true;
      }
- 
+     ReturnType match(Handle<LazyScript*> lazyScript) {
+         RootedScript script(cx_, DelazifyScript(cx_, lazyScript));
+         if (!script)
+             return false;
+         return match(script);
+     }
      ReturnType match(Handle<WasmInstanceObject*> instance) {
 -        return instance->instance().debug().clearBreakpointsIn(cx_, instance, dbg_, handler_);
 +        instance->instance().debug().clearBreakpointsIn(cx_->runtime()->defaultFreeOp(), instance, dbg_,
@@ -164,7 +169,7 @@ diff --git a/js/src/vm/Debugger.cpp b/js/src/vm/Debugger.cpp
 diff --git a/js/src/vm/Debugger.h b/js/src/vm/Debugger.h
 --- a/js/src/vm/Debugger.h
 +++ b/js/src/vm/Debugger.h
-@@ -1617,28 +1617,28 @@ class BreakpointSite {
+@@ -1639,28 +1639,28 @@ class BreakpointSite {
      using BreakpointList =
          mozilla::DoublyLinkedList<js::Breakpoint,
                                    SiteLinkAccess<js::Breakpoint>>;
@@ -194,7 +199,7 @@ diff --git a/js/src/vm/Debugger.h b/js/src/vm/Debugger.h
  
  /*
   * Each Breakpoint is a member of two linked lists: its debugger's list and its
-@@ -1672,17 +1672,23 @@ class Breakpoint {
+@@ -1694,17 +1694,23 @@ class Breakpoint {
      /**
       * Link elements for each list this breakpoint can be in.
       */
@@ -222,7 +227,7 @@ diff --git a/js/src/vm/Debugger.h b/js/src/vm/Debugger.h
 diff --git a/js/src/wasm/WasmDebug.cpp b/js/src/wasm/WasmDebug.cpp
 --- a/js/src/wasm/WasmDebug.cpp
 +++ b/js/src/wasm/WasmDebug.cpp
-@@ -282,45 +282,47 @@ DebugState::destroyBreakpointSite(FreeOp
+@@ -285,45 +285,47 @@ DebugState::destroyBreakpointSite(FreeOp
  {
      MOZ_ASSERT(breakpointSites_.initialized());
      WasmBreakpointSiteMap::Ptr p = breakpointSites_.lookup(offset);

+ 0 - 0
frg/work-js/mozilla-release/patches/mozilla-central-push_428537.patch → frg/work-js/mozilla-release/patches/NOBUG-20180724-registersets-63a1.patch


+ 9 - 9
frg/work-js/mozilla-release/patches/TOP-1630383-02-77a1.patch

@@ -2,7 +2,7 @@
 # User Iain Ireland <iireland@mozilla.com>
 # Date 1587387682 0
 # Node ID 4c0cbbdaa2400f96ba7c154692f464d29e90cc80
-# Parent  842827e479363e0c3da6a64a316c715d34c016c9
+# Parent  ad7f441908ae145c834538453d402b254ce949e8
 Bug 1630383: Fix off-thread parsing r=mgaudet
 
 I had this right in my original patch stack, but 'fixed' it before putting the patches up for review. The old engine only needs to initialize the regexp stack for the main thread, because it's only used when executing regexps, but we need the isolate for off-thread parsing, so it needs to be initialized even for helper threads.
@@ -30,21 +30,21 @@ diff --git a/js/src/vm/JSContext.cpp b/js/src/vm/JSContext.cpp
 -        }
 -#else
 +#ifndef ENABLE_NEW_REGEXP
-         if (!regexpStack.ref().init())
+         if (!regexpStack.ref().init()) {
              return false;
+         }
  #endif
  
-         if (!fx.initInstance())
-             return false;
- 
- #ifdef JS_SIMULATOR
-@@ -136,16 +131,23 @@ JSContext::init(ContextKind kind)
-         if (!wasm::EnsureSignalHandlers(this))
+         if (!fx.initInstance()) {
              return false;
+         }
+@@ -141,16 +136,23 @@ JSContext::init(ContextKind kind)
+         }
      } else {
          atomsZoneFreeLists_ = js_new<FreeLists>();
-         if (!atomsZoneFreeLists_)
+         if (!atomsZoneFreeLists_) {
              return false;
+         }
      }
  
 +#ifdef ENABLE_NEW_REGEXP

+ 19 - 18
frg/work-js/mozilla-release/patches/TOP-NOBUG-REGEXP-07-1626713-76a1-25318.patch

@@ -1,7 +1,7 @@
 # HG changeset patch
 # User Dmitry Butskoy <buc@buc.me>
 # Date 1690629593 -7200
-# Parent  aa1948fb6ff243752172fe82dcde694ec365be31
+# Parent  06f107cc9958362897221d32bae49cd7b2fe6eef
 No Bug - Import new regexp V8 engine. r=frg a=frg
 
 diff --git a/js/src/builtin/RegExp.cpp b/js/src/builtin/RegExp.cpp
@@ -81,7 +81,7 @@ diff --git a/js/src/builtin/TestingFunctions.cpp b/js/src/builtin/TestingFunctio
  #include "js/AutoByteString.h"
  #include "js/CompilationAndEvaluation.h"
  #include "js/CompileOptions.h"
-@@ -4488,17 +4490,17 @@ GetModuleEnvironmentValue(JSContext* cx,
+@@ -4494,17 +4496,17 @@ GetModuleEnvironmentValue(JSContext* cx,
      if (args.rval().isMagic(JS_UNINITIALIZED_LEXICAL)) {
          ReportRuntimeLexicalError(cx, JSMSG_UNINITIALIZED_LEXICAL, id);
          return false;
@@ -100,7 +100,7 @@ diff --git a/js/src/builtin/TestingFunctions.cpp b/js/src/builtin/TestingFunctio
          return "START_OF_LINE";
        case irregexp::RegExpAssertion::START_OF_INPUT:
          return "START_OF_INPUT";
-@@ -4849,17 +4851,17 @@ DisRegExp(JSContext* cx, unsigned argc, 
+@@ -4855,17 +4857,17 @@ DisRegExp(JSContext* cx, unsigned argc, 
      }
  
      if (!RegExpObject::dumpBytecode(cx, reobj, match_only, input))
@@ -119,7 +119,7 @@ diff --git a/js/src/builtin/TestingFunctions.cpp b/js/src/builtin/TestingFunctio
      RootedObject callee(cx, &args.callee());
  
      if (args.length() != 0) {
-@@ -5975,17 +5977,17 @@ gc::ZealModeHelpText),
+@@ -6045,17 +6047,17 @@ gc::ZealModeHelpText),
  "    baselineCompile();  for (var i=0; i<1; i++) {} ...\n"
  "  The interpreter will enter the new jitcode at the loop header unless\n"
  "  baselineCompile returned a string or threw an error.\n"),
@@ -217,7 +217,7 @@ diff --git a/js/src/jit/CodeGenerator.cpp b/js/src/jit/CodeGenerator.cpp
  #include "jit/JitcodeMap.h"
  #include "jit/JitSpewer.h"
  #include "jit/Linker.h"
-@@ -1354,35 +1356,66 @@ CodeGenerator::visitRegExp(LRegExp* lir)
+@@ -1376,35 +1378,66 @@ CodeGenerator::visitRegExp(LRegExp* lir)
          TemplateObject templateObject(source);
          masm.createGCObject(output, temp, templateObject, gc::DefaultHeap, ool->entry());
      } else {
@@ -287,7 +287,7 @@ diff --git a/js/src/jit/CodeGenerator.cpp b/js/src/jit/CodeGenerator.cpp
  PrepareAndExecuteRegExp(JSContext* cx, MacroAssembler& masm, Register regexp, Register input,
                          Register lastIndex,
                          Register temp1, Register temp2, Register temp3,
-@@ -1675,16 +1708,18 @@ PrepareAndExecuteRegExp(JSContext* cx, M
+@@ -1697,16 +1730,18 @@ PrepareAndExecuteRegExp(JSContext* cx, M
      if (mode == RegExpShared::MatchOnly) {
          // endIndex is passed via temp3.
          masm.load32(endIndexAddress, temp3);
@@ -306,7 +306,7 @@ diff --git a/js/src/jit/CodeGenerator.cpp b/js/src/jit/CodeGenerator.cpp
  {
      CharEncoding encoding_;
      Register string_;
-@@ -2223,17 +2258,17 @@ CodeGenerator::visitOutOfLineRegExpMatch
+@@ -2245,17 +2280,17 @@ CodeGenerator::visitOutOfLineRegExpMatch
  
      AllocatableGeneralRegisterSet regs(GeneralRegisterSet::All());
      regs.take(lastIndex);
@@ -325,7 +325,7 @@ diff --git a/js/src/jit/CodeGenerator.cpp b/js/src/jit/CodeGenerator.cpp
  
      // We are not using oolCallVM because we are in a Call, and that live
      // registers are already saved by the the register allocator.
-@@ -2414,17 +2449,17 @@ CodeGenerator::visitOutOfLineRegExpSearc
+@@ -2436,17 +2471,17 @@ CodeGenerator::visitOutOfLineRegExpSearc
  
      AllocatableGeneralRegisterSet regs(GeneralRegisterSet::All());
      regs.take(lastIndex);
@@ -344,7 +344,7 @@ diff --git a/js/src/jit/CodeGenerator.cpp b/js/src/jit/CodeGenerator.cpp
  
      // We are not using oolCallVM because we are in a Call, and that live
      // registers are already saved by the the register allocator.
-@@ -2483,17 +2518,17 @@ JitRealm::generateRegExpTesterStub(JSCon
+@@ -2505,17 +2540,17 @@ JitRealm::generateRegExpTesterStub(JSCon
      regs.take(input);
      regs.take(regexp);
      regs.take(lastIndex);
@@ -363,7 +363,7 @@ diff --git a/js/src/jit/CodeGenerator.cpp b/js/src/jit/CodeGenerator.cpp
                                   &notFound, &oolEntry))
      {
          return nullptr;
-@@ -2508,17 +2543,17 @@ JitRealm::generateRegExpTesterStub(JSCon
+@@ -2530,17 +2565,17 @@ JitRealm::generateRegExpTesterStub(JSCon
      masm.bind(&notFound);
      masm.move32(Imm32(RegExpTesterResultNotFound), result);
      masm.jump(&done);
@@ -385,7 +385,7 @@ diff --git a/js/src/jit/CodeGenerator.cpp b/js/src/jit/CodeGenerator.cpp
 diff --git a/js/src/js.msg b/js/src/js.msg
 --- a/js/src/js.msg
 +++ b/js/src/js.msg
-@@ -529,16 +529,24 @@ MSG_DEF(JSMSG_NOTHING_TO_REPEAT,       0
+@@ -530,16 +530,24 @@ MSG_DEF(JSMSG_NOTHING_TO_REPEAT,       0
  MSG_DEF(JSMSG_NUMBERS_OUT_OF_ORDER,    0, JSEXN_SYNTAXERR, "numbers out of order in {} quantifier.")
  MSG_DEF(JSMSG_RANGE_WITH_CLASS_ESCAPE, 0, JSEXN_SYNTAXERR, "character class escape cannot be used in class range in regular expression")
  MSG_DEF(JSMSG_RAW_BRACE_IN_REGEXP,     0, JSEXN_SYNTAXERR, "raw brace is not allowed in regular expression with unicode flag")
@@ -763,7 +763,7 @@ diff --git a/js/src/vm/JSContext.cpp b/js/src/vm/JSContext.cpp
  #include "vm/HelperThreads.h"
  #include "vm/Iteration.h"
  #include "vm/JSAtom.h"
-@@ -105,18 +108,25 @@ js::AutoCycleDetector::~AutoCycleDetecto
+@@ -106,19 +109,26 @@ js::AutoCycleDetector::~AutoCycleDetecto
      }
  }
  
@@ -778,17 +778,18 @@ diff --git a/js/src/vm/JSContext.cpp b/js/src/vm/JSContext.cpp
 +            return false;
 +        }
 +#else
-         if (!regexpStack.ref().init())
+         if (!regexpStack.ref().init()) {
              return false;
+         }
 +#endif
  
-         if (!fx.initInstance())
+         if (!fx.initInstance()) {
              return false;
+         }
  
  #ifdef JS_SIMULATOR
          simulator_ = jit::Simulator::Create(this);
-         if (!simulator_)
-             return false;
+         if (!simulator_) {
 diff --git a/js/src/vm/JSContext.h b/js/src/vm/JSContext.h
 --- a/js/src/vm/JSContext.h
 +++ b/js/src/vm/JSContext.h
@@ -812,7 +813,7 @@ diff --git a/js/src/vm/JSContext.h b/js/src/vm/JSContext.h
  struct DtoaState;
  
  namespace js {
-@@ -351,18 +354,23 @@ struct JSContext : public JS::RootingCon
+@@ -375,18 +378,23 @@ struct JSContext : public JS::RootingCon
      mozilla::GenericErrorResult<JS::Error&> alreadyReportedError();
  
      /*
@@ -1077,7 +1078,7 @@ diff --git a/js/src/vm/RegExpObject.cpp b/js/src/vm/RegExpObject.cpp
 diff --git a/js/src/vm/Runtime.h b/js/src/vm/Runtime.h
 --- a/js/src/vm/Runtime.h
 +++ b/js/src/vm/Runtime.h
-@@ -22,17 +22,19 @@
+@@ -23,17 +23,19 @@
  #include <setjmp.h>
  
  #include "builtin/AtomicsObject.h"

+ 25 - 24
frg/work-js/mozilla-release/patches/TOP-NOBUG-REGEXP-37-1642493-79a1-25318.patch

@@ -1,7 +1,7 @@
 # HG changeset patch
 # User Dmitry Butskoy <buc@buc.me>
 # Date 1690631112 -7200
-# Parent  eae05eb022a6d8b5f973ca273a85e6be4fa24e91
+# Parent  a8aed28240017221b57d67704958f27e23cdf087
 No Bug - Import new regexp V8 engine. r=frg a=frg
 
 diff --git a/.clang-format-ignore b/.clang-format-ignore
@@ -230,7 +230,7 @@ diff --git a/js/src/builtin/TestingFunctions.cpp b/js/src/builtin/TestingFunctio
  #include "js/AutoByteString.h"
  #include "js/CompilationAndEvaluation.h"
  #include "js/CompileOptions.h"
-@@ -4491,370 +4486,16 @@ GetModuleEnvironmentValue(JSContext* cx,
+@@ -4496,370 +4491,16 @@ GetModuleEnvironmentValue(JSContext* cx,
      if (args.rval().isMagic(JS_UNINITIALIZED_LEXICAL)) {
          ReportRuntimeLexicalError(cx, JSMSG_UNINITIALIZED_LEXICAL, id);
          return false;
@@ -601,7 +601,7 @@ diff --git a/js/src/builtin/TestingFunctions.cpp b/js/src/builtin/TestingFunctio
  
      if (args.length() != 0) {
          ReportUsageErrorASCII(cx, callee, "Wrong number of arguments");
-@@ -6033,26 +5674,16 @@ gc::ZealModeHelpText),
+@@ -6038,26 +5679,16 @@ gc::ZealModeHelpText),
  "    baselineCompile();  for (var i=0; i<1; i++) {} ...\n"
  "  The interpreter will enter the new jitcode at the loop header unless\n"
  "  baselineCompile returned a string or threw an error.\n"),
@@ -23890,7 +23890,7 @@ diff --git a/js/src/jit/CodeGenerator.cpp b/js/src/jit/CodeGenerator.cpp
  #include "vm/RegExpStatics.h"
  #include "vm/StringType.h"
  #include "vm/TraceLogging.h"
-@@ -1499,18 +1494,16 @@ static void UpdateRegExpStatics(MacroAss
+@@ -1521,18 +1516,16 @@ static void UpdateRegExpStatics(MacroAss
                                     RegExpObject::PRIVATE_SLOT)),
                 temp1);
    masm.loadPtr(Address(temp1, RegExpShared::offsetOfSource()), temp2);
@@ -23909,7 +23909,7 @@ diff --git a/js/src/jit/CodeGenerator.cpp b/js/src/jit/CodeGenerator.cpp
                                      Register regexp, Register input,
                                      Register lastIndex, Register temp1,
                                      Register temp2, Register temp3,
-@@ -1710,216 +1703,16 @@ static bool PrepareAndExecuteRegExp(JSCo
+@@ -1732,216 +1725,16 @@ static bool PrepareAndExecuteRegExp(JSCo
    }
    masm.movePtr(ImmPtr(res), temp1);
    UpdateRegExpStatics(masm, regexp, input, lastIndex, temp1, temp2, temp3,
@@ -24126,7 +24126,7 @@ diff --git a/js/src/jit/CodeGenerator.cpp b/js/src/jit/CodeGenerator.cpp
  {
      CharEncoding encoding_;
      Register string_;
-@@ -2236,27 +2029,25 @@ JitRealm::generateRegExpMatcherStub(JSCo
+@@ -2258,27 +2051,25 @@ JitRealm::generateRegExpMatcherStub(JSCo
      Label notFound, oolEntry;
      if (!PrepareAndExecuteRegExp(cx, masm, regexp, input, lastIndex,
                                   temp1, temp2, temp3, inputOutputDataStartOffset,
@@ -24154,7 +24154,7 @@ diff --git a/js/src/jit/CodeGenerator.cpp b/js/src/jit/CodeGenerator.cpp
      masm.bind(&matchResultJoin);
  
      // Initialize slots of result object.
-@@ -2271,21 +2062,19 @@ JitRealm::generateRegExpMatcherStub(JSCo
+@@ -2293,21 +2084,19 @@ JitRealm::generateRegExpMatcherStub(JSCo
                  
      // Initialize the slots of the result object with the dummy values
      // defined in createMatchResultTemplateObject.
@@ -24179,7 +24179,7 @@ diff --git a/js/src/jit/CodeGenerator.cpp b/js/src/jit/CodeGenerator.cpp
 diff --git a/js/src/jit/JitOptions.cpp b/js/src/jit/JitOptions.cpp
 --- a/js/src/jit/JitOptions.cpp
 +++ b/js/src/jit/JitOptions.cpp
-@@ -150,21 +150,19 @@ DefaultJitOptions::DefaultJitOptions()
+@@ -153,21 +153,19 @@ DefaultJitOptions::DefaultJitOptions()
  
      // Whether to enable extra code to perform dynamic validations.
      SET_DEFAULT(runExtraChecks, false);
@@ -24204,7 +24204,7 @@ diff --git a/js/src/jit/JitOptions.cpp b/js/src/jit/JitOptions.cpp
      // Number of bailouts without invalidation before we set
      // JSScript::hadFrequentBailouts and invalidate.
      SET_DEFAULT(frequentBailoutThreshold, 10);
-@@ -272,19 +270,17 @@ DefaultJitOptions::enableGvn(bool enable
+@@ -275,19 +273,17 @@ DefaultJitOptions::enableGvn(bool enable
      disableGvn = !enable;
  }
  
@@ -24227,7 +24227,7 @@ diff --git a/js/src/jit/JitOptions.cpp b/js/src/jit/JitOptions.cpp
 diff --git a/js/src/jit/JitOptions.h b/js/src/jit/JitOptions.h
 --- a/js/src/jit/JitOptions.h
 +++ b/js/src/jit/JitOptions.h
-@@ -69,19 +69,17 @@ struct DefaultJitOptions
+@@ -70,19 +70,17 @@ struct DefaultJitOptions
      bool forceInlineCaches;
      bool fullDebugChecks;
      bool limitScriptSize;
@@ -24273,7 +24273,7 @@ diff --git a/js/src/jit/arm64/Assembler-arm64.h b/js/src/jit/arm64/Assembler-arm
 diff --git a/js/src/js.msg b/js/src/js.msg
 --- a/js/src/js.msg
 +++ b/js/src/js.msg
-@@ -510,30 +510,28 @@ MSG_DEF(JSMSG_INVALID_KEY,             1
+@@ -511,30 +511,28 @@ MSG_DEF(JSMSG_INVALID_KEY,             1
  MSG_DEF(JSMSG_INVALID_LANGUAGE_TAG,    1, JSEXN_RANGEERR, "invalid language tag: {0}")
  MSG_DEF(JSMSG_INVALID_LOCALES_ELEMENT, 0, JSEXN_TYPEERR, "invalid element in locales argument")
  MSG_DEF(JSMSG_INVALID_LOCALE_MATCHER,  1, JSEXN_RANGEERR, "invalid locale matcher in supportedLocalesOf(): {0}")
@@ -41925,7 +41925,7 @@ deleted file mode 100644
 diff --git a/js/src/shell/js.cpp b/js/src/shell/js.cpp
 --- a/js/src/shell/js.cpp
 +++ b/js/src/shell/js.cpp
-@@ -8748,22 +8748,20 @@ SetContextOptions(JSContext* cx, const O
+@@ -8751,22 +8751,20 @@ SetContextOptions(JSContext* cx, const O
      int32_t warmUpThreshold = op.getIntOption("ion-warmup-threshold");
      if (warmUpThreshold >= 0)
          jit::JitOptions.setCompilerWarmUpThreshold(warmUpThreshold);
@@ -41948,7 +41948,7 @@ diff --git a/js/src/shell/js.cpp b/js/src/shell/js.cpp
          jit::JitOptions.forcedRegisterAllocator = jit::LookupRegisterAllocator(str);
          if (!jit::JitOptions.forcedRegisterAllocator.isSome())
              return OptionFailure("ion-regalloc", str);
-@@ -9123,23 +9121,21 @@ main(int argc, char** argv, char** envp)
+@@ -9126,23 +9124,21 @@ main(int argc, char** argv, char** envp)
          || !op.addBoolOption('\0', "test-wasm-await-tier2", "Forcibly activate tiering and block "
                                     "instantiation on completion of tier2")
  #ifdef ENABLE_WASM_GC
@@ -42007,7 +42007,7 @@ diff --git a/js/src/vm/JSContext.cpp b/js/src/vm/JSContext.cpp
  #include "vm/HelperThreads.h"
  #include "vm/Iteration.h"
  #include "vm/JSAtom.h"
-@@ -109,21 +107,16 @@ js::AutoCycleDetector::~AutoCycleDetecto
+@@ -109,22 +107,16 @@ js::AutoCycleDetector::~AutoCycleDetecto
      }
  }
  
@@ -42017,25 +42017,26 @@ diff --git a/js/src/vm/JSContext.cpp b/js/src/vm/JSContext.cpp
      // Skip most of the initialization if this thread will not be running JS.
      if (kind == ContextKind::MainThread) {
 -#ifndef ENABLE_NEW_REGEXP
--        if (!regexpStack.ref().init())
+-        if (!regexpStack.ref().init()) {
 -            return false;
+-        }
 -#endif
 -
-         if (!fx.initInstance())
+         if (!fx.initInstance()) {
              return false;
+         }
  
  #ifdef JS_SIMULATOR
          simulator_ = jit::Simulator::Create(this);
-         if (!simulator_)
-             return false;
- #endif
-@@ -131,22 +124,20 @@ JSContext::init(ContextKind kind)
-         if (!wasm::EnsureSignalHandlers(this))
+         if (!simulator_) {
              return false;
+@@ -136,22 +128,20 @@ JSContext::init(ContextKind kind)
+         }
      } else {
          atomsZoneFreeLists_ = js_new<FreeLists>();
-         if (!atomsZoneFreeLists_)
+         if (!atomsZoneFreeLists_) {
              return false;
+         }
      }
  
 -#ifdef ENABLE_NEW_REGEXP
@@ -42052,7 +42053,7 @@ diff --git a/js/src/vm/JSContext.cpp b/js/src/vm/JSContext.cpp
      return true;
  }
  
-@@ -1355,19 +1346,17 @@ JSContext::~JSContext()
+@@ -1384,19 +1374,17 @@ JSContext::~JSContext()
  #endif
  
  #ifdef JS_TRACE_LOGGING
@@ -42101,7 +42102,7 @@ diff --git a/js/src/vm/JSContext.h b/js/src/vm/JSContext.h
  struct DtoaState;
  
  namespace js {
-@@ -355,23 +353,18 @@ struct JSContext : public JS::RootingCon
+@@ -378,23 +376,18 @@ struct JSContext : public JS::RootingCon
      mozilla::GenericErrorResult<JS::Error&> alreadyReportedError();
  
      /*

+ 0 - 70
frg/work-js/mozilla-release/patches/mozilla-central-push_427634.patch

@@ -1,70 +0,0 @@
-# HG changeset patch
-# User Jan de Mooij <jdemooij@mozilla.com>
-# Date 1532176300 -7200
-#      Sat Jul 21 14:31:40 2018 +0200
-# Node ID c9c0fea0993bb64a234ed23389450a38e13ea822
-# Parent  18a20a23b5e7c0f631f915d2a6becd55908bc00c
-Bug 1475559 part 1 - Remove unused GetFirstSubsumedSavedFrame API. r=bz
-
-diff --git a/js/src/jsfriendapi.h b/js/src/jsfriendapi.h
---- a/js/src/jsfriendapi.h
-+++ b/js/src/jsfriendapi.h
-@@ -2958,27 +2958,16 @@ typedef long
-  * only once per process.
-  */
- extern JS_FRIEND_API(void)
- SetJitExceptionHandler(JitExceptionHandler handler);
- #endif
- 
- /**
-  * Get the first SavedFrame object in this SavedFrame stack whose principals are
-- * subsumed by the cx's principals. If there is no such frame, return nullptr.
-- *
-- * Do NOT pass a non-SavedFrame object here.
-- *
-- * The savedFrame and cx do not need to be in the same compartment.
-- */
--extern JS_FRIEND_API(JSObject*)
--GetFirstSubsumedSavedFrame(JSContext* cx, JS::HandleObject savedFrame, JS::SavedFrameSelfHosted selfHosted);
--
--/**
-- * Get the first SavedFrame object in this SavedFrame stack whose principals are
-  * subsumed by the given |principals|. If there is no such frame, return nullptr.
-  *
-  * Do NOT pass a non-SavedFrame object here.
-  */
- extern JS_FRIEND_API(JSObject*)
- GetFirstSubsumedSavedFrame(JSContext* cx, JSPrincipals* principals, JS::HandleObject savedFrame, JS::SavedFrameSelfHosted selfHosted);
- 
- extern JS_FRIEND_API(bool)
-diff --git a/js/src/vm/SavedStacks.cpp b/js/src/vm/SavedStacks.cpp
---- a/js/src/vm/SavedStacks.cpp
-+++ b/js/src/vm/SavedStacks.cpp
-@@ -666,27 +666,16 @@ GetFirstMatchedFrame(JSContext* cx, Matc
- static SavedFrame*
- GetFirstSubsumedFrame(JSContext* cx, HandleSavedFrame frame, JS::SavedFrameSelfHosted selfHosted,
-                       bool& skippedAsync)
- {
-     return GetFirstMatchedFrame(cx, SavedFrameSubsumedByCaller, frame, selfHosted, skippedAsync);
- }
- 
- JS_FRIEND_API(JSObject*)
--GetFirstSubsumedSavedFrame(JSContext* cx, HandleObject savedFrame,
--                           JS::SavedFrameSelfHosted selfHosted)
--{
--    if (!savedFrame)
--        return nullptr;
--    bool skippedAsync;
--    RootedSavedFrame frame(cx, &savedFrame->as<SavedFrame>());
--    return GetFirstSubsumedFrame(cx, frame, selfHosted, skippedAsync);
--}
--
--JS_FRIEND_API(JSObject*)
- GetFirstSubsumedSavedFrame(JSContext* cx, JSPrincipals* principals,
-                            HandleObject savedFrame,
-                            JS::SavedFrameSelfHosted selfHosted)
- {
-     if (!savedFrame)
-         return nullptr;
- 
-     auto subsumes = cx->runtime()->securityCallbacks->subsumes;

+ 0 - 711
frg/work-js/mozilla-release/patches/mozilla-central-push_427643.patch

@@ -1,711 +0,0 @@
-# HG changeset patch
-# User Brian Hackett <bhackett1024@gmail.com>
-# Date 1532131114 0
-#      Fri Jul 20 23:58:34 2018 +0000
-# Node ID 5c8c2d8a6003d2729497a2cf93c9afc89d2bf4f4
-# Parent  ff3c10d0cc05d15ec0e3e2d7c4d95c6dd860f0d1
-Bug 1309552 - Specify buffer size when freeing data in AllocPolicy, r=waldo.
-
-diff --git a/js/public/AllocPolicy.h b/js/public/AllocPolicy.h
---- a/js/public/AllocPolicy.h
-+++ b/js/public/AllocPolicy.h
-@@ -35,17 +35,17 @@ class SystemAllocPolicy
-     template <typename T> T* maybe_pod_realloc(T* p, size_t oldSize, size_t newSize) {
-         return js_pod_realloc<T>(p, oldSize, newSize);
-     }
-     template <typename T> T* pod_malloc(size_t numElems) { return maybe_pod_malloc<T>(numElems); }
-     template <typename T> T* pod_calloc(size_t numElems) { return maybe_pod_calloc<T>(numElems); }
-     template <typename T> T* pod_realloc(T* p, size_t oldSize, size_t newSize) {
-         return maybe_pod_realloc<T>(p, oldSize, newSize);
-     }
--    void free_(void* p) { js_free(p); }
-+    template <typename T> void free_(T* p, size_t numElems = 0) { js_free(p); }
-     void reportAllocOverflow() const {}
-     bool checkSimulatedOOM() const {
-         return !js::oom::ShouldFailWithOOM();
-     }
- };
- 
- MOZ_COLD JS_FRIEND_API(void) ReportOutOfMemory(JSContext* cx);
- 
-@@ -114,17 +114,18 @@ class TempAllocPolicy
-     template <typename T>
-     T* pod_realloc(T* prior, size_t oldSize, size_t newSize) {
-         T* p2 = maybe_pod_realloc<T>(prior, oldSize, newSize);
-         if (MOZ_UNLIKELY(!p2))
-             p2 = onOutOfMemoryTyped<T>(AllocFunction::Realloc, newSize, prior);
-         return p2;
-     }
- 
--    void free_(void* p) {
-+    template <typename T>
-+    void free_(T* p, size_t numElems = 0) {
-         js_free(p);
-     }
- 
-     JS_FRIEND_API(void) reportAllocOverflow() const;
- 
-     bool checkSimulatedOOM() const {
-         if (js::oom::ShouldFailWithOOM()) {
-             ReportOutOfMemory(cx_);
-@@ -156,17 +157,17 @@ class ZoneAllocPolicy
-     // These methods are defined in gc/Zone.h.
-     template <typename T> inline T* maybe_pod_malloc(size_t numElems);
-     template <typename T> inline T* maybe_pod_calloc(size_t numElems);
-     template <typename T> inline T* maybe_pod_realloc(T* p, size_t oldSize, size_t newSize);
-     template <typename T> inline T* pod_malloc(size_t numElems);
-     template <typename T> inline T* pod_calloc(size_t numElems);
-     template <typename T> inline T* pod_realloc(T* p, size_t oldSize, size_t newSize);
- 
--    void free_(void* p) { js_free(p); }
-+    template <typename T> void free_(T* p, size_t numElems = 0) { js_free(p); }
-     void reportAllocOverflow() const {}
- 
-     MOZ_MUST_USE bool checkSimulatedOOM() const {
-         return !js::oom::ShouldFailWithOOM();
-     }
- };
- 
- } /* namespace js */
-diff --git a/js/public/HashTable.h b/js/public/HashTable.h
---- a/js/public/HashTable.h
-+++ b/js/public/HashTable.h
-@@ -1314,17 +1314,17 @@ class HashTable : private AllocPolicy
-         return table;
-     }
- 
-     static void destroyTable(AllocPolicy& alloc, Entry* oldTable, uint32_t capacity)
-     {
-         Entry* end = oldTable + capacity;
-         for (Entry* e = oldTable; e < end; ++e)
-             e->~Entry();
--        alloc.free_(oldTable);
-+        alloc.free_(oldTable, capacity);
-     }
- 
-   public:
-     explicit HashTable(AllocPolicy ap)
-       : AllocPolicy(ap)
-       , gen(0)
-       , hashShift(sHashBits)
-       , table(nullptr)
-@@ -1582,17 +1582,17 @@ class HashTable : private AllocPolicy
-                 findFreeEntry(hn).setLive(
-                     hn, std::move(const_cast<typename Entry::NonConstT&>(src->get())));
-             }
- 
-             src->~Entry();
-         }
- 
-         // All entries have been destroyed, no need to destroyTable.
--        this->free_(oldTable);
-+        this->free_(oldTable, oldCap);
-         return Rehashed;
-     }
- 
-     bool shouldCompressTable()
-     {
-         // Compress if a quarter or more of all entries are removed.
-         return removedCount >= (capacity() >> 2);
-     }
-diff --git a/js/src/ds/LifoAlloc.h b/js/src/ds/LifoAlloc.h
---- a/js/src/ds/LifoAlloc.h
-+++ b/js/src/ds/LifoAlloc.h
-@@ -1028,17 +1028,18 @@ class LifoAllocPolicy
-     template <typename T>
-     T* pod_calloc(size_t numElems) {
-         return maybe_pod_calloc<T>(numElems);
-     }
-     template <typename T>
-     T* pod_realloc(T* p, size_t oldSize, size_t newSize) {
-         return maybe_pod_realloc<T>(p, oldSize, newSize);
-     }
--    void free_(void* p) {
-+    template <typename T>
-+    void free_(T* p, size_t numElems) {
-     }
-     void reportAllocOverflow() const {
-     }
-     MOZ_MUST_USE bool checkSimulatedOOM() const {
-         return fb == Infallible || !js::oom::ShouldFailWithOOM();
-     }
- };
- 
-diff --git a/js/src/ds/OrderedHashTable.h b/js/src/ds/OrderedHashTable.h
---- a/js/src/ds/OrderedHashTable.h
-+++ b/js/src/ds/OrderedHashTable.h
-@@ -119,17 +119,17 @@ class OrderedHashTable
-         if (!tableAlloc)
-             return false;
-         for (uint32_t i = 0; i < buckets; i++)
-             tableAlloc[i] = nullptr;
- 
-         uint32_t capacity = uint32_t(buckets * fillFactor());
-         Data* dataAlloc = alloc.template pod_malloc<Data>(capacity);
-         if (!dataAlloc) {
--            alloc.free_(tableAlloc);
-+            alloc.free_(tableAlloc, buckets);
-             return false;
-         }
- 
-         // clear() requires that members are assigned only after all allocation
-         // has succeeded, and that this->ranges is left untouched.
-         hashTable = tableAlloc;
-         data = dataAlloc;
-         dataLength = 0;
-@@ -137,18 +137,18 @@ class OrderedHashTable
-         liveCount = 0;
-         hashShift = HashNumberSizeBits - initialBucketsLog2();
-         MOZ_ASSERT(hashBuckets() == buckets);
-         return true;
-     }
- 
-     ~OrderedHashTable() {
-         forEachRange<Range::onTableDestroyed>();
--        alloc.free_(hashTable);
--        freeData(data, dataLength);
-+        alloc.free_(hashTable, hashBuckets());
-+        freeData(data, dataLength, dataCapacity);
-     }
- 
-     /* Return the number of elements in the table. */
-     uint32_t count() const { return liveCount; }
- 
-     /* True if any element matches l. */
-     bool has(const Lookup& l) const {
-         return lookup(l) != nullptr;
-@@ -243,27 +243,29 @@ class OrderedHashTable
-      * The effect on live Ranges is the same as removing all entries; in
-      * particular, those Ranges are still live and will see any entries added
-      * after a successful clear().
-      */
-     MOZ_MUST_USE bool clear() {
-         if (dataLength != 0) {
-             Data** oldHashTable = hashTable;
-             Data* oldData = data;
-+            uint32_t oldHashBuckets = hashBuckets();
-             uint32_t oldDataLength = dataLength;
-+            uint32_t oldDataCapacity = dataCapacity;
- 
-             hashTable = nullptr;
-             if (!init()) {
-                 // init() only mutates members on success; see comment above.
-                 hashTable = oldHashTable;
-                 return false;
-             }
- 
--            alloc.free_(oldHashTable);
--            freeData(oldData, oldDataLength);
-+            alloc.free_(oldHashTable, oldHashBuckets);
-+            freeData(oldData, oldDataLength, oldDataCapacity);
-             forEachRange<&Range::onClear>();
-         }
- 
-         MOZ_ASSERT(hashTable);
-         MOZ_ASSERT(data);
-         MOZ_ASSERT(dataLength == 0);
-         MOZ_ASSERT(liveCount == 0);
-         return true;
-@@ -625,19 +627,19 @@ class OrderedHashTable
-         return 1 << (HashNumberSizeBits - hashShift);
-     }
- 
-     static void destroyData(Data* data, uint32_t length) {
-         for (Data* p = data + length; p != data; )
-             (--p)->~Data();
-     }
- 
--    void freeData(Data* data, uint32_t length) {
-+    void freeData(Data* data, uint32_t length, uint32_t capacity) {
-         destroyData(data, length);
--        alloc.free_(data);
-+        alloc.free_(data, capacity);
-     }
- 
-     Data* lookup(const Lookup& l, HashNumber h) {
-         for (Data* e = hashTable[h >> hashShift]; e; e = e->chain) {
-             if (Ops::match(Ops::getKey(e->element), l))
-                 return e;
-         }
-         return nullptr;
-@@ -699,34 +701,34 @@ class OrderedHashTable
-         if (!newHashTable)
-             return false;
-         for (uint32_t i = 0; i < newHashBuckets; i++)
-             newHashTable[i] = nullptr;
- 
-         uint32_t newCapacity = uint32_t(newHashBuckets * fillFactor());
-         Data* newData = alloc.template pod_malloc<Data>(newCapacity);
-         if (!newData) {
--            alloc.free_(newHashTable);
-+            alloc.free_(newHashTable, newHashBuckets);
-             return false;
-         }
- 
-         Data* wp = newData;
-         Data* end = data + dataLength;
-         for (Data* p = data; p != end; p++) {
-             if (!Ops::isEmpty(Ops::getKey(p->element))) {
-                 HashNumber h = prepareHash(Ops::getKey(p->element)) >> newHashShift;
-                 new (wp) Data(std::move(p->element), newHashTable[h]);
-                 newHashTable[h] = wp;
-                 wp++;
-             }
-         }
-         MOZ_ASSERT(wp == newData + liveCount);
- 
--        alloc.free_(hashTable);
--        freeData(data, dataLength);
-+        alloc.free_(hashTable, hashBuckets());
-+        freeData(data, dataLength, dataCapacity);
- 
-         hashTable = newHashTable;
-         data = newData;
-         dataLength = liveCount;
-         dataCapacity = newCapacity;
-         hashShift = newHashShift;
-         MOZ_ASSERT(hashBuckets() == newHashBuckets);
- 
-diff --git a/js/src/jit/JitAllocPolicy.h b/js/src/jit/JitAllocPolicy.h
---- a/js/src/jit/JitAllocPolicy.h
-+++ b/js/src/jit/JitAllocPolicy.h
-@@ -119,17 +119,18 @@ class JitAllocPolicy
-     template <typename T>
-     T* pod_calloc(size_t numElems) {
-         return maybe_pod_calloc<T>(numElems);
-     }
-     template <typename T>
-     T* pod_realloc(T* ptr, size_t oldSize, size_t newSize) {
-         return maybe_pod_realloc<T>(ptr, oldSize, newSize);
-     }
--    void free_(void* p) {
-+    template <typename T>
-+    void free_(T* p, size_t numElems = 0) {
-     }
-     void reportAllocOverflow() const {
-     }
-     MOZ_MUST_USE bool checkSimulatedOOM() const {
-         return !js::oom::ShouldFailWithOOM();
-     }
- };
- 
-diff --git a/memory/mozalloc/mozalloc.h b/memory/mozalloc/mozalloc.h
---- a/memory/mozalloc/mozalloc.h
-+++ b/memory/mozalloc/mozalloc.h
-@@ -239,17 +239,18 @@ public:
-     T* pod_realloc(T* aPtr, size_t aOldSize, size_t aNewSize)
-     {
-         if (aNewSize & mozilla::tl::MulOverflowMask<sizeof(T)>::value) {
-             reportAllocOverflow();
-         }
-         return static_cast<T*>(moz_xrealloc(aPtr, aNewSize * sizeof(T)));
-     }
- 
--    void free_(void* aPtr)
-+    template <typename T>
-+    void free_(T* aPtr, size_t aNumElems = 0)
-     {
-         free_impl(aPtr);
-     }
- 
-     void reportAllocOverflow() const
-     {
-         mozalloc_abort("alloc overflow");
-     }
-diff --git a/memory/replace/dmd/DMD.cpp b/memory/replace/dmd/DMD.cpp
---- a/memory/replace/dmd/DMD.cpp
-+++ b/memory/replace/dmd/DMD.cpp
-@@ -181,17 +181,18 @@ public:
- 
-   static void* memalign_(size_t aAlignment, size_t aSize)
-   {
-     void* p = gMallocTable.memalign(aAlignment, aSize);
-     ExitOnFailure(p);
-     return p;
-   }
- 
--  static void free_(void* aPtr) { gMallocTable.free(aPtr); }
-+  template <typename T>
-+  static void free_(T* aPtr, size_t aSize = 0) { gMallocTable.free(aPtr); }
- 
-   static char* strdup_(const char* aStr)
-   {
-     char* s = (char*) InfallibleAllocPolicy::malloc_(strlen(aStr) + 1);
-     strcpy(s, aStr);
-     return s;
-   }
- 
-diff --git a/mfbt/AllocPolicy.h b/mfbt/AllocPolicy.h
---- a/mfbt/AllocPolicy.h
-+++ b/mfbt/AllocPolicy.h
-@@ -37,17 +37,21 @@ namespace mozilla {
-  *      size is passed in, in addition to the new allocation size requested.
-  *  - template <typename T> T* pod_malloc(size_t)
-  *      Responsible for OOM reporting when null is returned.
-  *  - template <typename T> T* pod_calloc(size_t)
-  *      Responsible for OOM reporting when null is returned.
-  *  - template <typename T> T* pod_realloc(T*, size_t, size_t)
-  *      Responsible for OOM reporting when null is returned.  The old allocation
-  *      size is passed in, in addition to the new allocation size requested.
-- *  - void free_(void*)
-+ *  - template <typename T> void free_(T*, size_t)
-+ *      The capacity passed in must match the old allocation size.
-+ *  - template <typename T> void free_(T*)
-+ *      Frees a buffer without knowing its allocated size. This might not be
-+ *      implemented by allocation policies that need the allocation size.
-  *  - void reportAllocOverflow() const
-  *      Called on allocation overflow (that is, an allocation implicitly tried
-  *      to allocate more than the available memory space -- think allocating an
-  *      array of large-size objects, where N * size overflows) before null is
-  *      returned.
-  *  - bool checkSimulatedOOM() const
-  *      Some clients generally allocate memory yet in some circumstances won't
-  *      need to do so. For example, appending to a vector with a small amount of
-@@ -109,17 +113,18 @@ public:
-   }
- 
-   template <typename T>
-   T* pod_realloc(T* aPtr, size_t aOldSize, size_t aNewSize)
-   {
-     return maybe_pod_realloc<T>(aPtr, aOldSize, aNewSize);
-   }
- 
--  void free_(void* aPtr)
-+  template <typename T>
-+  void free_(T* aPtr, size_t aNumElems = 0)
-   {
-     free(aPtr);
-   }
- 
-   void reportAllocOverflow() const
-   {
-   }
- 
-@@ -170,17 +175,18 @@ public:
-   }
- 
-   template <typename T>
-   T* pod_realloc(T* aPtr, size_t aOldSize, size_t aNewSize)
-   {
-     MOZ_CRASH("NeverAllocPolicy::pod_realloc");
-   }
- 
--  void free_(void* aPtr)
-+  template <typename T>
-+  void free_(T* aPtr, size_t aNumElems = 0)
-   {
-     MOZ_CRASH("NeverAllocPolicy::free_");
-   }
- 
-   void reportAllocOverflow() const
-   {
-   }
- 
-diff --git a/mfbt/BufferList.h b/mfbt/BufferList.h
---- a/mfbt/BufferList.h
-+++ b/mfbt/BufferList.h
-@@ -146,17 +146,17 @@ class BufferList : private AllocPolicy
-     }
-     return size;
-   }
- 
-   void Clear()
-   {
-     if (mOwning) {
-       for (Segment& segment : mSegments) {
--        this->free_(segment.mData);
-+        this->free_(segment.mData, segment.mCapacity);
-       }
-     }
-     mSegments.clear();
- 
-     mSize = 0;
-   }
- 
-   // Iterates over bytes in the segments. You can advance it by as many bytes as
-@@ -362,17 +362,17 @@ class BufferList : private AllocPolicy
-   // This takes ownership of the data
-   void* WriteBytesZeroCopy(char *aData, size_t aSize, size_t aCapacity)
-   {
-     MOZ_ASSERT(aCapacity != 0);
-     MOZ_ASSERT(aSize <= aCapacity);
-     MOZ_ASSERT(mOwning);
- 
-     if (!mSegments.append(Segment(aData, aSize, aCapacity))) {
--      this->free_(aData);
-+      this->free_(aData, aCapacity);
-       return nullptr;
-     }
-     mSize += aSize;
-     return aData;
-   }
- 
- private:
-   explicit BufferList(AllocPolicy aAP)
-@@ -389,17 +389,17 @@ private:
-     MOZ_ASSERT(aCapacity != 0);
-     MOZ_ASSERT(aSize <= aCapacity);
- 
-     char* data = this->template pod_malloc<char>(aCapacity);
-     if (!data) {
-       return nullptr;
-     }
-     if (!mSegments.append(Segment(data, aSize, aCapacity))) {
--      this->free_(data);
-+      this->free_(data, aCapacity);
-       return nullptr;
-     }
-     mSize += aSize;
-     return data;
-   }
- 
-   bool mOwning;
-   Vector<Segment, 1, AllocPolicy> mSegments;
-diff --git a/mfbt/SegmentedVector.h b/mfbt/SegmentedVector.h
---- a/mfbt/SegmentedVector.h
-+++ b/mfbt/SegmentedVector.h
-@@ -187,17 +187,17 @@ public:
-     MOZ_RELEASE_ASSERT(ok);
-   }
- 
-   void Clear()
-   {
-     Segment* segment;
-     while ((segment = mSegments.popFirst())) {
-       segment->~Segment();
--      this->free_(segment);
-+      this->free_(segment, 1);
-     }
-   }
- 
-   T& GetLast()
-   {
-     MOZ_ASSERT(!IsEmpty());
-     Segment* last = mSegments.getLast();
-     return (*last)[last->Length() - 1];
-@@ -213,17 +213,17 @@ public:
-   void PopLast()
-   {
-     MOZ_ASSERT(!IsEmpty());
-     Segment* last = mSegments.getLast();
-     last->PopLast();
-     if (!last->Length()) {
-       mSegments.popLast();
-       last->~Segment();
--      this->free_(last);
-+      this->free_(last, 1);
-     }
-   }
- 
-   // Equivalent to calling |PopLast| |aNumElements| times, but potentially
-   // more efficient.
-   void PopLastN(uint32_t aNumElements)
-   {
-     MOZ_ASSERT(aNumElements <= Length());
-@@ -246,17 +246,17 @@ public:
-       uint32_t segmentLen = last->Length();
-       if (segmentLen > aNumElements) {
-         break;
-       }
- 
-       // Destroying the segment destroys all elements contained therein.
-       mSegments.popLast();
-       last->~Segment();
--      this->free_(last);
-+      this->free_(last, 1);
- 
-       MOZ_ASSERT(aNumElements >= segmentLen);
-       aNumElements -= segmentLen;
-       if (aNumElements == 0) {
-         return;
-       }
-     } while (true);
- 
-diff --git a/mfbt/Vector.h b/mfbt/Vector.h
---- a/mfbt/Vector.h
-+++ b/mfbt/Vector.h
-@@ -139,17 +139,17 @@ struct VectorImpl
-       return false;
-     }
-     T* dst = newbuf;
-     T* src = aV.beginNoCheck();
-     for (; src < aV.endNoCheck(); ++dst, ++src) {
-       new_(dst, std::move(*src));
-     }
-     VectorImpl::destroy(aV.beginNoCheck(), aV.endNoCheck());
--    aV.free_(aV.mBegin);
-+    aV.free_(aV.mBegin, aV.mTail.mCapacity);
-     aV.mBegin = newbuf;
-     /* aV.mLength is unchanged. */
-     aV.mTail.mCapacity = aNewCap;
-     return true;
-   }
- };
- 
- /*
-@@ -239,17 +239,17 @@ struct VectorImpl<T, N, AP, true>
- 
-   static inline void
-   podResizeToFit(Vector<T, N, AP>& aV)
-   {
-     if (aV.usingInlineStorage() || aV.mLength == aV.mTail.mCapacity) {
-       return;
-     }
-     if (!aV.mLength) {
--      aV.free_(aV.mBegin);
-+      aV.free_(aV.mBegin, aV.mTail.mCapacity);
-       aV.mBegin = aV.inlineStorage();
-       aV.mTail.mCapacity = aV.kInlineCapacity;
- #ifdef DEBUG
-       aV.mTail.mReserved = 0;
- #endif
-       return;
-     }
-     T* newbuf =
-@@ -922,17 +922,17 @@ Vector<T, N, AP>::operator=(Vector&& aRh
- 
- template<typename T, size_t N, class AP>
- MOZ_ALWAYS_INLINE
- Vector<T, N, AP>::~Vector()
- {
-   MOZ_REENTRANCY_GUARD_ET_AL;
-   Impl::destroy(beginNoCheck(), endNoCheck());
-   if (!usingInlineStorage()) {
--    this->free_(beginNoCheck());
-+    this->free_(beginNoCheck(), mTail.mCapacity);
-   }
- }
- 
- template<typename T, size_t N, class AP>
- MOZ_ALWAYS_INLINE void
- Vector<T, N, AP>::reverse() {
-   MOZ_REENTRANCY_GUARD_ET_AL;
-   T* elems = mBegin;
-@@ -1233,17 +1233,17 @@ template<typename T, size_t N, class AP>
- inline void
- Vector<T, N, AP>::clearAndFree()
- {
-   clear();
- 
-   if (usingInlineStorage()) {
-     return;
-   }
--  this->free_(beginNoCheck());
-+  this->free_(beginNoCheck(), mTail.mCapacity);
-   mBegin = inlineStorage();
-   mTail.mCapacity = kInlineCapacity;
- #ifdef DEBUG
-   mTail.mReserved = 0;
- #endif
- }
- 
- template<typename T, size_t N, class AP>
-@@ -1506,32 +1506,32 @@ template<typename T, size_t N, class AP>
- inline void
- Vector<T, N, AP>::replaceRawBuffer(T* aP, size_t aLength, size_t aCapacity)
- {
-   MOZ_REENTRANCY_GUARD_ET_AL;
- 
-   /* Destroy what we have. */
-   Impl::destroy(beginNoCheck(), endNoCheck());
-   if (!usingInlineStorage()) {
--    this->free_(beginNoCheck());
-+    this->free_(beginNoCheck(), mTail.mCapacity);
-   }
- 
-   /* Take in the new buffer. */
-   if (aCapacity <= kInlineCapacity) {
-     /*
-      * We convert to inline storage if possible, even though aP might
-      * otherwise be acceptable.  Maybe this behaviour should be
-      * specifiable with an argument to this function.
-      */
-     mBegin = inlineStorage();
-     mLength = aLength;
-     mTail.mCapacity = kInlineCapacity;
-     Impl::moveConstruct(mBegin, aP, aP + aLength);
-     Impl::destroy(aP, aP + aLength);
--    this->free_(aP);
-+    this->free_(aP, aCapacity);
-   } else {
-     mBegin = aP;
-     mLength = aLength;
-     mTail.mCapacity = aCapacity;
-   }
- #ifdef DEBUG
-   mTail.mReserved = aCapacity;
- #endif
-diff --git a/mfbt/tests/TestBufferList.cpp b/mfbt/tests/TestBufferList.cpp
---- a/mfbt/tests/TestBufferList.cpp
-+++ b/mfbt/tests/TestBufferList.cpp
-@@ -21,17 +21,18 @@ public:
-     }
-     T* rv = static_cast<T*>(malloc(aNumElems * sizeof(T)));
-     if (!rv) {
-       MOZ_CRASH("TestBufferList.cpp: out of memory");
-     }
-     return rv;
-   }
- 
--  void free_(void* aPtr) { free(aPtr); }
-+  template <typename T>
-+  void free_(T* aPtr, size_t aNumElems = 0) { free(aPtr); }
- 
-   void reportAllocOverflow() const {}
- 
-   bool checkSimulatedOOM() const { return true; }
- };
- 
- typedef mozilla::BufferList<InfallibleAllocPolicy> BufferList;
- 
-diff --git a/mfbt/tests/TestSegmentedVector.cpp b/mfbt/tests/TestSegmentedVector.cpp
---- a/mfbt/tests/TestSegmentedVector.cpp
-+++ b/mfbt/tests/TestSegmentedVector.cpp
-@@ -26,17 +26,18 @@ public:
-     }
-     T* rv = static_cast<T*>(malloc(aNumElems * sizeof(T)));
-     if (!rv) {
-       MOZ_CRASH("TestSegmentedVector.cpp: out of memory");
-     }
-     return rv;
-   }
- 
--  void free_(void* aPtr) { free(aPtr); }
-+  template <typename T>
-+  void free_(T* aPtr, size_t aNumElems = 0) { free(aPtr); }
- };
- 
- // We want to test Append(), which is fallible and marked with
- // MOZ_MUST_USE. But we're using an infallible alloc policy, and so
- // don't really need to check the result. Casting to |void| works with clang
- // but not GCC, so we instead use this dummy variable which works with both
- // compilers.
- static int gDummy;
-diff --git a/mozglue/misc/Printf.h b/mozglue/misc/Printf.h
---- a/mozglue/misc/Printf.h
-+++ b/mozglue/misc/Printf.h
-@@ -160,21 +160,23 @@ class MOZ_STACK_CLASS SprintfState final
-         ptrdiff_t off;
-         char* newbase;
-         size_t newlen;
- 
-         off = mCur - mBase;
-         if (off + len >= mMaxlen) {
-             /* Grow the buffer */
-             newlen = mMaxlen + ((len > 32) ? len : 32);
--            newbase = static_cast<char*>(this->maybe_pod_realloc(mBase, mMaxlen, newlen));
-+            newbase = this->template maybe_pod_malloc<char>(newlen);
-             if (!newbase) {
-                 /* Ran out of memory */
-                 return false;
-             }
-+            memcpy(newbase, mBase, mMaxlen);
-+            this->free_(mBase);
-             mBase = newbase;
-             mMaxlen = newlen;
-             mCur = mBase + off;
-         }
- 
-         /* Copy data */
-         memcpy(mCur, sp, len);
-         mCur += len;

+ 0 - 62
frg/work-js/mozilla-release/patches/mozilla-central-push_427656.patch

@@ -1,62 +0,0 @@
-# HG changeset patch
-# User Jeff Walden <jwalden@mit.edu>
-# Date 1531177901 25200
-#      Mon Jul 09 16:11:41 2018 -0700
-# Node ID 96e6f8645b7c00eb4bd9eab952c2c24ab1ed9ec2
-# Parent  245cd4d3a38b4ee287e9973989978b941da2f2d7
-Bug 1476866 - Implement a bare-bones TokenStreamChars specialization for UTF-8, into which subsequent UTF-8-centric functions can be added.  r=arai
-
-diff --git a/js/src/frontend/TokenStream.h b/js/src/frontend/TokenStream.h
---- a/js/src/frontend/TokenStream.h
-+++ b/js/src/frontend/TokenStream.h
-@@ -1579,17 +1579,16 @@ class GeneralTokenStreamChars
- };
- 
- template<typename CharT, class AnyCharsAccess> class TokenStreamChars;
- 
- template<class AnyCharsAccess>
- class TokenStreamChars<char16_t, AnyCharsAccess>
-   : public GeneralTokenStreamChars<char16_t, AnyCharsAccess>
- {
--  private:
-     using CharsBase = TokenStreamCharsBase<char16_t>;
-     using SpecializedCharsBase = SpecializedTokenStreamCharsBase<char16_t>;
-     using GeneralCharsBase = GeneralTokenStreamChars<char16_t, AnyCharsAccess>;
-     using Self = TokenStreamChars<char16_t, AnyCharsAccess>;
- 
-     using GeneralCharsBase::asSpecific;
- 
-     using typename GeneralCharsBase::TokenStreamSpecific;
-@@ -1715,16 +1714,32 @@ class TokenStreamChars<char16_t, AnyChar
-     MOZ_MUST_USE bool consumeRestOfSingleLineComment() {
-         // This operation is infallible for UTF-16 -- and this implementation
-         // approach lets the compiler boil away call-side fallibility handling.
-         infallibleConsumeRestOfSingleLineComment();
-         return true;
-     }
- };
- 
-+template<class AnyCharsAccess>
-+class TokenStreamChars<mozilla::Utf8Unit, AnyCharsAccess>
-+  : public GeneralTokenStreamChars<mozilla::Utf8Unit, AnyCharsAccess>
-+{
-+    using CharsBase = TokenStreamCharsBase<mozilla::Utf8Unit>;
-+    using SpecializedCharsBase = SpecializedTokenStreamCharsBase<mozilla::Utf8Unit>;
-+    using GeneralCharsBase = GeneralTokenStreamChars<mozilla::Utf8Unit, AnyCharsAccess>;
-+    using Self = TokenStreamChars<mozilla::Utf8Unit, AnyCharsAccess>;
-+
-+  protected:
-+    // Deliberately don't |using| |sourceUnits| because of bug 1472569.  :-(
-+
-+  protected:
-+    using GeneralCharsBase::GeneralCharsBase;
-+};
-+
- // TokenStream is the lexical scanner for JavaScript source text.
- //
- // It takes a buffer of CharT code units (currently only char16_t encoding
- // UTF-16, but we're adding either UTF-8 or Latin-1 single-byte text soon) and
- // linearly scans it into |Token|s.
- //
- // Internally the class uses a four element circular buffer |tokens| of
- // |Token|s. As an index for |tokens|, the member |cursor_| points to the

+ 0 - 143
frg/work-js/mozilla-release/patches/mozilla-central-push_427657.patch

@@ -1,143 +0,0 @@
-# HG changeset patch
-# User Jeff Walden <jwalden@mit.edu>
-# Date 1531962321 25200
-#      Wed Jul 18 18:05:21 2018 -0700
-# Node ID 6ac4c8ad6b9a20ba54462a2e877c594df8767401
-# Parent  96e6f8645b7c00eb4bd9eab952c2c24ab1ed9ec2
-Bug 1476866 - Move TokenStreamSpecific::computeLineOfContext to GeneralTokenStreamChars::internalComputeLineOfContext, and beef up its doc comment a little.  r=arai
-
-diff --git a/js/src/frontend/TokenStream.cpp b/js/src/frontend/TokenStream.cpp
---- a/js/src/frontend/TokenStream.cpp
-+++ b/js/src/frontend/TokenStream.cpp
-@@ -803,27 +803,24 @@ TokenStreamSpecific<CharT, AnyCharsAcces
-     // This function's return value isn't a success/failure indication: it
-     // returns true if this TokenStream's location information could be used,
-     // and it returns false when that information can't be used (and so we
-     // can't provide a line of context).
-     if (!anyCharsAccess().fillExcludingContext(err, offset))
-         return true;
- 
-     // Add a line of context from this TokenStream to help with debugging.
--    return computeLineOfContext(err, offset);
-+    return internalComputeLineOfContext(err, offset);
- }
- 
- template<typename CharT, class AnyCharsAccess>
- bool
--TokenStreamSpecific<CharT, AnyCharsAccess>::computeLineOfContext(ErrorMetadata* err,
--                                                                 uint32_t offset)
-+GeneralTokenStreamChars<CharT, AnyCharsAccess>::internalComputeLineOfContext(ErrorMetadata* err,
-+                                                                             uint32_t offset)
- {
--    // This function presumes |err| is filled in *except* for line-of-context
--    // fields.  It exists to make |TokenStreamSpecific::computeErrorMetadata|,
--    // above, more readable.
-     TokenStreamAnyChars& anyChars = anyCharsAccess();
- 
-     // We only have line-start information for the current line.  If the error
-     // is on a different line, we can't easily provide context.  (This means
-     // any error in a multi-line token, e.g. an unterminated multiline string
-     // literal, won't have context.)
-     if (err->lineNumber != anyChars.lineno)
-         return true;
-@@ -837,26 +834,26 @@ TokenStreamSpecific<CharT, AnyCharsAcces
-                          offset - windowRadius :
-                          anyChars.linebase;
- 
-     // The window must start within the portion of the current line that we
-     // actually have in our buffer.
-     if (windowStart < this->sourceUnits.startOffset())
-         windowStart = this->sourceUnits.startOffset();
- 
--    // The window must end within the current line, no later than
--    // windowRadius after offset.
-+    // The window must end no further than |windowRadius| after |offset| within
-+    // the current line.
-     size_t windowEnd = this->sourceUnits.findEOLMax(offset, windowRadius);
-     size_t windowLength = windowEnd - windowStart;
-     MOZ_ASSERT(windowLength <= windowRadius * 2);
- 
-     // Create the windowed string, not including the potential line
-     // terminator.
-     StringBuffer windowBuf(anyChars.cx);
--    if (!windowBuf.append(codeUnitPtrAt(windowStart), windowLength) ||
-+    if (!windowBuf.append(this->sourceUnits.codeUnitPtrAt(windowStart), windowLength) ||
-         !windowBuf.append('\0'))
-     {
-         return false;
-     }
- 
-     err->lineOfContext.reset(windowBuf.stealChars());
-     if (!err->lineOfContext)
-         return false;
-diff --git a/js/src/frontend/TokenStream.h b/js/src/frontend/TokenStream.h
---- a/js/src/frontend/TokenStream.h
-+++ b/js/src/frontend/TokenStream.h
-@@ -1550,16 +1550,26 @@ class GeneralTokenStreamChars
- 
-     MOZ_MUST_USE MOZ_ALWAYS_INLINE bool updateLineInfoForEOL() {
-         return anyCharsAccess().internalUpdateLineInfoForEOL(this->sourceUnits.offset());
-     }
- 
-     uint32_t matchUnicodeEscapeIdStart(uint32_t* codePoint);
-     bool matchUnicodeEscapeIdent(uint32_t* codePoint);
- 
-+    /**
-+     * Compute a line of context for an otherwise-filled-in |err| at the given
-+     * offset in this token stream.
-+     *
-+     * This function is very-internal: almost certainly you should use one of
-+     * its callers instead.  It basically exists only to make those callers
-+     * more readable.
-+     */
-+    MOZ_MUST_USE bool internalComputeLineOfContext(ErrorMetadata* err, uint32_t offset);
-+
-   public:
-     JSAtom* getRawTemplateStringAtom() {
-         TokenStreamAnyChars& anyChars = anyCharsAccess();
- 
-         MOZ_ASSERT(anyChars.currentToken().type == TokenKind::TemplateHead ||
-                    anyChars.currentToken().type == TokenKind::NoSubsTemplate);
-         const CharT* cur = this->sourceUnits.codeUnitPtrAt(anyChars.currentToken().pos.begin + 1);
-         const CharT* end;
-@@ -1817,16 +1827,17 @@ class MOZ_STACK_CLASS TokenStreamSpecifi
-     using TokenStreamCharsShared::copyCharBufferTo;
-     using TokenStreamCharsShared::drainCharBufferIntoAtom;
-     using CharsBase::fillCharBufferWithTemplateStringContents;
-     using SpecializedChars::getCodePoint;
-     using GeneralCharsBase::getCodeUnit;
-     using SpecializedChars::getFullAsciiCodePoint;
-     using SpecializedChars::getNonAsciiCodePoint;
-     using SpecializedChars::getNonAsciiCodePointDontNormalize;
-+    using GeneralCharsBase::internalComputeLineOfContext;
-     using TokenStreamCharsShared::isAsciiCodePoint;
-     using CharsBase::matchCodeUnit;
-     using CharsBase::matchLineTerminator;
-     using GeneralCharsBase::matchUnicodeEscapeIdent;
-     using GeneralCharsBase::matchUnicodeEscapeIdStart;
-     using GeneralCharsBase::newAtomToken;
-     using GeneralCharsBase::newNameToken;
-     using GeneralCharsBase::newNumberToken;
-@@ -1897,22 +1908,16 @@ class MOZ_STACK_CLASS TokenStreamSpecifi
- 
-     // Report the given error at the given offset.
-     void errorAt(uint32_t offset, unsigned errorNumber, ...);
-     void errorAtVA(uint32_t offset, unsigned errorNumber, va_list* args);
- 
-     // Warn at the current offset.
-     MOZ_MUST_USE bool warning(unsigned errorNumber, ...);
- 
--  private:
--    // Compute a line of context for an otherwise-filled-in |err| at the given
--    // offset in this token stream.  (This function basically exists to make
--    // |computeErrorMetadata| more readable and shouldn't be called elsewhere.)
--    MOZ_MUST_USE bool computeLineOfContext(ErrorMetadata* err, uint32_t offset);
--
-   public:
-     // Compute error metadata for an error at the given offset.
-     MOZ_MUST_USE bool computeErrorMetadata(ErrorMetadata* err, uint32_t offset);
- 
-     // General-purpose error reporters.  You should avoid calling these
-     // directly, and instead use the more succinct alternatives (error(),
-     // warning(), &c.) in TokenStream, Parser, and BytecodeEmitter.
-     //

+ 0 - 305
frg/work-js/mozilla-release/patches/mozilla-central-push_427658.patch

@@ -1,305 +0,0 @@
-# HG changeset patch
-# User Jeff Walden <jwalden@mit.edu>
-# Date 1531249613 25200
-#      Tue Jul 10 12:06:53 2018 -0700
-# Node ID ff1852065b5c6a4f2a1829b290f91dae26f7804f
-# Parent  6ac4c8ad6b9a20ba54462a2e877c594df8767401
-Bug 1476866 - Rename SourceUnits::findEOLMax to SourceUnits::findWindowEnd, and make it include only valid UTF-16.  r=arai
-
-diff --git a/devtools/client/webconsole/test/fixtures/stubs/pageError.js b/devtools/client/webconsole/test/fixtures/stubs/pageError.js
---- a/devtools/client/webconsole/test/fixtures/stubs/pageError.js
-+++ b/devtools/client/webconsole/test/fixtures/stubs/pageError.js
-@@ -265,17 +265,17 @@ stubPackets.set(`ReferenceError: asdf is
- 
- stubPackets.set(`SyntaxError: redeclaration of let a`, {
-   "from": "server1.conn0.child1/consoleActor2",
-   "type": "pageError",
-   "pageError": {
-     "errorMessage": "SyntaxError: redeclaration of let a",
-     "errorMessageName": "JSMSG_REDECLARED_VAR",
-     "sourceName": "http://example.com/browser/devtools/client/webconsole/test/fixtures/stub-generators/test-console-api.html",
--    "lineText": "  let a, a;\n",
-+    "lineText": "  let a, a;",
-     "lineNumber": 2,
-     "columnNumber": 9,
-     "category": "content javascript",
-     "timeStamp": 1487992945524,
-     "warning": false,
-     "error": false,
-     "exception": true,
-     "strict": false,
-diff --git a/js/src/frontend/TokenStream.cpp b/js/src/frontend/TokenStream.cpp
---- a/js/src/frontend/TokenStream.cpp
-+++ b/js/src/frontend/TokenStream.cpp
-@@ -40,16 +40,17 @@
- #include "vm/Realm.h"
- 
- using mozilla::ArrayLength;
- using mozilla::AssertedCast;
- using mozilla::IsAscii;
- using mozilla::IsAsciiAlpha;
- using mozilla::IsAsciiDigit;
- using mozilla::MakeScopeExit;
-+using mozilla::PointerRangeSize;
- using mozilla::Utf8Unit;
- 
- struct ReservedWordInfo
- {
-     const char* chars;         // C string with reserved word text
-     js::frontend::TokenKind tokentype;
- };
- 
-@@ -616,37 +617,67 @@ TokenStreamChars<char16_t, AnyCharsAcces
-     unicode::UTF16Encode(codePoint, units, &numUnits);
- 
-     MOZ_ASSERT(numUnits == 1 || numUnits == 2);
- 
-     while (numUnits-- > 0)
-         ungetCodeUnit(units[numUnits]);
- }
- 
--template<typename CharT>
-+template<>
- size_t
--SourceUnits<CharT>::findEOLMax(size_t start, size_t max)
-+SourceUnits<char16_t>::findWindowEnd(size_t offset)
- {
--    const CharT* p = codeUnitPtrAt(start);
--
--    size_t n = 0;
-+    const char16_t* const initial = codeUnitPtrAt(offset);
-+    const char16_t* p = initial;
-+
-+    auto HalfWindowSize = [&initial, &p]() { return PointerRangeSize(initial, p); };
-+
-     while (true) {
--        if (p >= limit_)
-+        MOZ_ASSERT(p <= limit_);
-+        MOZ_ASSERT(HalfWindowSize() <= WindowRadius);
-+        if (p >= limit_ || HalfWindowSize() >= WindowRadius)
-             break;
--        if (n >= max)
--            break;
--        n++;
-+
-+        char16_t c = *p;
- 
-         // This stops at U+2028 LINE SEPARATOR or U+2029 PARAGRAPH SEPARATOR in
-         // string and template literals.  These code points do affect line and
-         // column coordinates, even as they encode their literal values.
--        if (isRawEOLChar(*p++))
-+        if (isRawEOLChar(c))
-+            break;
-+
-+        // Don't allow invalid UTF-16 in post-context.  (Current users don't
-+        // require this, and this behavior isn't currently imposed on
-+        // pre-context, but these facts might change someday.)
-+
-+        if (MOZ_UNLIKELY(unicode::IsTrailSurrogate(c)))
-             break;
-+
-+        // Optimistically consume the code unit, ungetting it below if needed.
-+        p++;
-+
-+        // If it's not a surrogate at all, keep going.
-+        if (MOZ_LIKELY(!unicode::IsLeadSurrogate(c)))
-+            continue;
-+
-+        // Retract if the lead surrogate would stand alone at the end of the
-+        // window.
-+        if (HalfWindowSize() >= WindowRadius || // split pair
-+            p >= limit_ || // half-pair at end of source
-+            !unicode::IsTrailSurrogate(*p)) // no paired trail surrogate
-+        {
-+            p--;
-+            break;
-+        }
-+
-+        p++;
-     }
--    return start + n;
-+
-+    return offset + HalfWindowSize();
- }
- 
- template<typename CharT, class AnyCharsAccess>
- bool
- TokenStreamSpecific<CharT, AnyCharsAccess>::advance(size_t position)
- {
-     const CharT* end = this->sourceUnits.codeUnitPtrAt(position);
-     while (this->sourceUnits.addressOfNextCodeUnit() < end) {
-@@ -820,33 +851,33 @@ GeneralTokenStreamChars<CharT, AnyCharsA
- 
-     // We only have line-start information for the current line.  If the error
-     // is on a different line, we can't easily provide context.  (This means
-     // any error in a multi-line token, e.g. an unterminated multiline string
-     // literal, won't have context.)
-     if (err->lineNumber != anyChars.lineno)
-         return true;
- 
--    constexpr size_t windowRadius = ErrorMetadata::lineOfContextRadius;
-+    constexpr size_t windowRadius = SourceUnits::WindowRadius;
- 
-     // The window must start within the current line, no earlier than
-     // |windowRadius| characters before |offset|.
-     MOZ_ASSERT(offset >= anyChars.linebase);
-     size_t windowStart = (offset - anyChars.linebase > windowRadius) ?
-                          offset - windowRadius :
-                          anyChars.linebase;
- 
-     // The window must start within the portion of the current line that we
-     // actually have in our buffer.
-     if (windowStart < this->sourceUnits.startOffset())
-         windowStart = this->sourceUnits.startOffset();
- 
-     // The window must end no further than |windowRadius| after |offset| within
-     // the current line.
--    size_t windowEnd = this->sourceUnits.findEOLMax(offset, windowRadius);
-+    size_t windowEnd = this->sourceUnits.findWindowEnd(offset);
-     size_t windowLength = windowEnd - windowStart;
-     MOZ_ASSERT(windowLength <= windowRadius * 2);
- 
-     // Create the windowed string, not including the potential line
-     // terminator.
-     StringBuffer windowBuf(anyChars.cx);
-     if (!windowBuf.append(this->sourceUnits.codeUnitPtrAt(windowStart), windowLength) ||
-         !windowBuf.append('\0'))
-diff --git a/js/src/frontend/TokenStream.h b/js/src/frontend/TokenStream.h
---- a/js/src/frontend/TokenStream.h
-+++ b/js/src/frontend/TokenStream.h
-@@ -1134,19 +1134,35 @@ class SourceUnits
- 
-     static bool isRawEOLChar(int32_t c) {
-         return c == '\n' ||
-                c == '\r' ||
-                c == unicode::LINE_SEPARATOR ||
-                c == unicode::PARA_SEPARATOR;
-     }
- 
--    // Returns the offset of the next EOL, but stops once 'max' characters
--    // have been scanned (*including* the char at startOffset_).
--    size_t findEOLMax(size_t start, size_t max);
-+    /**
-+     * The maximum radius of code around the location of an error that should
-+     * be included in a syntax error message -- this many code units to either
-+     * side.  The resulting window of data is then accordinngly trimmed so that
-+     * the window contains only validly-encoded data.
-+     *
-+     * Because this number is the same for both UTF-8 and UTF-16, windows in
-+     * UTF-8 may contain fewer code points than windows in UTF-16.  As we only
-+     * use this for error messages, we don't particularly care.
-+     */
-+    static constexpr size_t WindowRadius = ErrorMetadata::lineOfContextRadius;
-+
-+    /**
-+     * From absolute offset |offset|, find an absolute offset, no further than
-+     * |WindowRadius| code units away from |offset|, such that all code units
-+     * from |offset| to that offset encode valid, non-LineTerminator code
-+     * points.
-+     */
-+    size_t findWindowEnd(size_t offset);
- 
-   private:
-     /** Base of buffer. */
-     const CharT* base_;
- 
-     /** Offset of base_[0]. */
-     uint32_t startOffset_;
- 
-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
-@@ -24,16 +24,17 @@ UNIFIED_SOURCES += [
-     'testDebugger.cpp',
-     'testDeepFreeze.cpp',
-     'testDefineGetterSetterNonEnumerable.cpp',
-     'testDefineProperty.cpp',
-     'testDefinePropertyIgnoredAttributes.cpp',
-     'testDeflateStringToUTF8Buffer.cpp',
-     'testDifferentNewTargetInvokeConstructor.cpp',
-     'testErrorCopying.cpp',
-+    'testErrorLineOfContext.cpp',
-     'testException.cpp',
-     'testExecuteInJSMEnvironment.cpp',
-     'testExternalArrayBuffer.cpp',
-     'testExternalStrings.cpp',
-     'testFindSCCs.cpp',
-     'testForceLexicalInitialization.cpp',
-     'testForOfIterator.cpp',
-     'testForwardSetProperty.cpp',
-diff --git a/js/src/jsapi-tests/testErrorLineOfContext.cpp b/js/src/jsapi-tests/testErrorLineOfContext.cpp
-new file mode 100644
---- /dev/null
-+++ b/js/src/jsapi-tests/testErrorLineOfContext.cpp
-@@ -0,0 +1,71 @@
-+/* 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 "jsfriendapi.h"
-+#include "jsapi-tests/tests.h"
-+#include "vm/ErrorReporting.h"
-+
-+BEGIN_TEST(testErrorLineOfContext)
-+{
-+    static const char16_t fullLineR[] = u"\n  var x = @;  \r  ";
-+    CHECK(testLineOfContextHasNoLineTerminator(fullLineR, ' '));
-+
-+    static const char16_t fullLineN[] = u"\n  var x = @; !\n  ";
-+    CHECK(testLineOfContextHasNoLineTerminator(fullLineN, '!'));
-+
-+    static const char16_t fullLineLS[] = u"\n  var x = @; +\u2028  ";
-+    CHECK(testLineOfContextHasNoLineTerminator(fullLineLS, '+'));
-+
-+    static const char16_t fullLinePS[] = u"\n  var x = @; #\u2029  ";
-+    CHECK(testLineOfContextHasNoLineTerminator(fullLinePS, '#'));
-+
-+    static_assert(js::ErrorMetadata::lineOfContextRadius == 60,
-+                  "current max count past offset is 60, hits 'X' below");
-+
-+    static const char16_t truncatedLine[] =
-+        u"@ + 4567890123456789012345678901234567890123456789012345678XYZW\n";
-+    CHECK(testLineOfContextHasNoLineTerminator(truncatedLine, 'X'));
-+
-+    return true;
-+}
-+
-+bool
-+eval(const char16_t* chars, size_t len, JS::MutableHandleValue rval)
-+{
-+    JS::RealmOptions globalOptions;
-+    JS::RootedObject global(cx, JS_NewGlobalObject(cx, getGlobalClass(), nullptr,
-+						   JS::FireOnNewGlobalHook, globalOptions));
-+    CHECK(global);
-+
-+    JSAutoRealm ar(cx, global);
-+    JS::CompileOptions options(cx);
-+    return JS::Evaluate(cx, options, chars, len, rval);
-+}
-+
-+template<size_t N>
-+bool
-+testLineOfContextHasNoLineTerminator(const char16_t (&chars)[N], char16_t expectedLast)
-+{
-+    JS::RootedValue rval(cx);
-+    CHECK(!eval(chars, N - 1, &rval));
-+
-+    JS::RootedValue exn(cx);
-+    CHECK(JS_GetPendingException(cx, &exn));
-+    JS_ClearPendingException(cx);
-+
-+    js::ErrorReport report(cx);
-+    CHECK(report.init(cx, exn, js::ErrorReport::WithSideEffects));
-+
-+    const auto* errorReport = report.report();
-+
-+    const char16_t* lineOfContext = errorReport->linebuf();
-+    size_t lineOfContextLength = errorReport->linebufLength();
-+
-+    CHECK(lineOfContext[lineOfContextLength] == '\0');
-+    char16_t last = lineOfContext[lineOfContextLength - 1];
-+    CHECK(last == expectedLast);
-+
-+    return true;
-+}
-+END_TEST(testErrorLineOfContext)

+ 0 - 343
frg/work-js/mozilla-release/patches/mozilla-central-push_427659.patch

@@ -1,343 +0,0 @@
-# HG changeset patch
-# User Jeff Walden <jwalden@mit.edu>
-# Date 1531533546 25200
-#      Fri Jul 13 18:59:06 2018 -0700
-# Node ID 30c6932eea32e4b49abb30f20b1e49c804734731
-# Parent  ff1852065b5c6a4f2a1829b290f91dae26f7804f
-Bug 1476866 - Move error-message window-start computation into SourceUnits::findWindowStart so that specialized versions can be provided for UTF-8 and UTF-16.  r=arai
-
-diff --git a/js/src/frontend/TokenStream.cpp b/js/src/frontend/TokenStream.cpp
---- a/js/src/frontend/TokenStream.cpp
-+++ b/js/src/frontend/TokenStream.cpp
-@@ -619,16 +619,74 @@ TokenStreamChars<char16_t, AnyCharsAcces
-     MOZ_ASSERT(numUnits == 1 || numUnits == 2);
- 
-     while (numUnits-- > 0)
-         ungetCodeUnit(units[numUnits]);
- }
- 
- template<>
- size_t
-+SourceUnits<char16_t>::findWindowStart(size_t offset)
-+{
-+    // This is JS's understanding of UTF-16 that allows lone surrogates, so
-+    // we have to exclude lone surrogates from [windowStart, offset) ourselves.
-+
-+    const char16_t* const earliestPossibleStart = codeUnitPtrAt(startOffset_);
-+
-+    const char16_t* const initial = codeUnitPtrAt(offset);
-+    const char16_t* p = initial;
-+
-+    auto HalfWindowSize = [&p, &initial]() { return PointerRangeSize(p, initial); };
-+
-+    while (true) {
-+        MOZ_ASSERT(earliestPossibleStart <= p);
-+        MOZ_ASSERT(HalfWindowSize() <= WindowRadius);
-+        if (p <= earliestPossibleStart || HalfWindowSize() >= WindowRadius)
-+            break;
-+
-+        char16_t c = p[-1];
-+
-+        // This stops at U+2028 LINE SEPARATOR or U+2029 PARAGRAPH SEPARATOR in
-+        // string and template literals.  These code points do affect line and
-+        // column coordinates, even as they encode their literal values.
-+        if (isRawEOLChar(c))
-+            break;
-+
-+        // Don't allow invalid UTF-16 in pre-context.  (Current users don't
-+        // require this, and this behavior isn't currently imposed on
-+        // pre-context, but these facts might change someday.)
-+
-+        if (MOZ_UNLIKELY(unicode::IsLeadSurrogate(c)))
-+            break;
-+
-+        // Optimistically include the code unit, reverting below if needed.
-+        p--;
-+
-+        // If it's not a surrogate at all, keep going.
-+        if (MOZ_LIKELY(!unicode::IsTrailSurrogate(c)))
-+            continue;
-+
-+        // Stop if we don't have a usable surrogate pair.
-+        if (HalfWindowSize() >= WindowRadius ||
-+            p <= earliestPossibleStart || // trail surrogate at low end
-+            !unicode::IsLeadSurrogate(p[-1])) // no paired lead surrogate
-+        {
-+            p++;
-+            break;
-+        }
-+
-+        p--;
-+    }
-+
-+    MOZ_ASSERT(HalfWindowSize() <= WindowRadius);
-+    return offset - HalfWindowSize();
-+}
-+
-+template<>
-+size_t
- SourceUnits<char16_t>::findWindowEnd(size_t offset)
- {
-     const char16_t* const initial = codeUnitPtrAt(offset);
-     const char16_t* p = initial;
- 
-     auto HalfWindowSize = [&initial, &p]() { return PointerRangeSize(initial, p); };
- 
-     while (true) {
-@@ -816,16 +874,57 @@ template<typename CharT, class AnyCharsA
- void
- TokenStreamSpecific<CharT, AnyCharsAccess>::currentLineAndColumn(uint32_t* line, uint32_t* column) const
- {
-     const TokenStreamAnyChars& anyChars = anyCharsAccess();
-     uint32_t offset = anyChars.currentToken().pos.begin;
-     anyChars.srcCoords.lineNumAndColumnIndex(offset, line, column);
- }
- 
-+template<>
-+bool
-+TokenStreamCharsBase<Utf8Unit>::addLineOfContext(JSContext* cx, ErrorMetadata* err,
-+                                                 uint32_t offset)
-+{
-+    // The specialization below is almost usable if changed to be a definition
-+    // for any CharT, but it demands certain UTF-8-specific functionality that
-+    // has't been defined yet.  Use a placeholder definition until such
-+    // functionality is in place.
-+    return true;
-+}
-+
-+template<>
-+bool
-+TokenStreamCharsBase<char16_t>::addLineOfContext(JSContext* cx, ErrorMetadata* err,
-+                                                 uint32_t offset)
-+{
-+    size_t windowStart = sourceUnits.findWindowStart(offset);
-+    size_t windowEnd = sourceUnits.findWindowEnd(offset);
-+
-+    size_t windowLength = windowEnd - windowStart;
-+    MOZ_ASSERT(windowLength <= SourceUnits::WindowRadius * 2);
-+
-+    // Create the windowed string, not including the potential line
-+    // terminator.
-+    StringBuffer windowBuf(cx);
-+    if (!windowBuf.append(sourceUnits.codeUnitPtrAt(windowStart), windowLength) ||
-+        !windowBuf.append('\0'))
-+    {
-+        return false;
-+    }
-+
-+    err->lineOfContext.reset(windowBuf.stealChars());
-+    if (!err->lineOfContext)
-+        return false;
-+
-+    err->lineLength = windowLength;
-+    err->tokenOffset = offset - windowStart;
-+    return true;
-+}
-+
- template<typename CharT, class AnyCharsAccess>
- bool
- TokenStreamSpecific<CharT, AnyCharsAccess>::computeErrorMetadata(ErrorMetadata* err,
-                                                                  uint32_t offset)
- {
-     if (offset == NoOffset) {
-         anyCharsAccess().computeErrorMetadataNoOffset(err);
-         return true;
-@@ -839,69 +938,16 @@ TokenStreamSpecific<CharT, AnyCharsAcces
-         return true;
- 
-     // Add a line of context from this TokenStream to help with debugging.
-     return internalComputeLineOfContext(err, offset);
- }
- 
- template<typename CharT, class AnyCharsAccess>
- bool
--GeneralTokenStreamChars<CharT, AnyCharsAccess>::internalComputeLineOfContext(ErrorMetadata* err,
--                                                                             uint32_t offset)
--{
--    TokenStreamAnyChars& anyChars = anyCharsAccess();
--
--    // We only have line-start information for the current line.  If the error
--    // is on a different line, we can't easily provide context.  (This means
--    // any error in a multi-line token, e.g. an unterminated multiline string
--    // literal, won't have context.)
--    if (err->lineNumber != anyChars.lineno)
--        return true;
--
--    constexpr size_t windowRadius = SourceUnits::WindowRadius;
--
--    // The window must start within the current line, no earlier than
--    // |windowRadius| characters before |offset|.
--    MOZ_ASSERT(offset >= anyChars.linebase);
--    size_t windowStart = (offset - anyChars.linebase > windowRadius) ?
--                         offset - windowRadius :
--                         anyChars.linebase;
--
--    // The window must start within the portion of the current line that we
--    // actually have in our buffer.
--    if (windowStart < this->sourceUnits.startOffset())
--        windowStart = this->sourceUnits.startOffset();
--
--    // The window must end no further than |windowRadius| after |offset| within
--    // the current line.
--    size_t windowEnd = this->sourceUnits.findWindowEnd(offset);
--    size_t windowLength = windowEnd - windowStart;
--    MOZ_ASSERT(windowLength <= windowRadius * 2);
--
--    // Create the windowed string, not including the potential line
--    // terminator.
--    StringBuffer windowBuf(anyChars.cx);
--    if (!windowBuf.append(this->sourceUnits.codeUnitPtrAt(windowStart), windowLength) ||
--        !windowBuf.append('\0'))
--    {
--        return false;
--    }
--
--    err->lineOfContext.reset(windowBuf.stealChars());
--    if (!err->lineOfContext)
--        return false;
--
--    err->lineLength = windowLength;
--    err->tokenOffset = offset - windowStart;
--    return true;
--}
--
--
--template<typename CharT, class AnyCharsAccess>
--bool
- TokenStreamSpecific<CharT, AnyCharsAccess>::reportStrictModeError(unsigned errorNumber, ...)
- {
-     va_list args;
-     va_start(args, errorNumber);
- 
-     TokenStreamAnyChars& anyChars = anyCharsAccess();
-     bool result = reportStrictModeErrorNumberVA(nullptr, anyChars.currentToken().pos.begin,
-                                                 anyChars.strictMode(), errorNumber, &args);
-diff --git a/js/src/frontend/TokenStream.h b/js/src/frontend/TokenStream.h
---- a/js/src/frontend/TokenStream.h
-+++ b/js/src/frontend/TokenStream.h
-@@ -1147,20 +1147,28 @@ class SourceUnits
-      *
-      * Because this number is the same for both UTF-8 and UTF-16, windows in
-      * UTF-8 may contain fewer code points than windows in UTF-16.  As we only
-      * use this for error messages, we don't particularly care.
-      */
-     static constexpr size_t WindowRadius = ErrorMetadata::lineOfContextRadius;
- 
-     /**
--     * From absolute offset |offset|, find an absolute offset, no further than
--     * |WindowRadius| code units away from |offset|, such that all code units
--     * from |offset| to that offset encode valid, non-LineTerminator code
--     * points.
-+     * From absolute offset |offset|, search backward to find an absolute
-+     * offset within source text, no further than |WindowRadius| code units
-+     * away from |offset|, such that all code points from that offset to
-+     * |offset| are valid, non-LineTerminator code points.
-+     */
-+    size_t findWindowStart(size_t offset);
-+
-+    /**
-+     * From absolute offset |offset|, find an absolute offset within source
-+     * text, no further than |WindowRadius| code units away from |offset|, such
-+     * that all code units from |offset| to that offset are valid,
-+     * non-LineTerminator code points.
-      */
-     size_t findWindowEnd(size_t offset);
- 
-   private:
-     /** Base of buffer. */
-     const CharT* base_;
- 
-     /** Offset of base_[0]. */
-@@ -1308,16 +1316,31 @@ class TokenStreamCharsBase
-     /**
-      * Accumulate the provided range of already-validated (i.e. valid UTF-8, or
-      * anything if CharT is char16_t because JS permits lone and mispaired
-      * surrogates) raw template literal text (i.e. containing no escapes or
-      * substitutions) into |charBuffer|.
-      */
-     MOZ_MUST_USE bool fillCharBufferWithTemplateStringContents(const CharT* cur, const CharT* end);
- 
-+    /**
-+     * Add a null-terminated line of context to error information, for the line
-+     * in |sourceUnits| that contains |offset|.  Also record the window's
-+     * length and the offset of the error in the window.  (Don't bother adding
-+     * a line of context if it would be empty.)
-+     *
-+     * The window will contain no LineTerminators of any kind, and it will not
-+     * extend more than |SourceUnits::WindowRadius| to either side of |offset|,
-+     * nor into the previous or next lines.
-+     *
-+     * This function is quite internal, and you probably should be calling one
-+     * of its existing callers instead.
-+     */
-+    MOZ_MUST_USE bool addLineOfContext(JSContext* cx, ErrorMetadata* err, uint32_t offset);
-+
-   protected:
-     /** Code units in the source code being tokenized. */
-     SourceUnits sourceUnits;
- };
- 
- template<>
- inline char16_t
- TokenStreamCharsBase<char16_t>::toCharT(int32_t codeUnitValue)
-@@ -1445,16 +1468,21 @@ class TokenStart
- 
- template<typename CharT, class AnyCharsAccess>
- class GeneralTokenStreamChars
-   : public SpecializedTokenStreamCharsBase<CharT>
- {
-     using CharsBase = TokenStreamCharsBase<CharT>;
-     using SpecializedCharsBase = SpecializedTokenStreamCharsBase<CharT>;
- 
-+  private:
-+    using CharsBase::addLineOfContext;
-+    // Deliberately don't |using CharsBase::sourceUnits| because of bug 1472569.  :-(
-+
-+  private:
-     Token* newTokenInternal(TokenKind kind, TokenStart start, TokenKind* out);
- 
-     /**
-      * Allocates a new Token from the given offset to the current offset,
-      * ascribes it the given kind, and sets |*out| to that kind.
-      */
-     Token* newToken(TokenKind kind, TokenStart start, TokenStreamShared::Modifier modifier,
-                     TokenKind* out)
-@@ -1567,24 +1595,35 @@ class GeneralTokenStreamChars
-     MOZ_MUST_USE MOZ_ALWAYS_INLINE bool updateLineInfoForEOL() {
-         return anyCharsAccess().internalUpdateLineInfoForEOL(this->sourceUnits.offset());
-     }
- 
-     uint32_t matchUnicodeEscapeIdStart(uint32_t* codePoint);
-     bool matchUnicodeEscapeIdent(uint32_t* codePoint);
- 
-     /**
--     * Compute a line of context for an otherwise-filled-in |err| at the given
--     * offset in this token stream.
-+     * If possible, compute a line of context for an otherwise-filled-in |err|
-+     * at the given offset in this token stream.
-      *
-      * This function is very-internal: almost certainly you should use one of
-      * its callers instead.  It basically exists only to make those callers
-      * more readable.
-      */
--    MOZ_MUST_USE bool internalComputeLineOfContext(ErrorMetadata* err, uint32_t offset);
-+    MOZ_MUST_USE bool internalComputeLineOfContext(ErrorMetadata* err, uint32_t offset) {
-+        TokenStreamAnyChars& anyChars = anyCharsAccess();
-+
-+        // We only have line-start information for the current line.  If the error
-+        // is on a different line, we can't easily provide context.  (This means
-+        // any error in a multi-line token, e.g. an unterminated multiline string
-+        // literal, won't have context.)
-+        if (err->lineNumber != anyChars.lineno)
-+            return true;
-+
-+        return addLineOfContext(anyChars.cx, err, offset);
-+    }
- 
-   public:
-     JSAtom* getRawTemplateStringAtom() {
-         TokenStreamAnyChars& anyChars = anyCharsAccess();
- 
-         MOZ_ASSERT(anyChars.currentToken().type == TokenKind::TemplateHead ||
-                    anyChars.currentToken().type == TokenKind::NoSubsTemplate);
-         const CharT* cur = this->sourceUnits.codeUnitPtrAt(anyChars.currentToken().pos.begin + 1);

+ 0 - 274
frg/work-js/mozilla-release/patches/mozilla-central-push_427660.patch

@@ -1,274 +0,0 @@
-# HG changeset patch
-# User Jeff Walden <jwalden@mit.edu>
-# Date 1531886463 25200
-#      Tue Jul 17 21:01:03 2018 -0700
-# Node ID 670d911efa814f0b6f042bdf859abf666e4d510a
-# Parent  30c6932eea32e4b49abb30f20b1e49c804734731
-Bug 1476866 - Implement TokenStreamCharsBase::addLineOfContext that does all the work of creating a syntax-error window and works for either CharT.  r=arai
-
-diff --git a/js/src/frontend/TokenStream.cpp b/js/src/frontend/TokenStream.cpp
---- a/js/src/frontend/TokenStream.cpp
-+++ b/js/src/frontend/TokenStream.cpp
-@@ -438,25 +438,22 @@ template<typename CharT>
- TokenStreamCharsBase<CharT>::TokenStreamCharsBase(JSContext* cx, const CharT* chars, size_t length,
-                                                   size_t startOffset)
-   : TokenStreamCharsShared(cx),
-     sourceUnits(chars, length, startOffset)
- {}
- 
- template<>
- MOZ_MUST_USE bool
--TokenStreamCharsBase<char16_t>::fillCharBufferWithTemplateStringContents(const char16_t* cur,
--                                                                         const char16_t* end)
-+TokenStreamCharsBase<char16_t>::fillCharBufferFromSourceNormalizingAsciiLineBreaks(const char16_t* cur,
-+                                                                                   const char16_t* end)
- {
-     MOZ_ASSERT(this->charBuffer.length() == 0);
- 
-     while (cur < end) {
--        // Template literals normalize only '\r' and "\r\n" to '\n'.  The
--        // Unicode separators need no special handling here.
--        // https://tc39.github.io/ecma262/#sec-static-semantics-tv-and-trv
-         char16_t ch = *cur++;
-         if (ch == '\r') {
-             ch = '\n';
-             if (cur < end && *cur == '\n')
-                 cur++;
-         }
- 
-         if (!this->charBuffer.append(ch))
-@@ -876,47 +873,61 @@ TokenStreamSpecific<CharT, AnyCharsAcces
- {
-     const TokenStreamAnyChars& anyChars = anyCharsAccess();
-     uint32_t offset = anyChars.currentToken().pos.begin;
-     anyChars.srcCoords.lineNumAndColumnIndex(offset, line, column);
- }
- 
- template<>
- bool
--TokenStreamCharsBase<Utf8Unit>::addLineOfContext(JSContext* cx, ErrorMetadata* err,
--                                                 uint32_t offset)
-+TokenStreamCharsBase<Utf8Unit>::addLineOfContext(ErrorMetadata* err, uint32_t offset)
- {
--    // The specialization below is almost usable if changed to be a definition
--    // for any CharT, but it demands certain UTF-8-specific functionality that
--    // has't been defined yet.  Use a placeholder definition until such
--    // functionality is in place.
-+    // The specialization below is 100% usable if tweaked to be a definition
-+    // for any CharT, but it demands SourceUnits::findWindow{Start,End} and
-+    // TokenStreamCharsBase::fillCharBufferFromSourceNormalizingAsciiLineBreaks
-+    // for UTF-8 that haven't been defined yet.  Use a placeholder definition
-+    // til those are place.
-     return true;
- }
- 
- template<>
- bool
--TokenStreamCharsBase<char16_t>::addLineOfContext(JSContext* cx, ErrorMetadata* err,
--                                                 uint32_t offset)
-+TokenStreamCharsBase<char16_t>::addLineOfContext(ErrorMetadata* err, uint32_t offset)
- {
-+    using CharT = char16_t;
-     size_t windowStart = sourceUnits.findWindowStart(offset);
-     size_t windowEnd = sourceUnits.findWindowEnd(offset);
- 
-     size_t windowLength = windowEnd - windowStart;
-     MOZ_ASSERT(windowLength <= SourceUnits::WindowRadius * 2);
- 
--    // Create the windowed string, not including the potential line
--    // terminator.
--    StringBuffer windowBuf(cx);
--    if (!windowBuf.append(sourceUnits.codeUnitPtrAt(windowStart), windowLength) ||
--        !windowBuf.append('\0'))
--    {
-+    // Don't add a useless "line" of context when the window ends up empty
-+    // because of an invalid encoding at the start of a line.
-+    if (windowLength == 0) {
-+        MOZ_ASSERT(err->lineOfContext == nullptr,
-+                   "ErrorMetadata::lineOfContext must be null so we don't "
-+                   "have to set the lineLength/tokenOffset fields");
-+        return true;
-+    }
-+
-+    // We might have hit an error while processing some source code feature
-+    // that's accumulating text into |this->charBuffer| -- e.g. we could be
-+    // halfway into a regular expression literal, then encounter invalid UTF-8.
-+    // Thus we must clear |this->charBuffer| of prior work.
-+    this->charBuffer.clear();
-+
-+    const CharT* start = sourceUnits.codeUnitPtrAt(windowStart);
-+    if (!fillCharBufferFromSourceNormalizingAsciiLineBreaks(start, start + windowLength))
-         return false;
--    }
--
--    err->lineOfContext.reset(windowBuf.stealChars());
-+
-+    // The windowed string is null-terminated.
-+    if (!this->charBuffer.append('\0'))
-+        return false;
-+
-+    err->lineOfContext.reset(this->charBuffer.extractOrCopyRawBuffer());
-     if (!err->lineOfContext)
-         return false;
- 
-     err->lineLength = windowLength;
-     err->tokenOffset = offset - windowStart;
-     return true;
- }
- 
-diff --git a/js/src/frontend/TokenStream.h b/js/src/frontend/TokenStream.h
---- a/js/src/frontend/TokenStream.h
-+++ b/js/src/frontend/TokenStream.h
-@@ -1309,37 +1309,37 @@ class TokenStreamCharsBase
- 
-     // Forbid accidental calls to consumeKnownCodeUnit *not* with the single
-     // unit-or-EOF type.  CharT should use SourceUnits::consumeKnownCodeUnit;
-     // CodeUnitValue() results should go through toCharT(), or better yet just
-     // use the original CharT.
-     template<typename T> inline void consumeKnownCodeUnit(T) = delete;
- 
-     /**
--     * Accumulate the provided range of already-validated (i.e. valid UTF-8, or
--     * anything if CharT is char16_t because JS permits lone and mispaired
--     * surrogates) raw template literal text (i.e. containing no escapes or
--     * substitutions) into |charBuffer|.
-+     * Accumulate the provided range of already-validated text (valid UTF-8, or
-+     * anything if CharT is char16_t because JS allows lone surrogates) into
-+     * |charBuffer|.  Normalize '\r', '\n', and "\r\n" into '\n'.
-      */
--    MOZ_MUST_USE bool fillCharBufferWithTemplateStringContents(const CharT* cur, const CharT* end);
-+    MOZ_MUST_USE bool
-+    fillCharBufferFromSourceNormalizingAsciiLineBreaks(const CharT* cur, const CharT* end);
- 
-     /**
-      * Add a null-terminated line of context to error information, for the line
-      * in |sourceUnits| that contains |offset|.  Also record the window's
-      * length and the offset of the error in the window.  (Don't bother adding
-      * a line of context if it would be empty.)
-      *
-      * The window will contain no LineTerminators of any kind, and it will not
-      * extend more than |SourceUnits::WindowRadius| to either side of |offset|,
-      * nor into the previous or next lines.
-      *
-      * This function is quite internal, and you probably should be calling one
-      * of its existing callers instead.
-      */
--    MOZ_MUST_USE bool addLineOfContext(JSContext* cx, ErrorMetadata* err, uint32_t offset);
-+    MOZ_MUST_USE bool addLineOfContext(ErrorMetadata* err, uint32_t offset);
- 
-   protected:
-     /** Code units in the source code being tokenized. */
-     SourceUnits sourceUnits;
- };
- 
- template<>
- inline char16_t
-@@ -1469,17 +1469,16 @@ class TokenStart
- template<typename CharT, class AnyCharsAccess>
- class GeneralTokenStreamChars
-   : public SpecializedTokenStreamCharsBase<CharT>
- {
-     using CharsBase = TokenStreamCharsBase<CharT>;
-     using SpecializedCharsBase = SpecializedTokenStreamCharsBase<CharT>;
- 
-   private:
--    using CharsBase::addLineOfContext;
-     // Deliberately don't |using CharsBase::sourceUnits| because of bug 1472569.  :-(
- 
-   private:
-     Token* newTokenInternal(TokenKind kind, TokenStart start, TokenKind* out);
- 
-     /**
-      * Allocates a new Token from the given offset to the current offset,
-      * ascribes it the given kind, and sets |*out| to that kind.
-@@ -1499,18 +1498,19 @@ class GeneralTokenStreamChars
- 
-         return token;
-     }
- 
-     uint32_t matchUnicodeEscape(uint32_t* codePoint);
-     uint32_t matchExtendedUnicodeEscape(uint32_t* codePoint);
- 
-   protected:
-+    using CharsBase::addLineOfContext;
-     using TokenStreamCharsShared::drainCharBufferIntoAtom;
--    using CharsBase::fillCharBufferWithTemplateStringContents;
-+    using CharsBase::fillCharBufferFromSourceNormalizingAsciiLineBreaks;
- 
-     using typename CharsBase::SourceUnits;
- 
-   protected:
-     using SpecializedCharsBase::SpecializedCharsBase;
- 
-     TokenStreamAnyChars& anyCharsAccess() {
-         return AnyCharsAccess::anyChars(this);
-@@ -1603,26 +1603,24 @@ class GeneralTokenStreamChars
-      * If possible, compute a line of context for an otherwise-filled-in |err|
-      * at the given offset in this token stream.
-      *
-      * This function is very-internal: almost certainly you should use one of
-      * its callers instead.  It basically exists only to make those callers
-      * more readable.
-      */
-     MOZ_MUST_USE bool internalComputeLineOfContext(ErrorMetadata* err, uint32_t offset) {
--        TokenStreamAnyChars& anyChars = anyCharsAccess();
--
-         // We only have line-start information for the current line.  If the error
-         // is on a different line, we can't easily provide context.  (This means
-         // any error in a multi-line token, e.g. an unterminated multiline string
-         // literal, won't have context.)
--        if (err->lineNumber != anyChars.lineno)
-+        if (err->lineNumber != anyCharsAccess().lineno)
-             return true;
- 
--        return addLineOfContext(anyChars.cx, err, offset);
-+        return addLineOfContext(err, offset);
-     }
- 
-   public:
-     JSAtom* getRawTemplateStringAtom() {
-         TokenStreamAnyChars& anyChars = anyCharsAccess();
- 
-         MOZ_ASSERT(anyChars.currentToken().type == TokenKind::TemplateHead ||
-                    anyChars.currentToken().type == TokenKind::NoSubsTemplate);
-@@ -1631,17 +1629,20 @@ class GeneralTokenStreamChars
-         if (anyChars.currentToken().type == TokenKind::TemplateHead) {
-             // Of the form    |`...${|   or   |}...${|
-             end = this->sourceUnits.codeUnitPtrAt(anyChars.currentToken().pos.end - 2);
-         } else {
-             // NO_SUBS_TEMPLATE is of the form   |`...`|   or   |}...`|
-             end = this->sourceUnits.codeUnitPtrAt(anyChars.currentToken().pos.end - 1);
-         }
- 
--        if (!fillCharBufferWithTemplateStringContents(cur, end))
-+        // Template literals normalize only '\r' and "\r\n" to '\n'; Unicode
-+        // separators don't need special handling.
-+        // https://tc39.github.io/ecma262/#sec-static-semantics-tv-and-trv
-+        if (!fillCharBufferFromSourceNormalizingAsciiLineBreaks(cur, end))
-             return nullptr;
- 
-         return drainCharBufferIntoAtom(anyChars.cx);
-     }
- };
- 
- template<typename CharT, class AnyCharsAccess> class TokenStreamChars;
- 
-@@ -1876,17 +1877,17 @@ class MOZ_STACK_CLASS TokenStreamSpecifi
-     using TokenStreamCharsShared::appendCodePointToCharBuffer;
-     using CharsBase::atomizeSourceChars;
-     using GeneralCharsBase::badToken;
-     // Deliberately don't |using| |charBuffer| because of bug 1472569.  :-(
-     using CharsBase::consumeKnownCodeUnit;
-     using SpecializedChars::consumeRestOfSingleLineComment;
-     using TokenStreamCharsShared::copyCharBufferTo;
-     using TokenStreamCharsShared::drainCharBufferIntoAtom;
--    using CharsBase::fillCharBufferWithTemplateStringContents;
-+    using CharsBase::fillCharBufferFromSourceNormalizingAsciiLineBreaks;
-     using SpecializedChars::getCodePoint;
-     using GeneralCharsBase::getCodeUnit;
-     using SpecializedChars::getFullAsciiCodePoint;
-     using SpecializedChars::getNonAsciiCodePoint;
-     using SpecializedChars::getNonAsciiCodePointDontNormalize;
-     using GeneralCharsBase::internalComputeLineOfContext;
-     using TokenStreamCharsShared::isAsciiCodePoint;
-     using CharsBase::matchCodeUnit;

+ 0 - 200
frg/work-js/mozilla-release/patches/mozilla-central-push_427661.patch

@@ -1,200 +0,0 @@
-# HG changeset patch
-# User Jeff Walden <jwalden@mit.edu>
-# Date 1531886457 25200
-#      Tue Jul 17 21:00:57 2018 -0700
-# Node ID 7da01c72860d3461d177fc3a07cbb8f0b51e6c27
-# Parent  670d911efa814f0b6f042bdf859abf666e4d510a
-Bug 1476866 - Replace SourceUnits<CharT>::isRawEOLChar (where CharT had rather uncertain meaning) with standalone IsLineTerminator of clearer meaning.  r=arai
-
-diff --git a/js/src/frontend/TokenStream.cpp b/js/src/frontend/TokenStream.cpp
---- a/js/src/frontend/TokenStream.cpp
-+++ b/js/src/frontend/TokenStream.cpp
-@@ -578,33 +578,33 @@ TokenStreamChars<char16_t, AnyCharsAcces
-                 *codePoint = EOF; // sentinel value to hopefully cause errors
- #endif
-                 MOZ_MAKE_MEM_UNDEFINED(codePoint, sizeof(*codePoint));
-                 return false;
-             }
- 
-             *codePoint = '\n';
-         } else {
--            MOZ_ASSERT(!SourceUnits::isRawEOLChar(*codePoint));
-+            MOZ_ASSERT(!IsLineTerminator(AssertedCast<char32_t>(*codePoint)));
-         }
- 
-         return true;
-     }
- 
-     // Also handle a lead surrogate not paired with a trailing surrogate.
-     if (MOZ_UNLIKELY(this->sourceUnits.atEnd() ||
-                      !unicode::IsTrailSurrogate(this->sourceUnits.peekCodeUnit())))
-     {
--        MOZ_ASSERT(!SourceUnits::isRawEOLChar(*codePoint));
-+        MOZ_ASSERT(!IsLineTerminator(AssertedCast<char32_t>(*codePoint)));
-         return true;
-     }
- 
-     // Otherwise we have a multi-unit code point.
-     *codePoint = unicode::UTF16Decode(lead, this->sourceUnits.getCodeUnit());
--    MOZ_ASSERT(!SourceUnits::isRawEOLChar(*codePoint));
-+    MOZ_ASSERT(!IsLineTerminator(AssertedCast<char32_t>(*codePoint)));
-     return true;
- }
- 
- template<class AnyCharsAccess>
- void
- TokenStreamChars<char16_t, AnyCharsAccess>::ungetCodePointIgnoreEOL(uint32_t codePoint)
- {
-     MOZ_ASSERT(!this->sourceUnits.atStart());
-@@ -639,17 +639,17 @@ SourceUnits<char16_t>::findWindowStart(s
-         if (p <= earliestPossibleStart || HalfWindowSize() >= WindowRadius)
-             break;
- 
-         char16_t c = p[-1];
- 
-         // This stops at U+2028 LINE SEPARATOR or U+2029 PARAGRAPH SEPARATOR in
-         // string and template literals.  These code points do affect line and
-         // column coordinates, even as they encode their literal values.
--        if (isRawEOLChar(c))
-+        if (IsLineTerminator(c))
-             break;
- 
-         // Don't allow invalid UTF-16 in pre-context.  (Current users don't
-         // require this, and this behavior isn't currently imposed on
-         // pre-context, but these facts might change someday.)
- 
-         if (MOZ_UNLIKELY(unicode::IsLeadSurrogate(c)))
-             break;
-@@ -692,17 +692,17 @@ SourceUnits<char16_t>::findWindowEnd(siz
-         if (p >= limit_ || HalfWindowSize() >= WindowRadius)
-             break;
- 
-         char16_t c = *p;
- 
-         // This stops at U+2028 LINE SEPARATOR or U+2029 PARAGRAPH SEPARATOR in
-         // string and template literals.  These code points do affect line and
-         // column coordinates, even as they encode their literal values.
--        if (isRawEOLChar(c))
-+        if (IsLineTerminator(c))
-             break;
- 
-         // Don't allow invalid UTF-16 in post-context.  (Current users don't
-         // require this, and this behavior isn't currently imposed on
-         // pre-context, but these facts might change someday.)
- 
-         if (MOZ_UNLIKELY(unicode::IsTrailSurrogate(c)))
-             break;
-@@ -1596,17 +1596,17 @@ static const uint8_t firstCharKinds[] = 
- static_assert(LastCharKind < (1 << (sizeof(firstCharKinds[0]) * 8)),
-               "Elements of firstCharKinds[] are too small");
- 
- void
- SpecializedTokenStreamCharsBase<char16_t>::infallibleConsumeRestOfSingleLineComment()
- {
-     while (MOZ_LIKELY(!this->sourceUnits.atEnd())) {
-         char16_t unit = this->sourceUnits.peekCodeUnit();
--        if (SourceUnits::isRawEOLChar(unit))
-+        if (IsLineTerminator(unit))
-             return;
- 
-         this->sourceUnits.consumeKnownCodeUnit(unit);
-     }
- }
- 
- template<typename CharT, class AnyCharsAccess>
- MOZ_MUST_USE bool
-@@ -1772,27 +1772,24 @@ TokenStreamSpecific<CharT, AnyCharsAcces
-             inCharClass = true;
-         } else if (unit == ']') {
-             inCharClass = false;
-         } else if (unit == '/' && !inCharClass) {
-             // For IE compat, allow unescaped / in char classes.
-             break;
-         }
- 
-+        // NOTE: Non-ASCII LineTerminators were handled by
-+        //       ProcessNonAsciiCodePoint calls above.
-         if (unit == '\r' || unit == '\n') {
-             ReportUnterminatedRegExp(unit);
-             return badToken();
-         }
- 
--        // We're accumulating regular expression *source* text here: source
--        // text matching a line break will appear as U+005C REVERSE SOLIDUS
--        // U+006E LATIN SMALL LETTER N, and |unit| here would be the latter
--        // code point.
--        MOZ_ASSERT(!SourceUnits::isRawEOLChar(unit));
--
-+        MOZ_ASSERT(!IsLineTerminator(AssertedCast<char32_t>(unit)));
-         if (!this->charBuffer.append(unit))
-             return badToken();
-     } while (true);
- 
-     int32_t unit;
-     RegExpFlag reflags = NoFlags;
-     while (true) {
-         RegExpFlag flag;
-diff --git a/js/src/frontend/TokenStream.h b/js/src/frontend/TokenStream.h
---- a/js/src/frontend/TokenStream.h
-+++ b/js/src/frontend/TokenStream.h
-@@ -944,16 +944,36 @@ constexpr uint8_t
- CodeUnitValue(mozilla::Utf8Unit unit)
- {
-     return unit.toUint8();
- }
- 
- template<typename CharT>
- class TokenStreamCharsBase;
- 
-+template<typename T>
-+inline bool
-+IsLineTerminator(T) = delete;
-+
-+inline bool
-+IsLineTerminator(char32_t codePoint)
-+{
-+    return codePoint == '\n' ||
-+           codePoint == '\r' ||
-+           codePoint == unicode::LINE_SEPARATOR ||
-+           codePoint == unicode::PARA_SEPARATOR;
-+}
-+
-+inline bool
-+IsLineTerminator(char16_t unit)
-+{
-+    // Every LineTerminator fits in char16_t, so this is exact.
-+    return IsLineTerminator(static_cast<char32_t>(unit));
-+}
-+
- // This is the low-level interface to the JS source code buffer.  It just gets
- // raw Unicode code units -- 16-bit char16_t units of source text that are not
- // (always) full code points, and 8-bit units of UTF-8 source text soon.
- // TokenStreams functions are layered on top and do some extra stuff like
- // converting all EOL sequences to '\n', tracking the line number, and setting
- // |flags.isEOF|.  (The "raw" in "raw Unicode code units" refers to the lack of
- // EOL sequence normalization.)
- //
-@@ -1127,23 +1147,16 @@ class SourceUnits
- 
-     // Poison the SourceUnits so they can't be accessed again.
-     void poisonInDebug() {
- #ifdef DEBUG
-         ptr = nullptr;
- #endif
-     }
- 
--    static bool isRawEOLChar(int32_t c) {
--        return c == '\n' ||
--               c == '\r' ||
--               c == unicode::LINE_SEPARATOR ||
--               c == unicode::PARA_SEPARATOR;
--    }
--
-     /**
-      * The maximum radius of code around the location of an error that should
-      * be included in a syntax error message -- this many code units to either
-      * side.  The resulting window of data is then accordinngly trimmed so that
-      * the window contains only validly-encoded data.
-      *
-      * Because this number is the same for both UTF-8 and UTF-16, windows in
-      * UTF-8 may contain fewer code points than windows in UTF-16.  As we only

+ 0 - 174
frg/work-js/mozilla-release/patches/mozilla-central-push_427662.patch

@@ -1,174 +0,0 @@
-# HG changeset patch
-# User Jeff Walden <jwalden@mit.edu>
-# Date 1531887197 25200
-#      Tue Jul 17 21:13:17 2018 -0700
-# Node ID 735ee4ba2523472561514447de4e7558efae9e1b
-# Parent  7da01c72860d3461d177fc3a07cbb8f0b51e6c27
-Bug 1476866 - Move TokenStreamChars::getFullAsciiCodePoint to GeneralTokenStreamChars::getFullAsciiCodePoint, because its algorithm is identical for UTF-8 and UTF-16.  r=arai
-
-diff --git a/js/src/frontend/TokenStream.h b/js/src/frontend/TokenStream.h
---- a/js/src/frontend/TokenStream.h
-+++ b/js/src/frontend/TokenStream.h
-@@ -1482,19 +1482,16 @@ class TokenStart
- template<typename CharT, class AnyCharsAccess>
- class GeneralTokenStreamChars
-   : public SpecializedTokenStreamCharsBase<CharT>
- {
-     using CharsBase = TokenStreamCharsBase<CharT>;
-     using SpecializedCharsBase = SpecializedTokenStreamCharsBase<CharT>;
- 
-   private:
--    // Deliberately don't |using CharsBase::sourceUnits| because of bug 1472569.  :-(
--
--  private:
-     Token* newTokenInternal(TokenKind kind, TokenStart start, TokenKind* out);
- 
-     /**
-      * Allocates a new Token from the given offset to the current offset,
-      * ascribes it the given kind, and sets |*out| to that kind.
-      */
-     Token* newToken(TokenKind kind, TokenStart start, TokenStreamShared::Modifier modifier,
-                     TokenKind* out)
-@@ -1514,16 +1511,20 @@ class GeneralTokenStreamChars
- 
-     uint32_t matchUnicodeEscape(uint32_t* codePoint);
-     uint32_t matchExtendedUnicodeEscape(uint32_t* codePoint);
- 
-   protected:
-     using CharsBase::addLineOfContext;
-     using TokenStreamCharsShared::drainCharBufferIntoAtom;
-     using CharsBase::fillCharBufferFromSourceNormalizingAsciiLineBreaks;
-+    using TokenStreamCharsShared::isAsciiCodePoint;
-+    using CharsBase::matchLineTerminator;
-+    // Deliberately don't |using CharsBase::sourceUnits| because of bug 1472569.  :-(
-+    using CharsBase::toCharT;
- 
-     using typename CharsBase::SourceUnits;
- 
-   protected:
-     using SpecializedCharsBase::SpecializedCharsBase;
- 
-     TokenStreamAnyChars& anyCharsAccess() {
-         return AnyCharsAccess::anyChars(this);
-@@ -1600,16 +1601,50 @@ class GeneralTokenStreamChars
-     }
- 
-     void ungetCodeUnit(int32_t c) {
-         MOZ_ASSERT_IF(c == EOF, anyCharsAccess().flags.isEOF);
- 
-         CharsBase::ungetCodeUnit(c);
-     }
- 
-+    /**
-+     * Given a just-consumed ASCII code unit/point |lead|, consume a full code
-+     * point or LineTerminatorSequence (normalizing it to '\n') and store it in
-+     * |*codePoint|.  Return true on success, otherwise return false and leave
-+     * |*codePoint| undefined on failure.
-+     *
-+     * If a LineTerminatorSequence was consumed, also update line/column info.
-+     *
-+     * This may change the current |sourceUnits| offset.
-+     */
-+    MOZ_MUST_USE bool getFullAsciiCodePoint(int32_t lead, int32_t* codePoint) {
-+        MOZ_ASSERT(isAsciiCodePoint(lead),
-+                   "non-ASCII code units must be handled separately");
-+        MOZ_ASSERT(toCharT(lead) == this->sourceUnits.previousCodeUnit(),
-+                   "getFullAsciiCodePoint called incorrectly");
-+
-+        if (MOZ_UNLIKELY(lead == '\r')) {
-+            matchLineTerminator('\n');
-+        } else if (MOZ_LIKELY(lead != '\n')) {
-+            *codePoint = lead;
-+            return true;
-+        }
-+
-+        *codePoint = '\n';
-+        bool ok = updateLineInfoForEOL();
-+        if (!ok) {
-+#ifdef DEBUG
-+            *codePoint = EOF; // sentinel value to hopefully cause errors
-+#endif
-+            MOZ_MAKE_MEM_UNDEFINED(codePoint, sizeof(*codePoint));
-+        }
-+        return ok;
-+    }
-+
-     MOZ_MUST_USE MOZ_ALWAYS_INLINE bool updateLineInfoForEOL() {
-         return anyCharsAccess().internalUpdateLineInfoForEOL(this->sourceUnits.offset());
-     }
- 
-     uint32_t matchUnicodeEscapeIdStart(uint32_t* codePoint);
-     bool matchUnicodeEscapeIdent(uint32_t* codePoint);
- 
-     /**
-@@ -1704,51 +1739,16 @@ class TokenStreamChars<char16_t, AnyChar
-      * Get the next code point, converting LineTerminatorSequences to '\n' and
-      * updating internal line-counter state if needed.  Return true on success
-      * and store the code point in |*c|.  Return false and leave |*c| undefined
-      * on failure.
-      */
-     MOZ_MUST_USE bool getCodePoint(int32_t* cp);
- 
-     /**
--     * Given a just-consumed ASCII code unit/point |lead|, consume a full code
--     * point or LineTerminatorSequence (normalizing it to '\n') and store it in
--     * |*codePoint|.  Return true on success, otherwise return false and leave
--     * |*codePoint| undefined on failure.
--     *
--     * If a LineTerminatorSequence was consumed, also update line/column info.
--     *
--     * This may change the current |sourceUnits| offset.
--     */
--    MOZ_MUST_USE bool getFullAsciiCodePoint(int32_t lead, int32_t* codePoint) {
--        MOZ_ASSERT(isAsciiCodePoint(lead),
--                   "non-ASCII code units must be handled separately");
--        // NOTE: |this->|-qualify to avoid a gcc bug: see bug 1472569.
--        MOZ_ASSERT(lead == this->sourceUnits.previousCodeUnit(),
--                   "getFullAsciiCodePoint called incorrectly");
--
--        if (MOZ_UNLIKELY(lead == '\r')) {
--            matchLineTerminator('\n');
--        } else if (MOZ_LIKELY(lead != '\n')) {
--            *codePoint = lead;
--            return true;
--        }
--
--        *codePoint = '\n';
--        bool ok = updateLineInfoForEOL();
--        if (!ok) {
--#ifdef DEBUG
--            *codePoint = EOF; // sentinel value to hopefully cause errors
--#endif
--            MOZ_MAKE_MEM_UNDEFINED(codePoint, sizeof(*codePoint));
--        }
--        return ok;
--    }
--
--    /**
-      * Given a just-consumed non-ASCII code unit |lead| (which may also be a
-      * full code point, for UTF-16), consume a full code point or
-      * LineTerminatorSequence (normalizing it to '\n') and store it in
-      * |*codePoint|.  Return true on success, otherwise return false and leave
-      * |*codePoint| undefined on failure.
-      *
-      * If a LineTerminatorSequence was consumed, also update line/column info.
-      *
-@@ -1893,17 +1893,17 @@ class MOZ_STACK_CLASS TokenStreamSpecifi
-     // Deliberately don't |using| |charBuffer| because of bug 1472569.  :-(
-     using CharsBase::consumeKnownCodeUnit;
-     using SpecializedChars::consumeRestOfSingleLineComment;
-     using TokenStreamCharsShared::copyCharBufferTo;
-     using TokenStreamCharsShared::drainCharBufferIntoAtom;
-     using CharsBase::fillCharBufferFromSourceNormalizingAsciiLineBreaks;
-     using SpecializedChars::getCodePoint;
-     using GeneralCharsBase::getCodeUnit;
--    using SpecializedChars::getFullAsciiCodePoint;
-+    using GeneralCharsBase::getFullAsciiCodePoint;
-     using SpecializedChars::getNonAsciiCodePoint;
-     using SpecializedChars::getNonAsciiCodePointDontNormalize;
-     using GeneralCharsBase::internalComputeLineOfContext;
-     using TokenStreamCharsShared::isAsciiCodePoint;
-     using CharsBase::matchCodeUnit;
-     using CharsBase::matchLineTerminator;
-     using GeneralCharsBase::matchUnicodeEscapeIdent;
-     using GeneralCharsBase::matchUnicodeEscapeIdStart;

+ 0 - 65
frg/work-js/mozilla-release/patches/mozilla-central-push_427770.patch

@@ -1,65 +0,0 @@
-# HG changeset patch
-# User Benjamin Bouvier <benj@benj.me>
-# Date 1532022998 -7200
-#      Thu Jul 19 19:56:38 2018 +0200
-# Node ID 5b31b8bf2d680fba2f46cfa99576f1027bed328f
-# Parent  d0cb9041aa08de83ab41909c913c788122de509f
-Bug 1475943: Don't trace a wasm global object if it's being created; r=jseward
-
-diff --git a/js/src/jit-test/tests/wasm/gc/fuzz-gc-while-allocating-global.js b/js/src/jit-test/tests/wasm/gc/fuzz-gc-while-allocating-global.js
-new file mode 100644
---- /dev/null
-+++ b/js/src/jit-test/tests/wasm/gc/fuzz-gc-while-allocating-global.js
-@@ -0,0 +1,7 @@
-+if (!wasmGcEnabled()) {
-+    quit(0);
-+}
-+
-+enableShellAllocationMetadataBuilder();
-+gczeal(9, 1);
-+new WebAssembly.Global({ value: 'i32' }, 42);
-diff --git a/js/src/wasm/WasmJS.cpp b/js/src/wasm/WasmJS.cpp
---- a/js/src/wasm/WasmJS.cpp
-+++ b/js/src/wasm/WasmJS.cpp
-@@ -2150,16 +2150,22 @@ const Class WasmGlobalObject::class_ =
-     JSCLASS_BACKGROUND_FINALIZE,
-     &WasmGlobalObject::classOps_
- };
- 
- /* static */ void
- WasmGlobalObject::trace(JSTracer* trc, JSObject* obj)
- {
-     WasmGlobalObject* global = reinterpret_cast<WasmGlobalObject*>(obj);
-+    if (global->isNewborn()) {
-+        // This can happen while we're allocating the object, in which case
-+        // every single slot of the object is not defined yet. In particular,
-+        // there's nothing to trace yet.
-+        return;
-+    }
-     switch (global->type().code()) {
-       case ValType::AnyRef:
-         if (global->cell()->ptr)
-             TraceManuallyBarrieredEdge(trc, &global->cell()->ptr, "wasm anyref global");
-         break;
-       case ValType::I32:
-       case ValType::F32:
-       case ValType::I64:
-@@ -2225,16 +2231,18 @@ WasmGlobalObject::create(JSContext* cx, 
-       case ValType::Ref:
-         MOZ_CRASH("Ref NYI");
-     }
- 
-     obj->initReservedSlot(TYPE_SLOT, Int32Value(int32_t(val.type().bitsUnsafe())));
-     obj->initReservedSlot(MUTABLE_SLOT, JS::BooleanValue(isMutable));
-     obj->initReservedSlot(CELL_SLOT, PrivateValue(cell));
- 
-+    MOZ_ASSERT(!obj->isNewborn());
-+
-     return obj;
- }
- 
- /* static */ bool
- WasmGlobalObject::construct(JSContext* cx, unsigned argc, Value* vp)
- {
-     CallArgs args = CallArgsFromVp(argc, vp);
- 

+ 0 - 163
frg/work-js/mozilla-release/patches/mozilla-central-push_427850.patch

@@ -1,163 +0,0 @@
-# HG changeset patch
-# User Robert Bartlensky <rbartlensky@mozilla.com>
-# Date 1532090675 -3600
-#      Fri Jul 20 13:44:35 2018 +0100
-# Node ID 358b59601fb9f672a45394d94c308716e6ce96de
-# Parent  e5ec530fd95e85b8e67b991965e73c38373dbedc
-Bug 1476657: Fix DEAD_STORE issues in js/src/frontend/Parser.cpp. r=arai
-
-MozReview-Commit-ID: HI9p2AfOUiU
-
-diff --git a/js/src/frontend/Parser.cpp b/js/src/frontend/Parser.cpp
---- a/js/src/frontend/Parser.cpp
-+++ b/js/src/frontend/Parser.cpp
-@@ -17,16 +17,17 @@
-  * This parser attempts no error recovery.
-  */
- 
- #include "frontend/Parser.h"
- 
- #include "mozilla/Range.h"
- #include "mozilla/Sprintf.h"
- #include "mozilla/TypeTraits.h"
-+#include "mozilla/Unused.h"
- 
- #include <memory>
- #include <new>
- 
- #include "jsapi.h"
- #include "jstypes.h"
- 
- #include "builtin/ModuleObject.h"
-@@ -53,16 +54,17 @@
- using namespace js;
- using namespace js::gc;
- 
- using mozilla::Maybe;
- using mozilla::Nothing;
- using mozilla::PodCopy;
- using mozilla::PodZero;
- using mozilla::Some;
-+using mozilla::Unused;
- 
- using JS::AutoGCRooter;
- 
- namespace js {
- namespace frontend {
- 
- using DeclaredNamePtr = ParseContext::Scope::DeclaredNamePtr;
- using AddDeclaredNamePtr = ParseContext::Scope::AddDeclaredNamePtr;
-@@ -1853,17 +1855,17 @@ NewGlobalScopeData(JSContext* context, P
-         BindingName* cursor = start;
- 
-         cursor = FreshlyInitializeBindings(cursor, vars);
- 
-         bindings->letStart = cursor - start;
-         cursor = FreshlyInitializeBindings(cursor, lets);
- 
-         bindings->constStart = cursor - start;
--        cursor = FreshlyInitializeBindings(cursor, consts);
-+        Unused << FreshlyInitializeBindings(cursor, consts);
- 
-         bindings->length = numBindings;
-     }
- 
-     return Some(bindings);
- }
- 
- Maybe<GlobalScope::Data*>
-@@ -1923,17 +1925,17 @@ NewModuleScopeData(JSContext* context, P
- 
-         bindings->varStart = cursor - start;
-         cursor = FreshlyInitializeBindings(cursor, vars);
- 
-         bindings->letStart = cursor - start;
-         cursor = FreshlyInitializeBindings(cursor, lets);
- 
-         bindings->constStart = cursor - start;
--        cursor = FreshlyInitializeBindings(cursor, consts);
-+        Unused << FreshlyInitializeBindings(cursor, consts);
- 
-         bindings->length = numBindings;
-     }
- 
-     return Some(bindings);
- }
- 
- Maybe<ModuleScope::Data*>
-@@ -1963,17 +1965,17 @@ NewEvalScopeData(JSContext* context, Par
-     if (numBindings > 0) {
-         bindings = NewEmptyBindingData<EvalScope>(context, alloc, numBindings);
-         if (!bindings)
-             return Nothing();
- 
-         BindingName* start = bindings->trailingNames.start();
-         BindingName* cursor = start;
- 
--        cursor = FreshlyInitializeBindings(cursor, vars);
-+        Unused << FreshlyInitializeBindings(cursor, vars);
- 
-         bindings->length = numBindings;
-     }
- 
-     return Some(bindings);
- }
- 
- Maybe<EvalScope::Data*>
-@@ -2062,17 +2064,17 @@ NewFunctionScopeData(JSContext* context,
-         BindingName* cursor = start;
- 
-         cursor = FreshlyInitializeBindings(cursor, positionalFormals);
- 
-         bindings->nonPositionalFormalStart = cursor - start;
-         cursor = FreshlyInitializeBindings(cursor, formals);
- 
-         bindings->varStart = cursor - start;
--        cursor = FreshlyInitializeBindings(cursor, vars);
-+        Unused << FreshlyInitializeBindings(cursor, vars);
- 
-         bindings->length = numBindings;
-     }
- 
-     return Some(bindings);
- }
- 
- Maybe<FunctionScope::Data*>
-@@ -2103,17 +2105,17 @@ NewVarScopeData(JSContext* context, Pars
-         bindings = NewEmptyBindingData<VarScope>(context, alloc, numBindings);
-         if (!bindings)
-             return Nothing();
- 
-         // The ordering here is important. See comments in FunctionScope.
-         BindingName* start = bindings->trailingNames.start();
-         BindingName* cursor = start;
- 
--        cursor = FreshlyInitializeBindings(cursor, vars);
-+        Unused << FreshlyInitializeBindings(cursor, vars);
- 
-         bindings->length = numBindings;
-     }
- 
-     return Some(bindings);
- }
- 
- Maybe<VarScope::Data*>
-@@ -2160,17 +2162,17 @@ NewLexicalScopeData(JSContext* context, 
- 
-         // The ordering here is important. See comments in LexicalScope.
-         BindingName* cursor = bindings->trailingNames.start();
-         BindingName* start = cursor;
- 
-         cursor = FreshlyInitializeBindings(cursor, lets);
- 
-         bindings->constStart = cursor - start;
--        cursor = FreshlyInitializeBindings(cursor, consts);
-+        Unused << FreshlyInitializeBindings(cursor, consts);
- 
-         bindings->length = numBindings;
-     }
- 
-     return Some(bindings);
- }
- 
- Maybe<LexicalScope::Data*>

+ 0 - 63
frg/work-js/mozilla-release/patches/mozilla-central-push_427989.patch

@@ -1,63 +0,0 @@
-# HG changeset patch
-# User Benjamin Bouvier <benj@benj.me>
-# Date 1532022257 -7200
-#      Thu Jul 19 19:44:17 2018 +0200
-# Node ID f9769a072e13b591d962adfbec1f11152b6374b2
-# Parent  d3a864ec08368b36dc80d83c318e140b5205b1dd
-Bug 1476953: Update asm.js error message when atomics aren't enabled; r=jandem
-
-diff --git a/js/src/wasm/AsmJS.cpp b/js/src/wasm/AsmJS.cpp
---- a/js/src/wasm/AsmJS.cpp
-+++ b/js/src/wasm/AsmJS.cpp
-@@ -2105,18 +2105,20 @@ class MOZ_STACK_CLASS JS_HAZ_ROOTED Modu
-         AsmJSGlobal g(AsmJSGlobal::Constant, std::move(fieldChars));
-         g.pod.u.constant.value_ = constant;
-         g.pod.u.constant.kind_ = AsmJSGlobal::GlobalConstant;
-         return asmJSMetadata_->asmJSGlobals.append(std::move(g));
-     }
-     bool addAtomicsBuiltinFunction(PropertyName* var, AsmJSAtomicsBuiltinFunction func,
-                                    PropertyName* field)
-     {
--        if (!JitOptions.asmJSAtomicsEnable)
--            return failCurrentOffset("asm.js Atomics only enabled when asmjs.atomics.enable is set");
-+        if (!JitOptions.asmJSAtomicsEnable) {
-+            return failCurrentOffset("asm.js Atomics only enabled when the environment variable "
-+                                     "JIT_OPTION_asmJSAtomicsEnable is set to true");
-+        }
- 
-         atomicsPresent_ = true;
- 
-         UniqueChars fieldChars = StringToNewUTF8CharsZ(cx_, *field);
-         if (!fieldChars)
-             return false;
- 
-         Global* global = validationLifo_.new_<Global>(Global::AtomicsBuiltinFunction);
-@@ -8115,20 +8117,24 @@ CheckBuffer(JSContext* cx, const AsmJSMe
- #else
-         bool needGuard = metadata.usesSimd;
- #endif
-         Rooted<ArrayBufferObject*> arrayBuffer(cx, &buffer->as<ArrayBufferObject>());
-         if (!ArrayBufferObject::prepareForAsmJS(cx, arrayBuffer, needGuard))
-             return LinkFail(cx, "Unable to prepare ArrayBuffer for asm.js use");
-     } else {
-         if (!buffer->as<SharedArrayBufferObject>().isPreparedForAsmJS()) {
--            if (buffer->as<SharedArrayBufferObject>().isWasm())
--                return LinkFail(cx, "SharedArrayBuffer created for Wasm cannot be used for asm.js");
--            if (!jit::JitOptions.asmJSAtomicsEnable)
--                return LinkFail(cx, "Can link with SharedArrayBuffer only when asmjs.atomics.enable is set");
-+            if (buffer->as<SharedArrayBufferObject>().isWasm()) {
-+                return LinkFail(cx, "SharedArrayBuffer created for Wasm cannot be used for "
-+                                    "asm.js");
-+            }
-+            if (!jit::JitOptions.asmJSAtomicsEnable) {
-+                return LinkFail(cx, "Can link with SharedArrayBuffer only when the environment "
-+                                    "variable JIT_OPTION_asmJSAtomicsEnable is set to true");
-+            }
-             return LinkFail(cx, "Unable to prepare SharedArrayBuffer for asm.js use");
-         }
-     }
- 
-     MOZ_ASSERT(buffer->isPreparedForAsmJS());
-     return true;
- }
- 

+ 0 - 48
frg/work-js/mozilla-release/patches/mozilla-central-push_428282.patch

@@ -1,48 +0,0 @@
-# HG changeset patch
-# User Tooru Fujisawa <arai_a@mac.com>
-# Date 1532505708 -32400
-#      Wed Jul 25 17:01:48 2018 +0900
-# Node ID 4f8e23bff248c7500302deb4b68804bbafbc462b
-# Parent  d8f622781168eed6fb5e1245a92af56936b0a7f0
-Bug 1477621 - Part 0: Remove unnecessary note from JSOP_DEFAULT. r=jandem
-
-diff --git a/js/src/frontend/SwitchEmitter.cpp b/js/src/frontend/SwitchEmitter.cpp
---- a/js/src/frontend/SwitchEmitter.cpp
-+++ b/js/src/frontend/SwitchEmitter.cpp
-@@ -219,29 +219,29 @@ SwitchEmitter::emitTable(const TableGene
-     return true;
- }
- 
- bool
- SwitchEmitter::emitCaseOrDefaultJump(uint32_t caseIndex, bool isDefault)
- {
-     MOZ_ASSERT(kind_ == Kind::Cond);
- 
--    if (state_ == State::Case) {
--        // Link the last JSOP_CASE's SRC_NEXTCASE to current JSOP_CASE or
--        // JSOP_DEFAULT for the benefit of IonBuilder.
--        if (!bce_->setSrcNoteOffset(caseNoteIndex_, 0, bce_->offset() - lastCaseOffset_))
--            return false;
--    }
--
-     if (isDefault) {
-         if (!bce_->emitJump(JSOP_DEFAULT, &condSwitchDefaultOffset_))
-             return false;
-         return true;
-     }
- 
-+    if (state_ == State::Case) {
-+        // Link the last JSOP_CASE's SRC_NEXTCASE to current JSOP_CASE for the
-+        // benefit of IonBuilder.
-+        if (!bce_->setSrcNoteOffset(caseNoteIndex_, 0, bce_->offset() - lastCaseOffset_))
-+            return false;
-+    }
-+
-     if (!bce_->newSrcNote2(SRC_NEXTCASE, 0, &caseNoteIndex_))
-         return false;
- 
-     JumpList caseJump;
-     if (!bce_->emitJump(JSOP_CASE, &caseJump))
-         return false;
-     caseOffsets_[caseIndex] = caseJump.offset;
-     lastCaseOffset_ = caseJump.offset;

+ 0 - 320
frg/work-js/mozilla-release/patches/mozilla-central-push_428283.patch

@@ -1,320 +0,0 @@
-# HG changeset patch
-# User Tooru Fujisawa <arai_a@mac.com>
-# Date 1532505708 -32400
-#      Wed Jul 25 17:01:48 2018 +0900
-# Node ID 5f7b22fe0124b332ea410e44b94afa11d29b254a
-# Parent  4f8e23bff248c7500302deb4b68804bbafbc462b
-Bug 1477621 - Part 1: Add source note field constants for switch. r=jandem
-
-diff --git a/js/src/frontend/SourceNotes.h b/js/src/frontend/SourceNotes.h
---- a/js/src/frontend/SourceNotes.h
-+++ b/js/src/frontend/SourceNotes.h
-@@ -29,37 +29,73 @@ namespace js {
-  *              +---------+-----+           +---+-----------+
-  *
-  * At most one "gettable" note (i.e., a note of type other than SRC_NEWLINE,
-  * SRC_COLSPAN, SRC_SETLINE, and SRC_XDELTA) applies to a given bytecode.
-  *
-  * NB: the js_SrcNoteSpec array in BytecodeEmitter.cpp is indexed by this
-  * enum, so its initializers need to match the order here.
-  */
-+
-+class SrcNote {
-+  public:
-+    // SRC_TABLESWITCH: Source note for JSOP_TABLESWITCH.
-+    class TableSwitch {
-+      public:
-+        enum Fields {
-+            // The offset of the end of switch (the first non-JumpTarget op
-+            // after switch) from JSOP_TABLESWITCH.
-+            EndOffset,
-+            Count
-+        };
-+    };
-+    // SRC_CONDSWITCH: Source note for JSOP_CONDSWITCH.
-+    class CondSwitch {
-+      public:
-+        enum Fields {
-+            // The offset of the end of switch (the first non-JumpTarget op
-+            // after switch) from JSOP_CONDSWITCH.
-+            EndOffset,
-+
-+            // The offset of JSOP_CASE for the first case from JSOP_CONDSWITCH.
-+            FirstCaseOffset,
-+            Count
-+        };
-+    };
-+    // SRC_NEXTCASE: Source note for JSOP_CASE in a JSOP_CONDSWITCH.
-+    class NextCase {
-+      public:
-+        enum Fields {
-+            // Offset of the next JSOP_CASE from this JSOP_CASE.  This field is
-+            // 0 if this is the last JSOP_CASE.
-+            NextCaseOffset,
-+            Count
-+        };
-+    };
-+};
-+
- #define FOR_EACH_SRC_NOTE_TYPE(M)                                                                  \
-     M(SRC_NULL,         "null",        0)  /* Terminates a note vector. */                         \
-     M(SRC_IF,           "if",          0)  /* JSOP_IFEQ bytecode is from an if-then. */            \
-     M(SRC_IF_ELSE,      "if-else",     0)  /* JSOP_IFEQ bytecode is from an if-then-else. */       \
-     M(SRC_COND,         "cond",        0)  /* JSOP_IFEQ is from conditional ?: operator. */        \
-     M(SRC_FOR,          "for",         3)  /* JSOP_NOP or JSOP_POP in for(;;) loop head. */        \
-     M(SRC_WHILE,        "while",       1)  /* JSOP_GOTO to for or while loop condition from before \
-                                               loop, else JSOP_NOP at top of do-while loop. */      \
-     M(SRC_FOR_IN,       "for-in",      1)  /* JSOP_GOTO to for-in loop condition from before       \
-                                               loop. */                                             \
-     M(SRC_FOR_OF,       "for-of",      1)  /* JSOP_GOTO to for-of loop condition from before       \
-                                               loop. */                                             \
-     M(SRC_CONTINUE,     "continue",    0)  /* JSOP_GOTO is a continue. */                          \
-     M(SRC_BREAK,        "break",       0)  /* JSOP_GOTO is a break. */                             \
-     M(SRC_BREAK2LABEL,  "break2label", 0)  /* JSOP_GOTO for 'break label'. */                      \
-     M(SRC_SWITCHBREAK,  "switchbreak", 0)  /* JSOP_GOTO is a break in a switch. */                 \
--    M(SRC_TABLESWITCH,  "tableswitch", 1)  /* JSOP_TABLESWITCH; offset points to end of switch. */ \
--    M(SRC_CONDSWITCH,   "condswitch",  2)  /* JSOP_CONDSWITCH; 1st offset points to end of switch, \
--                                              2nd points to first JSOP_CASE. */                    \
--    M(SRC_NEXTCASE,     "nextcase",    1)  /* Distance forward from one CASE in a CONDSWITCH to    \
--                                              the next. */                                         \
-+    M(SRC_TABLESWITCH,  "tableswitch", SrcNote::TableSwitch::Count) \
-+    M(SRC_CONDSWITCH,   "condswitch",  SrcNote::CondSwitch::Count) \
-+    M(SRC_NEXTCASE,     "nextcase",    SrcNote::NextCase::Count) \
-     M(SRC_ASSIGNOP,     "assignop",    0)  /* += or another assign-op follows. */                  \
-     M(SRC_CLASS_SPAN,   "class",       2)  /* The starting and ending offsets for the class, used  \
-                                               for toString correctness for default ctors. */       \
-     M(SRC_TRY,          "try",         1)  /* JSOP_TRY, offset points to goto at the end of the    \
-                                               try block. */                                        \
-     /* All notes above here are "gettable".  See SN_IS_GETTABLE below. */                          \
-     M(SRC_COLSPAN,      "colspan",     1)  /* Number of columns this opcode spans. */              \
-     M(SRC_NEWLINE,      "newline",     0)  /* Bytecode follows a source newline. */                \
-diff --git a/js/src/frontend/SwitchEmitter.cpp b/js/src/frontend/SwitchEmitter.cpp
---- a/js/src/frontend/SwitchEmitter.cpp
-+++ b/js/src/frontend/SwitchEmitter.cpp
-@@ -228,18 +228,21 @@ SwitchEmitter::emitCaseOrDefaultJump(uin
-         if (!bce_->emitJump(JSOP_DEFAULT, &condSwitchDefaultOffset_))
-             return false;
-         return true;
-     }
- 
-     if (state_ == State::Case) {
-         // Link the last JSOP_CASE's SRC_NEXTCASE to current JSOP_CASE for the
-         // benefit of IonBuilder.
--        if (!bce_->setSrcNoteOffset(caseNoteIndex_, 0, bce_->offset() - lastCaseOffset_))
-+        if (!bce_->setSrcNoteOffset(caseNoteIndex_, SrcNote::NextCase::NextCaseOffset,
-+                                    bce_->offset() - lastCaseOffset_))
-+        {
-             return false;
-+        }
-     }
- 
-     if (!bce_->newSrcNote2(SRC_NEXTCASE, 0, &caseNoteIndex_))
-         return false;
- 
-     JumpList caseJump;
-     if (!bce_->emitJump(JSOP_CASE, &caseJump))
-         return false;
-@@ -387,18 +390,24 @@ SwitchEmitter::emitEnd()
-     } else {
-         // Fill in the default jump target.
-         pc = bce_->code(top_);
-         SET_JUMP_OFFSET(pc, defaultJumpTargetOffset_.offset - top_);
-         pc += JUMP_OFFSET_LEN;
-     }
- 
-     // Set the SRC_SWITCH note's offset operand to tell end of switch.
--    if (!bce_->setSrcNoteOffset(noteIndex_, 0, bce_->lastNonJumpTargetOffset() - top_))
-+    // This code is shared between table switch and cond switch.
-+    static_assert(unsigned(SrcNote::TableSwitch::EndOffset) == unsigned(SrcNote::CondSwitch::EndOffset),
-+                  "{TableSwitch,CondSwitch}::EndOffset should be same");
-+    if (!bce_->setSrcNoteOffset(noteIndex_, SrcNote::TableSwitch::EndOffset,
-+                                bce_->lastNonJumpTargetOffset() - top_))
-+    {
-         return false;
-+    }
- 
-     if (kind_ == Kind::Table) {
-         // Skip over the already-initialized switch bounds.
-         pc += 2 * JUMP_OFFSET_LEN;
- 
-         // Fill in the jump table, if there is one.
-         for (uint32_t i = 0, length = caseOffsets_.length(); i < length; i++) {
-             ptrdiff_t off = caseOffsets_[i];
-diff --git a/js/src/jit/IonControlFlow.cpp b/js/src/jit/IonControlFlow.cpp
---- a/js/src/jit/IonControlFlow.cpp
-+++ b/js/src/jit/IonControlFlow.cpp
-@@ -1113,33 +1113,33 @@ ControlFlowGenerator::processCondSwitch(
-     //  2/ Generate code for all cases (see processCondSwitchCase).
-     //  3/ Generate code for all bodies (see processCondSwitchBody).
- 
-     MOZ_ASSERT(JSOp(*pc) == JSOP_CONDSWITCH);
-     jssrcnote* sn = GetSrcNote(gsn, script, pc);
-     MOZ_ASSERT(SN_TYPE(sn) == SRC_CONDSWITCH);
- 
-     // Get the exit pc
--    jsbytecode* exitpc = pc + GetSrcNoteOffset(sn, 0);
--    jsbytecode* firstCase = pc + GetSrcNoteOffset(sn, 1);
-+    jsbytecode* exitpc = pc + GetSrcNoteOffset(sn, SrcNote::CondSwitch::EndOffset);
-+    jsbytecode* firstCase = pc + GetSrcNoteOffset(sn, SrcNote::CondSwitch::FirstCaseOffset);
- 
-     // Iterate all cases in the conditional switch.
-     // - Stop at the default case. (always emitted after the last case)
-     // - Estimate the number of uniq bodies. This estimation might be off by 1
-     //   if the default body alias a case body.
-     jsbytecode* curCase = firstCase;
-     jsbytecode* lastTarget = GetJumpOffset(curCase) + curCase;
-     size_t nbBodies = 1; // default target and the first body.
- 
-     MOZ_ASSERT(pc < curCase && curCase <= exitpc);
-     while (JSOp(*curCase) == JSOP_CASE) {
-         // Fetch the next case.
-         jssrcnote* caseSn = GetSrcNote(gsn, script, curCase);
-         MOZ_ASSERT(caseSn && SN_TYPE(caseSn) == SRC_NEXTCASE);
--        ptrdiff_t off = GetSrcNoteOffset(caseSn, 0);
-+        ptrdiff_t off = GetSrcNoteOffset(caseSn, SrcNote::NextCase::NextCaseOffset);
-         MOZ_ASSERT_IF(off == 0, JSOp(*GetNextPc(curCase)) == JSOP_JUMPTARGET);
-         curCase = off ? curCase + off : GetNextPc(GetNextPc(curCase));
-         MOZ_ASSERT(pc < curCase && curCase <= exitpc);
- 
-         // Count non-aliased cases.
-         jsbytecode* curTarget = GetJumpOffset(curCase) + curCase;
-         if (lastTarget < curTarget)
-             nbBodies++;
-@@ -1162,17 +1162,17 @@ ControlFlowGenerator::processCondSwitch(
-             if (defaultTarget < curTarget)
-                 nbBodies++;
-             break;
-         }
-         if (lastTarget < curTarget)
-             defaultIdx++;
- 
-         jssrcnote* caseSn = GetSrcNote(gsn, script, curCase);
--        ptrdiff_t off = GetSrcNoteOffset(caseSn, 0);
-+        ptrdiff_t off = GetSrcNoteOffset(caseSn, SrcNote::NextCase::NextCaseOffset);
-         curCase = off ? curCase + off : GetNextPc(GetNextPc(curCase));
-         lastTarget = curTarget;
-     }
- 
-     // Allocate the current graph state.
-     CFGState state = CFGState::CondSwitch(alloc(), exitpc, defaultTarget);
-     if (!state.switch_.bodies || !state.switch_.bodies->init(alloc(), nbBodies))
-         return ControlStatus::Error;
-@@ -1218,17 +1218,17 @@ ControlFlowGenerator::processCondSwitchC
-     MOZ_ASSERT(JSOp(*pc) == JSOP_CASE);
-     FixedList<CFGBlock*>& bodies = *state.switch_.bodies;
-     uint32_t& currentIdx = state.switch_.currentIdx;
- 
-     jsbytecode* lastTarget = currentIdx ? bodies[currentIdx - 1]->startPc() : nullptr;
- 
-     // Fetch the following case in which we will continue.
-     jssrcnote* sn = GetSrcNote(gsn, script, pc);
--    ptrdiff_t off = GetSrcNoteOffset(sn, 0);
-+    ptrdiff_t off = GetSrcNoteOffset(sn, SrcNote::NextCase::NextCaseOffset);
-     MOZ_ASSERT_IF(off == 0, JSOp(*GetNextPc(pc)) == JSOP_JUMPTARGET);
-     jsbytecode* casePc = off ? pc + off : GetNextPc(GetNextPc(pc));
-     bool nextIsDefault = JSOp(*casePc) == JSOP_DEFAULT;
-     MOZ_ASSERT(JSOp(*casePc) == JSOP_CASE || nextIsDefault);
- 
-     // Allocate the block of the matching case.
-     jsbytecode* bodyTarget = pc + GetJumpOffset(pc);
-     CFGBlock* bodyBlock = nullptr;
-@@ -1844,17 +1844,17 @@ ControlFlowGenerator::processTableSwitch
-     // 4: Offset of case low+1
-     // .: ...
-     // .: Offset of case high
- 
-     MOZ_ASSERT(op == JSOP_TABLESWITCH);
-     MOZ_ASSERT(SN_TYPE(sn) == SRC_TABLESWITCH);
- 
-     // Get the default and exit pc
--    jsbytecode* exitpc = pc + GetSrcNoteOffset(sn, 0);
-+    jsbytecode* exitpc = pc + GetSrcNoteOffset(sn, SrcNote::TableSwitch::EndOffset);
-     jsbytecode* defaultpc = pc + GET_JUMP_OFFSET(pc);
- 
-     MOZ_ASSERT(defaultpc > pc && defaultpc <= exitpc);
- 
-     // Get the low and high from the tableswitch
-     jsbytecode* pc2 = pc;
-     pc2 += JUMP_OFFSET_LEN;
-     int low = GET_JUMP_OFFSET(pc2);
-diff --git a/js/src/shell/js.cpp b/js/src/shell/js.cpp
---- a/js/src/shell/js.cpp
-+++ b/js/src/shell/js.cpp
-@@ -2752,36 +2752,51 @@ SrcNotes(JSContext* cx, HandleScript scr
- 
-           case SRC_FOR_IN:
-           case SRC_FOR_OF:
-             if (!sp->jsprintf(" closingjump %u", unsigned(GetSrcNoteOffset(sn, 0))))
-                 return false;
-             break;
- 
-           case SRC_WHILE:
--          case SRC_NEXTCASE:
-             if (!sp->jsprintf(" offset %u", unsigned(GetSrcNoteOffset(sn, 0))))
-                 return false;
-             break;
- 
-+          case SRC_NEXTCASE:
-+            if (!sp->jsprintf(" next case offset %u",
-+                              unsigned(GetSrcNoteOffset(sn, SrcNote::NextCase::NextCaseOffset))))
-+            {
-+                return false;
-+            }
-+            break;
-+
-           case SRC_TABLESWITCH: {
-             mozilla::DebugOnly<JSOp> op = JSOp(script->code()[offset]);
-             MOZ_ASSERT(op == JSOP_TABLESWITCH);
--            if (!sp->jsprintf(" length %u", unsigned(GetSrcNoteOffset(sn, 0))))
-+            if (!sp->jsprintf(" end offset %u",
-+                              unsigned(GetSrcNoteOffset(sn, SrcNote::TableSwitch::EndOffset))))
-+            {
-                 return false;
-+            }
-             UpdateSwitchTableBounds(cx, script, offset,
-                                     &switchTableStart, &switchTableEnd);
-             break;
-           }
-           case SRC_CONDSWITCH: {
-             mozilla::DebugOnly<JSOp> op = JSOp(script->code()[offset]);
-             MOZ_ASSERT(op == JSOP_CONDSWITCH);
--            if (!sp->jsprintf(" length %u", unsigned(GetSrcNoteOffset(sn, 0))))
-+            if (!sp->jsprintf(" end offset %u",
-+                              unsigned(GetSrcNoteOffset(sn, SrcNote::CondSwitch::EndOffset))))
-+            {
-                 return false;
--            if (unsigned caseOff = (unsigned) GetSrcNoteOffset(sn, 1)) {
-+            }
-+            if (unsigned caseOff =
-+                unsigned(GetSrcNoteOffset(sn, SrcNote::CondSwitch::FirstCaseOffset)))
-+            {
-                 if (!sp->jsprintf(" first case offset %u", caseOff))
-                     return false;
-             }
-             UpdateSwitchTableBounds(cx, script, offset,
-                                     &switchTableStart, &switchTableEnd);
-             break;
-           }
- 
-diff --git a/js/src/vm/CodeCoverage.cpp b/js/src/vm/CodeCoverage.cpp
---- a/js/src/vm/CodeCoverage.cpp
-+++ b/js/src/vm/CodeCoverage.cpp
-@@ -195,17 +195,17 @@ LCovSource::writeScript(JSScript* script
-             size_t oldLine = lineno;
-             while (!SN_IS_TERMINATOR(sn) && snpc <= pc) {
-                 SrcNoteType type = SN_TYPE(sn);
-                 if (type == SRC_SETLINE)
-                     lineno = size_t(GetSrcNoteOffset(sn, 0));
-                 else if (type == SRC_NEWLINE)
-                     lineno++;
-                 else if (type == SRC_TABLESWITCH)
--                    tableswitchExitOffset = GetSrcNoteOffset(sn, 0);
-+                    tableswitchExitOffset = GetSrcNoteOffset(sn, SrcNote::TableSwitch::EndOffset);
- 
-                 sn = SN_NEXT(sn);
-                 snpc += SN_DELTA(sn);
-             }
- 
-             if ((oldLine != lineno || !firstLineHasBeenWritten) &&
-                 pc >= script->main() &&
-                 fallsthrough)

+ 0 - 154
frg/work-js/mozilla-release/patches/mozilla-central-push_428284.patch

@@ -1,154 +0,0 @@
-# HG changeset patch
-# User Tooru Fujisawa <arai_a@mac.com>
-# Date 1532505709 -32400
-#      Wed Jul 25 17:01:49 2018 +0900
-# Node ID 7cabc189feb9c32b870183b8096ca8702f518f61
-# Parent  5f7b22fe0124b332ea410e44b94afa11d29b254a
-Bug 1477621 - Part 2: Add source note field constants for try. r=jandem
-
-diff --git a/js/src/frontend/SourceNotes.h b/js/src/frontend/SourceNotes.h
---- a/js/src/frontend/SourceNotes.h
-+++ b/js/src/frontend/SourceNotes.h
-@@ -65,16 +65,26 @@ class SrcNote {
-       public:
-         enum Fields {
-             // Offset of the next JSOP_CASE from this JSOP_CASE.  This field is
-             // 0 if this is the last JSOP_CASE.
-             NextCaseOffset,
-             Count
-         };
-     };
-+    // SRC_TRY: Source note for JSOP_TRY.
-+    class Try {
-+      public:
-+        enum Fields {
-+            // The offset of the JSOP_GOTO at the end of the try block from
-+            // JSOP_TRY.
-+            EndOfTryJumpOffset,
-+            Count
-+        };
-+    };
- };
- 
- #define FOR_EACH_SRC_NOTE_TYPE(M)                                                                  \
-     M(SRC_NULL,         "null",        0)  /* Terminates a note vector. */                         \
-     M(SRC_IF,           "if",          0)  /* JSOP_IFEQ bytecode is from an if-then. */            \
-     M(SRC_IF_ELSE,      "if-else",     0)  /* JSOP_IFEQ bytecode is from an if-then-else. */       \
-     M(SRC_COND,         "cond",        0)  /* JSOP_IFEQ is from conditional ?: operator. */        \
-     M(SRC_FOR,          "for",         3)  /* JSOP_NOP or JSOP_POP in for(;;) loop head. */        \
-@@ -89,18 +99,17 @@ class SrcNote {
-     M(SRC_BREAK2LABEL,  "break2label", 0)  /* JSOP_GOTO for 'break label'. */                      \
-     M(SRC_SWITCHBREAK,  "switchbreak", 0)  /* JSOP_GOTO is a break in a switch. */                 \
-     M(SRC_TABLESWITCH,  "tableswitch", SrcNote::TableSwitch::Count) \
-     M(SRC_CONDSWITCH,   "condswitch",  SrcNote::CondSwitch::Count) \
-     M(SRC_NEXTCASE,     "nextcase",    SrcNote::NextCase::Count) \
-     M(SRC_ASSIGNOP,     "assignop",    0)  /* += or another assign-op follows. */                  \
-     M(SRC_CLASS_SPAN,   "class",       2)  /* The starting and ending offsets for the class, used  \
-                                               for toString correctness for default ctors. */       \
--    M(SRC_TRY,          "try",         1)  /* JSOP_TRY, offset points to goto at the end of the    \
--                                              try block. */                                        \
-+    M(SRC_TRY,          "try",         SrcNote::Try::Count) \
-     /* All notes above here are "gettable".  See SN_IS_GETTABLE below. */                          \
-     M(SRC_COLSPAN,      "colspan",     1)  /* Number of columns this opcode spans. */              \
-     M(SRC_NEWLINE,      "newline",     0)  /* Bytecode follows a source newline. */                \
-     M(SRC_SETLINE,      "setline",     1)  /* A file-absolute source line number note. */          \
-     M(SRC_UNUSED21,     "unused21",    0)  /* Unused. */                                           \
-     M(SRC_UNUSED22,     "unused22",    0)  /* Unused. */                                           \
-     M(SRC_UNUSED23,     "unused23",    0)  /* Unused. */                                           \
-     M(SRC_XDELTA,       "xdelta",      0)  /* 24-31 are for extended delta notes. */
-diff --git a/js/src/frontend/TryEmitter.cpp b/js/src/frontend/TryEmitter.cpp
---- a/js/src/frontend/TryEmitter.cpp
-+++ b/js/src/frontend/TryEmitter.cpp
-@@ -76,18 +76,21 @@ TryEmitter::emitTryEnd()
- 
-     // GOSUB to finally, if present.
-     if (hasFinally() && controlInfo_) {
-         if (!bce_->emitJump(JSOP_GOSUB, &controlInfo_->gosubs))
-             return false;
-     }
- 
-     // Source note points to the jump at the end of the try block.
--    if (!bce_->setSrcNoteOffset(noteIndex_, 0, bce_->offset() - tryStart_ + JSOP_TRY_LENGTH))
-+    if (!bce_->setSrcNoteOffset(noteIndex_, SrcNote::Try::EndOfTryJumpOffset,
-+                                bce_->offset() - tryStart_ + JSOP_TRY_LENGTH))
-+    {
-         return false;
-+    }
- 
-     // Emit jump over catch and/or finally.
-     if (!bce_->emitJump(JSOP_GOTO, &catchAndFinallyJump_))
-         return false;
- 
-     if (!bce_->emitJumpTarget(&tryEnd_))
-         return false;
- 
-diff --git a/js/src/jit/BytecodeAnalysis.cpp b/js/src/jit/BytecodeAnalysis.cpp
---- a/js/src/jit/BytecodeAnalysis.cpp
-+++ b/js/src/jit/BytecodeAnalysis.cpp
-@@ -128,17 +128,17 @@ BytecodeAnalysis::init(TempAllocator& al
-                 }
-             }
- 
-             // Get the pc of the last instruction in the try block. It's a JSOP_GOTO to
-             // jump over the catch/finally blocks.
-             jssrcnote* sn = GetSrcNote(gsn, script_, pc);
-             MOZ_ASSERT(SN_TYPE(sn) == SRC_TRY);
- 
--            jsbytecode* endOfTry = pc + GetSrcNoteOffset(sn, 0);
-+            jsbytecode* endOfTry = pc + GetSrcNoteOffset(sn, SrcNote::Try::EndOfTryJumpOffset);
-             MOZ_ASSERT(JSOp(*endOfTry) == JSOP_GOTO);
- 
-             jsbytecode* afterTry = endOfTry + GET_JUMP_OFFSET(endOfTry);
-             MOZ_ASSERT(afterTry > endOfTry);
- 
-             // Ensure the code following the try-block is always marked as
-             // reachable, to simplify Ion's ControlFlowGenerator.
-             uint32_t afterTryOffset = script_->pcToOffset(afterTry);
-diff --git a/js/src/jit/IonControlFlow.cpp b/js/src/jit/IonControlFlow.cpp
---- a/js/src/jit/IonControlFlow.cpp
-+++ b/js/src/jit/IonControlFlow.cpp
-@@ -541,17 +541,17 @@ ControlFlowGenerator::processTry()
-         checkedTryFinally_ = true;
-     }
- 
-     jssrcnote* sn = GetSrcNote(gsn, script, pc);
-     MOZ_ASSERT(SN_TYPE(sn) == SRC_TRY);
- 
-     // Get the pc of the last instruction in the try block. It's a JSOP_GOTO to
-     // jump over the catch block.
--    jsbytecode* endpc = pc + GetSrcNoteOffset(sn, 0);
-+    jsbytecode* endpc = pc + GetSrcNoteOffset(sn, SrcNote::Try::EndOfTryJumpOffset);
-     MOZ_ASSERT(JSOp(*endpc) == JSOP_GOTO);
-     MOZ_ASSERT(GetJumpOffset(endpc) > 0);
- 
-     jsbytecode* afterTry = endpc + GetJumpOffset(endpc);
- 
-     // If controlflow in the try body is terminated (by a return or throw
-     // statement), the code after the try-statement may still be reachable
-     // via the catch block (which we don't compile) and OSR can enter it.
-diff --git a/js/src/shell/js.cpp b/js/src/shell/js.cpp
---- a/js/src/shell/js.cpp
-+++ b/js/src/shell/js.cpp
-@@ -2797,18 +2797,21 @@ SrcNotes(JSContext* cx, HandleScript scr
-             }
-             UpdateSwitchTableBounds(cx, script, offset,
-                                     &switchTableStart, &switchTableEnd);
-             break;
-           }
- 
-           case SRC_TRY:
-             MOZ_ASSERT(JSOp(script->code()[offset]) == JSOP_TRY);
--            if (!sp->jsprintf(" offset to jump %u", unsigned(GetSrcNoteOffset(sn, 0))))
-+            if (!sp->jsprintf(" offset to jump %u",
-+                              unsigned(GetSrcNoteOffset(sn, SrcNote::Try::EndOfTryJumpOffset))))
-+            {
-                 return false;
-+            }
-             break;
- 
-           case SRC_CLASS_SPAN: {
-             unsigned startOffset = GetSrcNoteOffset(sn, 0);
-             unsigned endOffset = GetSrcNoteOffset(sn, 1);
-             if (!sp->jsprintf(" %u %u", startOffset, endOffset))
-                 return false;
-             break;

+ 0 - 124
frg/work-js/mozilla-release/patches/mozilla-central-push_428285.patch

@@ -1,124 +0,0 @@
-# HG changeset patch
-# User Tooru Fujisawa <arai_a@mac.com>
-# Date 1532505709 -32400
-#      Wed Jul 25 17:01:49 2018 +0900
-# Node ID d18e67f75339c713ce1aadc54631898b5af5df3d
-# Parent  7cabc189feb9c32b870183b8096ca8702f518f61
-Bug 1477621 - Part 3: Add source note field constants for colspan. r=jandem
-
-diff --git a/js/src/frontend/SourceNotes.h b/js/src/frontend/SourceNotes.h
---- a/js/src/frontend/SourceNotes.h
-+++ b/js/src/frontend/SourceNotes.h
-@@ -75,16 +75,26 @@ class SrcNote {
-       public:
-         enum Fields {
-             // The offset of the JSOP_GOTO at the end of the try block from
-             // JSOP_TRY.
-             EndOfTryJumpOffset,
-             Count
-         };
-     };
-+    // SRC_COLSPAN: Source note for arbitrary ops.
-+    class ColSpan {
-+      public:
-+        enum Fields {
-+            // The column span (the diff between the column corresponds to the
-+            // current op and last known column).
-+            Span,
-+            Count
-+        };
-+    };
- };
- 
- #define FOR_EACH_SRC_NOTE_TYPE(M)                                                                  \
-     M(SRC_NULL,         "null",        0)  /* Terminates a note vector. */                         \
-     M(SRC_IF,           "if",          0)  /* JSOP_IFEQ bytecode is from an if-then. */            \
-     M(SRC_IF_ELSE,      "if-else",     0)  /* JSOP_IFEQ bytecode is from an if-then-else. */       \
-     M(SRC_COND,         "cond",        0)  /* JSOP_IFEQ is from conditional ?: operator. */        \
-     M(SRC_FOR,          "for",         3)  /* JSOP_NOP or JSOP_POP in for(;;) loop head. */        \
-@@ -101,17 +111,17 @@ class SrcNote {
-     M(SRC_TABLESWITCH,  "tableswitch", SrcNote::TableSwitch::Count) \
-     M(SRC_CONDSWITCH,   "condswitch",  SrcNote::CondSwitch::Count) \
-     M(SRC_NEXTCASE,     "nextcase",    SrcNote::NextCase::Count) \
-     M(SRC_ASSIGNOP,     "assignop",    0)  /* += or another assign-op follows. */                  \
-     M(SRC_CLASS_SPAN,   "class",       2)  /* The starting and ending offsets for the class, used  \
-                                               for toString correctness for default ctors. */       \
-     M(SRC_TRY,          "try",         SrcNote::Try::Count) \
-     /* All notes above here are "gettable".  See SN_IS_GETTABLE below. */                          \
--    M(SRC_COLSPAN,      "colspan",     1)  /* Number of columns this opcode spans. */              \
-+    M(SRC_COLSPAN,      "colspan",     SrcNote::ColSpan::Count) \
-     M(SRC_NEWLINE,      "newline",     0)  /* Bytecode follows a source newline. */                \
-     M(SRC_SETLINE,      "setline",     1)  /* A file-absolute source line number note. */          \
-     M(SRC_UNUSED21,     "unused21",    0)  /* Unused. */                                           \
-     M(SRC_UNUSED22,     "unused22",    0)  /* Unused. */                                           \
-     M(SRC_UNUSED23,     "unused23",    0)  /* Unused. */                                           \
-     M(SRC_XDELTA,       "xdelta",      0)  /* 24-31 are for extended delta notes. */
- 
- enum SrcNoteType {
-diff --git a/js/src/shell/js.cpp b/js/src/shell/js.cpp
---- a/js/src/shell/js.cpp
-+++ b/js/src/shell/js.cpp
-@@ -2720,17 +2720,17 @@ SrcNotes(JSContext* cx, HandleScript scr
-           case SRC_BREAK:
-           case SRC_BREAK2LABEL:
-           case SRC_SWITCHBREAK:
-           case SRC_ASSIGNOP:
-           case SRC_XDELTA:
-             break;
- 
-           case SRC_COLSPAN:
--            colspan = SN_OFFSET_TO_COLSPAN(GetSrcNoteOffset(sn, 0));
-+            colspan = SN_OFFSET_TO_COLSPAN(GetSrcNoteOffset(sn, SrcNote::ColSpan::Span));
-             if (!sp->jsprintf("%d", colspan))
-                 return false;
-             break;
- 
-           case SRC_SETLINE:
-             lineno = GetSrcNoteOffset(sn, 0);
-             if (!sp->jsprintf(" lineno %u", lineno))
-                 return false;
-diff --git a/js/src/vm/BytecodeUtil-inl.h b/js/src/vm/BytecodeUtil-inl.h
---- a/js/src/vm/BytecodeUtil-inl.h
-+++ b/js/src/vm/BytecodeUtil-inl.h
-@@ -173,17 +173,18 @@ class BytecodeRangeWithPosition : privat
-   private:
-     void updatePosition() {
-         // Determine the current line number by reading all source notes up to
-         // and including the current offset.
-         jsbytecode *lastLinePC = nullptr;
-         while (!SN_IS_TERMINATOR(sn) && snpc <= frontPC()) {
-             SrcNoteType type = SN_TYPE(sn);
-             if (type == SRC_COLSPAN) {
--                ptrdiff_t colspan = SN_OFFSET_TO_COLSPAN(GetSrcNoteOffset(sn, 0));
-+                ptrdiff_t colspan =
-+                    SN_OFFSET_TO_COLSPAN(GetSrcNoteOffset(sn, SrcNote::ColSpan::Span));
-                 MOZ_ASSERT(ptrdiff_t(column) + colspan >= 0);
-                 column += colspan;
-                 lastLinePC = snpc;
-             } else if (type == SRC_SETLINE) {
-                 lineno = size_t(GetSrcNoteOffset(sn, 0));
-                 column = 0;
-                 lastLinePC = snpc;
-             } else if (type == SRC_NEWLINE) {
-diff --git a/js/src/vm/JSScript.cpp b/js/src/vm/JSScript.cpp
---- a/js/src/vm/JSScript.cpp
-+++ b/js/src/vm/JSScript.cpp
-@@ -3272,17 +3272,17 @@ js::PCToLineNumber(unsigned startLine, j
-         SrcNoteType type = SN_TYPE(sn);
-         if (type == SRC_SETLINE) {
-             lineno = unsigned(GetSrcNoteOffset(sn, 0));
-             column = 0;
-         } else if (type == SRC_NEWLINE) {
-             lineno++;
-             column = 0;
-         } else if (type == SRC_COLSPAN) {
--            ptrdiff_t colspan = SN_OFFSET_TO_COLSPAN(GetSrcNoteOffset(sn, 0));
-+            ptrdiff_t colspan = SN_OFFSET_TO_COLSPAN(GetSrcNoteOffset(sn, SrcNote::ColSpan::Span));
-             MOZ_ASSERT(ptrdiff_t(column) + colspan >= 0);
-             column += colspan;
-         }
-     }
- 
-     if (columnp)
-         *columnp = column;
- 

+ 0 - 182
frg/work-js/mozilla-release/patches/mozilla-central-push_428286.patch

@@ -1,182 +0,0 @@
-# HG changeset patch
-# User Tooru Fujisawa <arai_a@mac.com>
-# Date 1532505709 -32400
-#      Wed Jul 25 17:01:49 2018 +0900
-# Node ID 9d328a1be52ce31ef56c4fe7e4155b4a6f2d35fc
-# Parent  d18e67f75339c713ce1aadc54631898b5af5df3d
-Bug 1477621 - Part 4: Add source note field constants for line. r=jandem
-
-diff --git a/js/src/frontend/SourceNotes.h b/js/src/frontend/SourceNotes.h
---- a/js/src/frontend/SourceNotes.h
-+++ b/js/src/frontend/SourceNotes.h
-@@ -85,16 +85,25 @@ class SrcNote {
-       public:
-         enum Fields {
-             // The column span (the diff between the column corresponds to the
-             // current op and last known column).
-             Span,
-             Count
-         };
-     };
-+    // SRC_SETLINE: Source note for arbitrary ops.
-+    class SetLine {
-+      public:
-+        enum Fields {
-+            // The file-absolute source line number of the current op.
-+            Line,
-+            Count
-+        };
-+    };
- };
- 
- #define FOR_EACH_SRC_NOTE_TYPE(M)                                                                  \
-     M(SRC_NULL,         "null",        0)  /* Terminates a note vector. */                         \
-     M(SRC_IF,           "if",          0)  /* JSOP_IFEQ bytecode is from an if-then. */            \
-     M(SRC_IF_ELSE,      "if-else",     0)  /* JSOP_IFEQ bytecode is from an if-then-else. */       \
-     M(SRC_COND,         "cond",        0)  /* JSOP_IFEQ is from conditional ?: operator. */        \
-     M(SRC_FOR,          "for",         3)  /* JSOP_NOP or JSOP_POP in for(;;) loop head. */        \
-@@ -113,17 +122,17 @@ class SrcNote {
-     M(SRC_NEXTCASE,     "nextcase",    SrcNote::NextCase::Count) \
-     M(SRC_ASSIGNOP,     "assignop",    0)  /* += or another assign-op follows. */                  \
-     M(SRC_CLASS_SPAN,   "class",       2)  /* The starting and ending offsets for the class, used  \
-                                               for toString correctness for default ctors. */       \
-     M(SRC_TRY,          "try",         SrcNote::Try::Count) \
-     /* All notes above here are "gettable".  See SN_IS_GETTABLE below. */                          \
-     M(SRC_COLSPAN,      "colspan",     SrcNote::ColSpan::Count) \
-     M(SRC_NEWLINE,      "newline",     0)  /* Bytecode follows a source newline. */                \
--    M(SRC_SETLINE,      "setline",     1)  /* A file-absolute source line number note. */          \
-+    M(SRC_SETLINE,      "setline",     SrcNote::SetLine::Count) \
-     M(SRC_UNUSED21,     "unused21",    0)  /* Unused. */                                           \
-     M(SRC_UNUSED22,     "unused22",    0)  /* Unused. */                                           \
-     M(SRC_UNUSED23,     "unused23",    0)  /* Unused. */                                           \
-     M(SRC_XDELTA,       "xdelta",      0)  /* 24-31 are for extended delta notes. */
- 
- enum SrcNoteType {
- #define DEFINE_SRC_NOTE_TYPE(sym, name, arity) sym,
-     FOR_EACH_SRC_NOTE_TYPE(DEFINE_SRC_NOTE_TYPE)
-diff --git a/js/src/shell/js.cpp b/js/src/shell/js.cpp
---- a/js/src/shell/js.cpp
-+++ b/js/src/shell/js.cpp
-@@ -2726,17 +2726,17 @@ SrcNotes(JSContext* cx, HandleScript scr
- 
-           case SRC_COLSPAN:
-             colspan = SN_OFFSET_TO_COLSPAN(GetSrcNoteOffset(sn, SrcNote::ColSpan::Span));
-             if (!sp->jsprintf("%d", colspan))
-                 return false;
-             break;
- 
-           case SRC_SETLINE:
--            lineno = GetSrcNoteOffset(sn, 0);
-+            lineno = GetSrcNoteOffset(sn, SrcNote::SetLine::Line);
-             if (!sp->jsprintf(" lineno %u", lineno))
-                 return false;
-             break;
- 
-           case SRC_NEWLINE:
-             ++lineno;
-             break;
- 
-diff --git a/js/src/vm/BytecodeUtil-inl.h b/js/src/vm/BytecodeUtil-inl.h
---- a/js/src/vm/BytecodeUtil-inl.h
-+++ b/js/src/vm/BytecodeUtil-inl.h
-@@ -179,17 +179,17 @@ class BytecodeRangeWithPosition : privat
-             SrcNoteType type = SN_TYPE(sn);
-             if (type == SRC_COLSPAN) {
-                 ptrdiff_t colspan =
-                     SN_OFFSET_TO_COLSPAN(GetSrcNoteOffset(sn, SrcNote::ColSpan::Span));
-                 MOZ_ASSERT(ptrdiff_t(column) + colspan >= 0);
-                 column += colspan;
-                 lastLinePC = snpc;
-             } else if (type == SRC_SETLINE) {
--                lineno = size_t(GetSrcNoteOffset(sn, 0));
-+                lineno = size_t(GetSrcNoteOffset(sn, SrcNote::SetLine::Line));
-                 column = 0;
-                 lastLinePC = snpc;
-             } else if (type == SRC_NEWLINE) {
-                 lineno++;
-                 column = 0;
-                 lastLinePC = snpc;
-             }
- 
-diff --git a/js/src/vm/CodeCoverage.cpp b/js/src/vm/CodeCoverage.cpp
---- a/js/src/vm/CodeCoverage.cpp
-+++ b/js/src/vm/CodeCoverage.cpp
-@@ -191,17 +191,17 @@ LCovSource::writeScript(JSScript* script
- 
-         // If we have additional source notes, walk all the source notes of the
-         // current pc.
-         if (snpc <= pc || !firstLineHasBeenWritten) {
-             size_t oldLine = lineno;
-             while (!SN_IS_TERMINATOR(sn) && snpc <= pc) {
-                 SrcNoteType type = SN_TYPE(sn);
-                 if (type == SRC_SETLINE)
--                    lineno = size_t(GetSrcNoteOffset(sn, 0));
-+                    lineno = size_t(GetSrcNoteOffset(sn, SrcNote::SetLine::Line));
-                 else if (type == SRC_NEWLINE)
-                     lineno++;
-                 else if (type == SRC_TABLESWITCH)
-                     tableswitchExitOffset = GetSrcNoteOffset(sn, SrcNote::TableSwitch::EndOffset);
- 
-                 sn = SN_NEXT(sn);
-                 snpc += SN_DELTA(sn);
-             }
-diff --git a/js/src/vm/JSScript.cpp b/js/src/vm/JSScript.cpp
---- a/js/src/vm/JSScript.cpp
-+++ b/js/src/vm/JSScript.cpp
-@@ -3266,17 +3266,17 @@ js::PCToLineNumber(unsigned startLine, j
-     ptrdiff_t target = pc - code;
-     for (jssrcnote* sn = notes; !SN_IS_TERMINATOR(sn); sn = SN_NEXT(sn)) {
-         offset += SN_DELTA(sn);
-         if (offset > target)
-             break;
- 
-         SrcNoteType type = SN_TYPE(sn);
-         if (type == SRC_SETLINE) {
--            lineno = unsigned(GetSrcNoteOffset(sn, 0));
-+            lineno = unsigned(GetSrcNoteOffset(sn, SrcNote::SetLine::Line));
-             column = 0;
-         } else if (type == SRC_NEWLINE) {
-             lineno++;
-             column = 0;
-         } else if (type == SRC_COLSPAN) {
-             ptrdiff_t colspan = SN_OFFSET_TO_COLSPAN(GetSrcNoteOffset(sn, SrcNote::ColSpan::Span));
-             MOZ_ASSERT(ptrdiff_t(column) + colspan >= 0);
-             column += colspan;
-@@ -3318,17 +3318,17 @@ js::LineNumberToPC(JSScript* script, uns
-             if (diff < bestdiff) {
-                 bestdiff = diff;
-                 best = offset;
-             }
-         }
-         offset += SN_DELTA(sn);
-         SrcNoteType type = SN_TYPE(sn);
-         if (type == SRC_SETLINE) {
--            lineno = unsigned(GetSrcNoteOffset(sn, 0));
-+            lineno = unsigned(GetSrcNoteOffset(sn, SrcNote::SetLine::Line));
-         } else if (type == SRC_NEWLINE) {
-             lineno++;
-         }
-     }
-     if (best >= 0)
-         offset = best;
- out:
-     return script->offsetToPC(offset);
-@@ -3337,17 +3337,17 @@ out:
- JS_FRIEND_API(unsigned)
- js::GetScriptLineExtent(JSScript* script)
- {
-     unsigned lineno = script->lineno();
-     unsigned maxLineNo = lineno;
-     for (jssrcnote* sn = script->notes(); !SN_IS_TERMINATOR(sn); sn = SN_NEXT(sn)) {
-         SrcNoteType type = SN_TYPE(sn);
-         if (type == SRC_SETLINE)
--            lineno = unsigned(GetSrcNoteOffset(sn, 0));
-+            lineno = unsigned(GetSrcNoteOffset(sn, SrcNote::SetLine::Line));
-         else if (type == SRC_NEWLINE)
-             lineno++;
- 
-         if (maxLineNo < lineno)
-             maxLineNo = lineno;
-     }
- 
-     return 1 + maxLineNo - script->lineno();

+ 0 - 102
frg/work-js/mozilla-release/patches/mozilla-central-push_428496.patch

@@ -1,102 +0,0 @@
-# HG changeset patch
-# User Nika Layzell <nika@thelayzells.com>
-# Date 1530910100 14400
-#      Fri Jul 06 16:48:20 2018 -0400
-# Node ID 40885fbf99c60efa95765d764d21c92de9846a6d
-# Parent  da79e75b9cb35daeb80fe000a6f0f9ce339aedac
-Bug 1471726 - Part 2: Add basic tests for jsval array codegen, r=mccr8
-
-diff --git a/js/xpconnect/tests/components/js/xpctest_params.js b/js/xpconnect/tests/components/js/xpctest_params.js
---- a/js/xpconnect/tests/components/js/xpctest_params.js
-+++ b/js/xpconnect/tests/components/js/xpctest_params.js
-@@ -64,16 +64,17 @@ TestParams.prototype = {
-   testAUTF8String: f,
-   testACString: f,
-   testJsval: f,
-   testShortArray: f_is,
-   testDoubleArray: f_is,
-   testStringArray: f_is,
-   testWstringArray: f_is,
-   testInterfaceArray: f_is,
-+  testJsvalArray: f_is,
-   testSizedString: f_is,
-   testSizedWstring: f_is,
-   testInterfaceIs: f_is,
-   testInterfaceIsArray: f_size_and_iid,
-   testOutAString: function(o) { o.value = "out"; },
-   testStringArrayOptionalSize: function(arr, size) {
-     if (arr.length != size) { throw "bad size passed to test method"; }
-     var rv = "";
-diff --git a/js/xpconnect/tests/components/native/xpctest_params.cpp b/js/xpconnect/tests/components/native/xpctest_params.cpp
---- a/js/xpconnect/tests/components/native/xpctest_params.cpp
-+++ b/js/xpconnect/tests/components/native/xpctest_params.cpp
-@@ -218,16 +218,23 @@ NS_IMETHODIMP nsXPCTestParams::TestWstri
- 
- NS_IMETHODIMP nsXPCTestParams::TestInterfaceArray(uint32_t aLength, nsIXPCTestInterfaceA** a,
-                                                   uint32_t* bLength, nsIXPCTestInterfaceA * **b,
-                                                   uint32_t* rvLength, nsIXPCTestInterfaceA * **rv)
- {
-     BUFFER_METHOD_IMPL(nsIXPCTestInterfaceA*, 0, TAKE_OWNERSHIP_INTERFACE);
- }
- 
-+NS_IMETHODIMP nsXPCTestParams::TestJsvalArray(uint32_t aLength, JS::Value *a,
-+                                              uint32_t* bLength, JS::Value **b,
-+                                              uint32_t* rvLength, JS::Value **rv)
-+{
-+    BUFFER_METHOD_IMPL(JS::Value, 0, TAKE_OWNERSHIP_NOOP);
-+}
-+
- NS_IMETHODIMP nsXPCTestParams::TestSizedString(uint32_t aLength, const char * a,
-                                                uint32_t* bLength, char * *b,
-                                                uint32_t* rvLength, char * *rv)
- {
-     BUFFER_METHOD_IMPL(char, 1, TAKE_OWNERSHIP_NOOP);
- }
- 
- NS_IMETHODIMP nsXPCTestParams::TestSizedWstring(uint32_t aLength, const char16_t * a,
-diff --git a/js/xpconnect/tests/idl/xpctest_params.idl b/js/xpconnect/tests/idl/xpctest_params.idl
---- a/js/xpconnect/tests/idl/xpctest_params.idl
-+++ b/js/xpconnect/tests/idl/xpctest_params.idl
-@@ -77,14 +77,20 @@ interface nsIXPCTestParams : nsISupports
-   // in mozilla-central, but calendar stuff depends on it.
-   void                  testInterfaceIsArray(in unsigned long aLength, in nsIIDPtr aIID,
-                                              [array, size_is(aLength), iid_is(aIID)] in nsQIResult a,
-                                              inout unsigned long bLength, inout nsIIDPtr bIID,
-                                              [array, size_is(bLength), iid_is(bIID)] inout nsQIResult b,
-                                              out unsigned long rvLength, out nsIIDPtr rvIID,
-                                              [retval, array, size_is(rvLength), iid_is(rvIID)] out nsQIResult rv);
- 
-+  // Test arrays of jsvals
-+  void                  testJsvalArray(in unsigned long aLength, [array, size_is(aLength)] in jsval a,
-+                                       inout unsigned long bLength, [array, size_is(bLength)] inout jsval b,
-+                                       out unsigned long rvLength, [retval, array, size_is(rvLength)] out jsval rv);
-+
-+
-   // Test for out dipper parameters
-   void                 testOutAString(out AString o);
- 
-   // Test for optional array size_is.
-   ACString             testStringArrayOptionalSize([array, size_is(aLength)] in string a, [optional] in unsigned long aLength);
- };
-diff --git a/js/xpconnect/tests/unit/test_params.js b/js/xpconnect/tests/unit/test_params.js
---- a/js/xpconnect/tests/unit/test_params.js
-+++ b/js/xpconnect/tests/unit/test_params.js
-@@ -158,16 +158,18 @@ function test_component(contractid) {
-   doIsTest("testDoubleArray", [-10, -0.5], 2, [1, 3, 1e11, -8e-5 ], 4, arrayComparator(fuzzComparator));
- 
-   doIsTest("testStringArray", ["mary", "hat", "hey", "lid", "tell", "lam"], 6,
-                               ["ids", "fleas", "woes", "wide", "has", "know", "!"], 7, arrayComparator(standardComparator));
-   doIsTest("testWstringArray", ["沒有語言", "的偉大嗎?]"], 2,
-                                ["we", "are", "being", "sooo", "international", "right", "now"], 7, arrayComparator(standardComparator));
-   doIsTest("testInterfaceArray", [makeA(), makeA()], 2,
-                                  [makeA(), makeA(), makeA(), makeA(), makeA(), makeA()], 6, arrayComparator(interfaceComparator));
-+  doIsTest("testJsvalArray", [{ cheese: 'whiz', apple: 8 }, [1, 5, '3'], /regex/], 3,
-+                             ['apple', 2.2e10, 3.3e30, { only: "wheedle", except: {} }], 4, arrayComparator(standardComparator));
- 
-   // Test typed arrays and ArrayBuffer aliasing.
-   var arrayBuffer = new ArrayBuffer(16);
-   var int16Array = new Int16Array(arrayBuffer, 2, 3);
-   int16Array.set([-32768, 0, 32767]);
-   doIsTest("testShortArray", int16Array, 3, new Int16Array([1773, -32768, 32767, 7]), 4, arrayComparator(standardComparator));
-   doIsTest("testDoubleArray", new Float64Array([-10, -0.5]), 2, new Float64Array([0, 3.2, 1.0e10, -8.33 ]), 4, arrayComparator(fuzzComparator));
- 

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