Merge autoland to mozilla-central. a=merge
authorMihai Alexandru Michis <malexandru@mozilla.com>
Mon, 18 Nov 2019 11:33:59 +0200
changeset 502500 f78494c785f1b3264b1a17376d01520e1072ba7b
parent 502499 d6844fe546ad129a6b2c93dd2e70a75d40e7ffca (current diff)
parent 502374 cbe5a080a2ada0308ff3a8eae088ddd44b79af6d (diff)
child 502501 edad970978193a3e5188e74dd09640039d6e2c76
push id114172
push userdluca@mozilla.com
push dateTue, 19 Nov 2019 11:31:10 +0000
treeherdermozilla-inbound@b5c5ba07d3db [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmerge
milestone72.0a1
first release with
nightly linux32
f78494c785f1 / 72.0a1 / 20191118093852 / files
nightly linux64
f78494c785f1 / 72.0a1 / 20191118093852 / files
nightly mac
f78494c785f1 / 72.0a1 / 20191118093852 / files
nightly win32
f78494c785f1 / 72.0a1 / 20191118093852 / files
nightly win64
f78494c785f1 / 72.0a1 / 20191118093852 / files
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
releases
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Merge autoland to mozilla-central. a=merge
testing/web-platform/tests/visual-viewport/viewport-no-resize-event-on-overflow-recalc.html.ini
third_party/rust/synstructure-0.10.1/.cargo-checksum.json
third_party/rust/synstructure-0.10.1/Cargo.toml
third_party/rust/synstructure-0.10.1/LICENSE
third_party/rust/synstructure-0.10.1/README.md
third_party/rust/synstructure-0.10.1/src/lib.rs
third_party/rust/synstructure-0.10.1/src/macros.rs
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -311,34 +311,34 @@ dependencies = [
 ]
 
 [[package]]
 name = "bits_client"
 version = "0.2.0"
 dependencies = [
  "bits 0.2.0",
  "comedy 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "failure 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
- "failure_derive 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
+ "failure 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
+ "failure_derive 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
  "guid_win 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)",
  "regex 1.1.9 (registry+https://github.com/rust-lang/crates.io-index)",
  "tempfile 3.0.5 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "bitsdownload"
 version = "0.1.0"
 dependencies = [
  "bits_client 0.2.0",
  "comedy 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "crossbeam-utils 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)",
- "failure 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
- "failure_derive 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
+ "failure 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
+ "failure_derive 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
  "libc 0.2.59 (registry+https://github.com/rust-lang/crates.io-index)",
  "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
  "moz_task 0.1.0",
  "nserror 0.1.0",
  "nsstring 0.1.0",
  "xpcom 0.1.0",
 ]
 
@@ -532,18 +532,18 @@ name = "colorful"
 version = "0.2.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 
 [[package]]
 name = "comedy"
 version = "0.1.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
- "failure 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
- "failure_derive 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
+ "failure 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
+ "failure_derive 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
  "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "constant_time_eq"
 version = "0.1.3"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 
@@ -640,18 +640,18 @@ dependencies = [
 name = "cranelift-codegen"
 version = "0.46.1"
 source = "git+https://github.com/CraneStation/Cranelift?rev=da179e4fd83d49b7ad6c9f286b1ea04d4f64907e#da179e4fd83d49b7ad6c9f286b1ea04d4f64907e"
 dependencies = [
  "cranelift-bforest 0.46.1 (git+https://github.com/CraneStation/Cranelift?rev=da179e4fd83d49b7ad6c9f286b1ea04d4f64907e)",
  "cranelift-codegen-meta 0.46.1 (git+https://github.com/CraneStation/Cranelift?rev=da179e4fd83d49b7ad6c9f286b1ea04d4f64907e)",
  "cranelift-codegen-shared 0.46.1 (git+https://github.com/CraneStation/Cranelift?rev=da179e4fd83d49b7ad6c9f286b1ea04d4f64907e)",
  "cranelift-entity 0.46.1 (git+https://github.com/CraneStation/Cranelift?rev=da179e4fd83d49b7ad6c9f286b1ea04d4f64907e)",
- "failure 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
- "failure_derive 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
+ "failure 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
+ "failure_derive 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
  "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
  "smallvec 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)",
  "target-lexicon 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "cranelift-codegen-meta"
 version = "0.46.1"
@@ -690,18 +690,18 @@ dependencies = [
 [[package]]
 name = "cranelift-wasm"
 version = "0.46.1"
 source = "git+https://github.com/CraneStation/Cranelift?rev=da179e4fd83d49b7ad6c9f286b1ea04d4f64907e#da179e4fd83d49b7ad6c9f286b1ea04d4f64907e"
 dependencies = [
  "cranelift-codegen 0.46.1 (git+https://github.com/CraneStation/Cranelift?rev=da179e4fd83d49b7ad6c9f286b1ea04d4f64907e)",
  "cranelift-entity 0.46.1 (git+https://github.com/CraneStation/Cranelift?rev=da179e4fd83d49b7ad6c9f286b1ea04d4f64907e)",
  "cranelift-frontend 0.46.1 (git+https://github.com/CraneStation/Cranelift?rev=da179e4fd83d49b7ad6c9f286b1ea04d4f64907e)",
- "failure 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
- "failure_derive 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
+ "failure 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
+ "failure_derive 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
  "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
  "wasmparser 0.39.2 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "crc32fast"
 version = "1.2.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -1084,32 +1084,32 @@ version = "0.20.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
  "num-traits 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)",
  "serde 1.0.88 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "failure"
-version = "0.1.3"
+version = "0.1.6"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
  "backtrace 0.3.38 (registry+https://github.com/rust-lang/crates.io-index)",
- "failure_derive 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
+ "failure_derive 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "failure_derive"
-version = "0.1.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-dependencies = [
- "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)",
- "quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)",
- "syn 0.15.30 (registry+https://github.com/rust-lang/crates.io-index)",
- "synstructure 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)",
+version = "0.1.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "proc-macro2 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)",
+ "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
+ "syn 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)",
+ "synstructure 0.12.1 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "fake-simd"
 version = "0.1.2"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 
 [[package]]
@@ -1732,17 +1732,17 @@ version = "3.1.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 
 [[package]]
 name = "kvstore"
 version = "0.1.0"
 dependencies = [
  "atomic_refcell 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "crossbeam-utils 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)",
- "failure 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
+ "failure 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
  "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "libc 0.2.59 (registry+https://github.com/rust-lang/crates.io-index)",
  "lmdb-rkv 0.12.3 (registry+https://github.com/rust-lang/crates.io-index)",
  "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
  "moz_task 0.1.0",
  "nserror 0.1.0",
  "nsstring 0.1.0",
  "rkv 0.10.2 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -1876,17 +1876,17 @@ dependencies = [
 [[package]]
 name = "lucet-module"
 version = "0.1.1"
 source = "git+https://github.com/PLSysSec/lucet_sandbox_compiler#5c22392b5b1aaa60e915c75e92b57391e1e61e6d"
 dependencies = [
  "bincode 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "cranelift-entity 0.41.0 (git+https://github.com/PLSysSec/lucet_sandbox_compiler)",
- "failure 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
+ "failure 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
  "num-derive 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
  "num-traits 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)",
  "object 0.14.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "serde 1.0.88 (registry+https://github.com/rust-lang/crates.io-index)",
  "serde_json 1.0.26 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
@@ -1906,17 +1906,17 @@ dependencies = [
 name = "lucet-runtime-internals"
 version = "0.1.1"
 source = "git+https://github.com/PLSysSec/lucet_sandbox_compiler#5c22392b5b1aaa60e915c75e92b57391e1e61e6d"
 dependencies = [
  "bincode 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "bitflags 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "cc 1.0.47 (registry+https://github.com/rust-lang/crates.io-index)",
- "failure 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
+ "failure 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
  "getrandom 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
  "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "libc 0.2.59 (registry+https://github.com/rust-lang/crates.io-index)",
  "libloading 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "lucet-module 0.1.1 (git+https://github.com/PLSysSec/lucet_sandbox_compiler)",
  "memoffset 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "nix 0.13.1 (git+https://github.com/shravanrn/nix/?branch=r0.13.1)",
  "num-derive 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -1925,17 +1925,17 @@ dependencies = [
 ]
 
 [[package]]
 name = "lucet-wasi"
 version = "0.1.1"
 source = "git+https://github.com/PLSysSec/lucet_sandbox_compiler#5c22392b5b1aaa60e915c75e92b57391e1e61e6d"
 dependencies = [
  "cast 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
- "failure 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
+ "failure 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
  "libc 0.2.59 (registry+https://github.com/rust-lang/crates.io-index)",
  "lucet-module 0.1.1 (git+https://github.com/PLSysSec/lucet_sandbox_compiler)",
  "lucet-runtime 0.1.1 (git+https://github.com/PLSysSec/lucet_sandbox_compiler)",
  "lucet-runtime-internals 0.1.1 (git+https://github.com/PLSysSec/lucet_sandbox_compiler)",
  "nix 0.13.1 (git+https://github.com/shravanrn/nix/?branch=r0.13.1)",
  "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
@@ -1973,22 +1973,22 @@ dependencies = [
  "smallbitvec 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "smallvec 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)",
  "thin-slice 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "malloc_size_of_derive"
-version = "0.1.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-dependencies = [
- "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)",
- "syn 0.15.30 (registry+https://github.com/rust-lang/crates.io-index)",
- "synstructure 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)",
+version = "0.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "proc-macro2 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)",
+ "syn 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)",
+ "synstructure 0.12.1 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "mapped_hyph"
 version = "0.3.0"
 source = "git+https://github.com/jfkthame/mapped_hyph.git?tag=v0.3.0#3b5fffbe17e8cdcc6814886a9b9170fde3db13bd"
 dependencies = [
  "arrayref 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -2991,17 +2991,17 @@ dependencies = [
  "redox_syscall 0.1.56 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "redox_users"
 version = "0.3.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
- "failure 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
+ "failure 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
  "rand_os 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
  "redox_syscall 0.1.56 (registry+https://github.com/rust-lang/crates.io-index)",
  "rust-argon2 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "regex"
 version = "1.1.9"
@@ -3073,17 +3073,17 @@ dependencies = [
 name = "rkv"
 version = "0.10.2"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
  "arrayref 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
  "bincode 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "bitflags 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
- "failure 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
+ "failure 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
  "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "lmdb-rkv 0.12.3 (registry+https://github.com/rust-lang/crates.io-index)",
  "ordered-float 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "serde 1.0.88 (registry+https://github.com/rust-lang/crates.io-index)",
  "serde_derive 1.0.88 (registry+https://github.com/rust-lang/crates.io-index)",
  "url 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "uuid 0.7.4 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
@@ -3092,34 +3092,34 @@ dependencies = [
 name = "rkv"
 version = "0.11.0"
 source = "git+https://github.com/mozilla/rkv?rev=6a866fdad2ca880df9b87fcbc9921abac1e91914#6a866fdad2ca880df9b87fcbc9921abac1e91914"
 dependencies = [
  "arrayref 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
  "bincode 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "bitflags 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
- "failure 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
+ "failure 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
  "id-arena 2.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "lmdb-rkv 0.12.3 (registry+https://github.com/rust-lang/crates.io-index)",
  "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
  "ordered-float 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "serde 1.0.88 (registry+https://github.com/rust-lang/crates.io-index)",
  "serde_derive 1.0.88 (registry+https://github.com/rust-lang/crates.io-index)",
  "url 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "uuid 0.7.4 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "rlbox_lucet_sandbox"
 version = "0.1.0"
 source = "git+https://github.com/PLSysSec/rlbox_lucet_sandbox/?rev=997c648eb0eaeaaa7a00a9eee20431f750b4e190#997c648eb0eaeaaa7a00a9eee20431f750b4e190"
 dependencies = [
- "failure 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
+ "failure 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
  "goblin 0.0.24 (registry+https://github.com/rust-lang/crates.io-index)",
  "lucet-module 0.1.1 (git+https://github.com/PLSysSec/lucet_sandbox_compiler)",
  "lucet-runtime 0.1.1 (git+https://github.com/PLSysSec/lucet_sandbox_compiler)",
  "lucet-runtime-internals 0.1.1 (git+https://github.com/PLSysSec/lucet_sandbox_compiler)",
  "lucet-wasi 0.1.1 (git+https://github.com/PLSysSec/lucet_sandbox_compiler)",
 ]
 
 [[package]]
@@ -3165,17 +3165,17 @@ name = "rust_cascade"
 version = "0.3.4"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
  "bit-vec 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "bit_reverse 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)",
  "byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "digest 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "murmurhash3 0.0.5 (registry+https://github.com/rust-lang/crates.io-index)",
- "rand 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
+ "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "rustc-demangle"
 version = "0.1.8"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 
 [[package]]
@@ -3546,17 +3546,17 @@ dependencies = [
  "fxhash 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "hashglobe 0.1.0",
  "indexmap 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "itertools 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "itoa 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
  "malloc_size_of 0.0.1",
- "malloc_size_of_derive 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "malloc_size_of_derive 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "matches 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
  "new_debug_unreachable 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "nsstring 0.1.0",
  "num-derive 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "num-integer 0.1.39 (registry+https://github.com/rust-lang/crates.io-index)",
  "num-traits 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)",
  "num_cpus 1.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "ordered-float 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -3602,17 +3602,17 @@ name = "style_traits"
 version = "0.0.1"
 dependencies = [
  "app_units 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "bitflags 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "cssparser 0.25.9 (registry+https://github.com/rust-lang/crates.io-index)",
  "euclid 0.20.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "malloc_size_of 0.0.1",
- "malloc_size_of_derive 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "malloc_size_of_derive 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "selectors 0.21.0",
  "serde 1.0.88 (registry+https://github.com/rust-lang/crates.io-index)",
  "servo_arc 0.1.1",
  "to_shmem 0.0.1",
  "to_shmem_derive 0.0.1",
 ]
 
 [[package]]
@@ -3658,43 +3658,32 @@ source = "registry+https://github.com/ru
 dependencies = [
  "proc-macro2 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)",
  "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
  "unicode-xid 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "synstructure"
-version = "0.10.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-dependencies = [
- "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)",
- "quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)",
- "syn 0.15.30 (registry+https://github.com/rust-lang/crates.io-index)",
- "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
-]
-
-[[package]]
-name = "synstructure"
 version = "0.12.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
  "proc-macro2 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)",
  "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
  "syn 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)",
  "unicode-xid 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "target-lexicon"
 version = "0.8.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
- "failure 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
- "failure_derive 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
+ "failure 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
+ "failure_derive 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
  "serde_json 1.0.26 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "tempfile"
 version = "3.0.5"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
@@ -4177,17 +4166,17 @@ dependencies = [
  "euclid 0.20.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "freetype 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "fxhash 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "gleam 0.6.17 (registry+https://github.com/rust-lang/crates.io-index)",
  "image 0.22.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "libc 0.2.59 (registry+https://github.com/rust-lang/crates.io-index)",
  "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
- "malloc_size_of_derive 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "malloc_size_of_derive 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "num-traits 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)",
  "plane-split 0.15.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "rayon 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "ron 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)",
  "serde 1.0.88 (registry+https://github.com/rust-lang/crates.io-index)",
  "serde_json 1.0.26 (registry+https://github.com/rust-lang/crates.io-index)",
  "sha2 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "smallvec 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -4206,17 +4195,17 @@ version = "0.60.0"
 dependencies = [
  "app_units 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "bitflags 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "core-foundation 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)",
  "core-graphics 0.17.3 (registry+https://github.com/rust-lang/crates.io-index)",
  "derive_more 0.13.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "euclid 0.20.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "malloc_size_of_derive 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "malloc_size_of_derive 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "peek-poke 0.2.0",
  "serde 1.0.88 (registry+https://github.com/rust-lang/crates.io-index)",
  "serde_bytes 0.11.2 (registry+https://github.com/rust-lang/crates.io-index)",
  "serde_derive 1.0.88 (registry+https://github.com/rust-lang/crates.io-index)",
  "time 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)",
  "wr_malloc_size_of 0.0.1",
 ]
 
@@ -4446,17 +4435,17 @@ dependencies = [
 ]
 
 [[package]]
 name = "xulstore"
 version = "0.1.0"
 dependencies = [
  "crossbeam-utils 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)",
  "cstr 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
- "failure 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
+ "failure 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
  "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "libc 0.2.59 (registry+https://github.com/rust-lang/crates.io-index)",
  "lmdb-rkv 0.12.3 (registry+https://github.com/rust-lang/crates.io-index)",
  "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
  "moz_task 0.1.0",
  "nserror 0.1.0",
  "nsstring 0.1.0",
  "rkv 0.10.2 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -4580,18 +4569,18 @@ dependencies = [
 "checksum dwrote 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "0bd1369e02db5e9b842a9b67bce8a2fcc043beafb2ae8a799dd482d46ea1ff0d"
 "checksum either 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "18785c1ba806c258137c937e44ada9ee7e69a37e3c72077542cd2f069d78562a"
 "checksum encoding_c 0.9.7 (registry+https://github.com/rust-lang/crates.io-index)" = "1891d977f814fd638c3b964987778665b5d1dc8690f46c4c7adc91466ad1c78a"
 "checksum encoding_c_mem 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)" = "2d32d28c32ff61236b8ea2678c6e43e63bf9690122cb53e9eca7dcefcc4ccb0c"
 "checksum encoding_rs 0.8.20 (registry+https://github.com/rust-lang/crates.io-index)" = "87240518927716f79692c2ed85bfe6e98196d18c6401ec75355760233a7e12e9"
 "checksum env_logger 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "aafcde04e90a5226a6443b7aabdb016ba2f8307c847d524724bd9b346dd1a2d3"
 "checksum error-chain 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ff511d5dc435d703f4971bc399647c9bc38e20cb41452e3b9feb4765419ed3f3"
 "checksum euclid 0.20.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2c4786521fec183792e755bf32cd0188e4e7628c6d0fcfd51426435b9081a106"
-"checksum failure 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "6dd377bcc1b1b7ce911967e3ec24fa19c3224394ec05b54aa7b083d498341ac7"
-"checksum failure_derive 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "64c2d913fe8ed3b6c6518eedf4538255b989945c14c2a7d5cbff62a5e2120596"
+"checksum failure 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "f8273f13c977665c5db7eb2b99ae520952fe5ac831ae4cd09d80c4c7042b5ed9"
+"checksum failure_derive 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "0bc225b78e0391e4b8683440bf2e63c2deeeb2ce5189eab46e2b68c6d3725d08"
 "checksum fake-simd 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e88a8acf291dafb59c2d96e8f59828f3838bb1a70398823ade51a84de6a6deed"
 "checksum filetime_win 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b8c37abd4a58e0cb794bcae4a7dc4f02fff376949d8d1066d4c729e97bfb38ec"
 "checksum flate2 1.0.11 (registry+https://github.com/rust-lang/crates.io-index)" = "2adaffba6388640136149e18ed080b77a78611c1e1d6de75aedcdf78df5d4682"
 "checksum fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)" = "2fad85553e09a6f881f739c29f0b00b0f01357c743266d478b68951ce23285f3"
 "checksum foreign-types 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5ebc04f19019fff1f2d627b5581574ead502f80c48c88900575a46e0840fe5d0"
 "checksum freetype 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b659e75b7a7338fe75afd7f909fc2b71937845cffb6ebe54ba2e50f13d8e903d"
 "checksum fuchsia-cprng 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "a06f77d526c1a601b7c4cdd98f54b5eaabffc14d5f2f0296febdc7f357c6d3ba"
 "checksum fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "2e9763c69ebaae630ba35f74888db465e49e259ba1bc0eda7d06f4a067615d82"
@@ -4649,17 +4638,17 @@ dependencies = [
 "checksum log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)" = "c84ec4b527950aa83a329754b01dbe3f58361d1c5efacd1f6d68c494d08a17c6"
 "checksum lucet-module 0.1.1 (git+https://github.com/PLSysSec/lucet_sandbox_compiler)" = "<none>"
 "checksum lucet-runtime 0.1.1 (git+https://github.com/PLSysSec/lucet_sandbox_compiler)" = "<none>"
 "checksum lucet-runtime-internals 0.1.1 (git+https://github.com/PLSysSec/lucet_sandbox_compiler)" = "<none>"
 "checksum lucet-wasi 0.1.1 (git+https://github.com/PLSysSec/lucet_sandbox_compiler)" = "<none>"
 "checksum lzw 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7d947cbb889ed21c2a84be6ffbaebf5b4e0f4340638cba0444907e38b56be084"
 "checksum mach 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "b823e83b2affd8f40a9ee8c29dbc56404c1e34cd2710921f2801e2cf29527afa"
 "checksum malloc_buf 0.0.6 (registry+https://github.com/rust-lang/crates.io-index)" = "62bb907fe88d54d8d9ce32a3cceab4218ed2f6b7d35617cafe9adf84e43919cb"
-"checksum malloc_size_of_derive 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "35adee9ed962cf7d07d62cb58bc45029f3227f5b5b86246caa8632f06c187bc3"
+"checksum malloc_size_of_derive 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "e37c5d4cd9473c5f4c9c111f033f15d4df9bd378fdf615944e360a4f55a05f0b"
 "checksum mapped_hyph 0.3.0 (git+https://github.com/jfkthame/mapped_hyph.git?tag=v0.3.0)" = "<none>"
 "checksum matches 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "100aabe6b8ff4e4a7e32c1c13523379802df0772b82466207ac25b013f193376"
 "checksum memchr 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2efc7bc57c883d4a4d6e3246905283d8dae951bb3bd32f49d6ef297f546e1c39"
 "checksum memmap 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "6585fd95e7bb50d6cc31e20d4cf9afb4e2ba16c5846fc76793f11218da9c475b"
 "checksum memoffset 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "ce6075db033bbbb7ee5a0bbd3a3186bbae616f57fb001c485c7ff77955f8177f"
 "checksum metal 0.17.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ddf8052f20601c7af6293d3f7bf7b9159aee5974804fe65d871d437f933ec1eb"
 "checksum mime 0.3.13 (registry+https://github.com/rust-lang/crates.io-index)" = "3e27ca21f40a310bd06d9031785f4801710d566c184a6e15bad4f1d9b65f9425"
 "checksum mime_guess 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "1a0ed03949aef72dbdf3116a383d7b38b4768e6f960528cd6a6044aa9ed68599"
@@ -4795,17 +4784,16 @@ dependencies = [
 "checksum spirv_cross 0.16.0 (git+https://github.com/kvark/spirv_cross?branch=wgpu)" = "<none>"
 "checksum stable_deref_trait 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "15132e0e364248108c5e2c02e3ab539be8d6f5d52a01ca9bbf27ed657316f02b"
 "checksum storage-map 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fd0a4829a5c591dc24a944a736d6b1e4053e51339a79fd5d4702c4c999a9c45e"
 "checksum string 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "00caf261d6f90f588f8450b8e1230fa0d5be49ee6140fdfbcb55335aff350970"
 "checksum strsim 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "bb4f380125926a99e52bc279241539c018323fab05ad6368b56f93d9369ff550"
 "checksum svg_fmt 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c666f0fed8e1e20e057af770af9077d72f3d5a33157b8537c1475dd8ffd6d32b"
 "checksum syn 0.15.30 (registry+https://github.com/rust-lang/crates.io-index)" = "66c8865bf5a7cbb662d8b011950060b3c8743dca141b054bf7195b20d314d8e2"
 "checksum syn 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)" = "66850e97125af79138385e9b88339cbcd037e3f28ceab8c5ad98e64f0f1f80bf"
-"checksum synstructure 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)" = "73687139bf99285483c96ac0add482c3776528beac1d97d444f6e91f203a2015"
 "checksum synstructure 0.12.1 (registry+https://github.com/rust-lang/crates.io-index)" = "3f085a5855930c0441ca1288cf044ea4aecf4f43a91668abdb870b4ba546a203"
 "checksum target-lexicon 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7975cb2c6f37d77b190bc5004a2bb015971464756fde9514651a525ada2a741a"
 "checksum tempfile 3.0.5 (registry+https://github.com/rust-lang/crates.io-index)" = "7e91405c14320e5c79b3d148e1c86f40749a36e490642202a31689cb1a3452b2"
 "checksum term_size 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e2b6b55df3198cc93372e85dd2ed817f0e38ce8cc0f22eb32391bfad9c4bf209"
 "checksum termcolor 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)" = "96d6098003bde162e4277c70665bd87c326f5a0c3f3fbfb285787fa482d54e6e"
 "checksum termion 1.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "689a3bdfaab439fd92bc87df5c4c78417d3cbe537487274e9b0b2dce76e92096"
 "checksum textwrap 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c0b59b6b4b44d867f1370ef1bd91bfb262bf07bf0ae65c202ea2fbc16153b693"
 "checksum thin-slice 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "8eaa81235c7058867fa8c0e7314f33dcce9c215f535d1913822a2b3f5e289f3c"
--- a/accessible/base/MarkupMap.h
+++ b/accessible/base/MarkupMap.h
@@ -253,16 +253,18 @@ MARKUPMAP(
       return nullptr;
     },
     0)
 
 MARKUPMAP(main, New_HyperText, roles::LANDMARK)
 
 MARKUPMAP(map, nullptr, roles::TEXT_CONTAINER)
 
+MARKUPMAP(mark, New_HyperText, roles::MARK, Attr(xmlroles, mark))
+
 MARKUPMAP(math, New_HyperText, roles::MATHML_MATH)
 
 MARKUPMAP(mi_, New_HyperText, roles::MATHML_IDENTIFIER)
 
 MARKUPMAP(mn_, New_HyperText, roles::MATHML_NUMBER)
 
 MARKUPMAP(mo_, New_HyperText, roles::MATHML_OPERATOR,
           AttrFromDOM(accent_, accent_), AttrFromDOM(fence_, fence_),
--- a/accessible/base/Role.h
+++ b/accessible/base/Role.h
@@ -1040,17 +1040,23 @@ enum Role {
 
   /**
    * An html:form element with a label provided by WAI-ARIA.
    * This may also be used if role="form" with a label should be exposed
    * differently in the future.
    */
   FORM_LANDMARK = 178,
 
-  LAST_ROLE = FORM_LANDMARK
+  /**
+   * The html:mark element.
+   * May also be used if WAI-ARIA gets an equivalent role.
+   */
+  MARK = 179,
+
+  LAST_ROLE = MARK
 };
 
 }  // namespace roles
 
 typedef enum mozilla::a11y::roles::Role role;
 
 }  // namespace a11y
 }  // namespace mozilla
--- a/accessible/base/RoleMap.h
+++ b/accessible/base/RoleMap.h
@@ -1625,9 +1625,18 @@ ROLE(CONTENT_INSERTION,
 ROLE(FORM_LANDMARK,
      "form",
      ATK_ROLE_LANDMARK,
      NSAccessibilityGroupRole,
      USE_ROLE_STRING,
      IA2_ROLE_FORM,
      java::SessionAccessibility::CLASSNAME_VIEW,
      eNoNameRule)
+
+ROLE(MARK,
+     "mark",
+     ATK_ROLE_STATIC,
+     NSAccessibilityGroupRole,
+     USE_ROLE_STRING,
+     IA2_ROLE_TEXT_FRAME,
+     java::SessionAccessibility::CLASSNAME_VIEW,
+     eNameFromSubtreeIfReqRule)
 // clang-format on
--- a/accessible/generic/RootAccessible.cpp
+++ b/accessible/generic/RootAccessible.cpp
@@ -343,16 +343,25 @@ void RootAccessible::ProcessDOMEvent(Eve
   nsINode* targetNode = accessible->GetNode();
   if (treeItemAcc && eventType.EqualsLiteral("select")) {
     // XXX: We shouldn't be based on DOM select event which doesn't provide us
     // any context info. We should integrate into nsTreeSelection instead.
     // If multiselect tree, we should fire selectionadd or selection removed
     if (FocusMgr()->HasDOMFocus(targetNode)) {
       nsCOMPtr<nsIDOMXULMultiSelectControlElement> multiSel =
           targetNode->AsElement()->AsXULMultiSelectControl();
+      if (!multiSel) {
+        // This shouldn't be possible. All XUL trees should have
+        // nsIDOMXULMultiSelectControlElement, and the tree is focused, so it
+        // shouldn't be dying. Nevertheless, this sometimes happens in the wild
+        // (bug 1597043).
+        MOZ_ASSERT_UNREACHABLE(
+            "XUL tree doesn't have nsIDOMXULMultiSelectControlElement");
+        return;
+      }
       nsAutoString selType;
       multiSel->GetSelType(selType);
       if (selType.IsEmpty() || !selType.EqualsLiteral("single")) {
         // XXX: We need to fire EVENT_SELECTION_ADD and EVENT_SELECTION_REMOVE
         // for each tree item. Perhaps each tree item will need to cache its
         // selection state and fire an event after a DOM "select" event when
         // that state changes. XULTreeAccessible::UpdateTreeSelection();
         nsEventShell::FireEvent(nsIAccessibleEvent::EVENT_SELECTION_WITHIN,
--- a/accessible/interfaces/nsIAccessibleRole.idl
+++ b/accessible/interfaces/nsIAccessibleRole.idl
@@ -1034,9 +1034,15 @@ interface nsIAccessibleRole : nsISupport
 
   /**
    * An html:form element with a label provided by WAI-ARIA.
    * This may also be used if role="form" with a label should be exposed
    * differently in the future.
    */
   const unsigned long ROLE_FORM_LANDMARK = 178;
 
+  /**
+   * The html:mark element.
+   * May also be used if WAI-ARIA gets an equivalent role.
+   */
+  const unsigned long ROLE_MARK = 179;
+
 };
--- a/accessible/ipc/win/handler/AccessibleHandler.cpp
+++ b/accessible/ipc/win/handler/AccessibleHandler.cpp
@@ -909,18 +909,21 @@ AccessibleHandler::accDoDefaultAction(VA
 HRESULT
 AccessibleHandler::put_accName(VARIANT varChild, BSTR szName) {
   // This matches AccessibleWrap
   return E_NOTIMPL;
 }
 
 HRESULT
 AccessibleHandler::put_accValue(VARIANT varChild, BSTR szValue) {
-  // This matches AccessibleWrap
-  return E_NOTIMPL;
+  HRESULT hr = ResolveIA2();
+  if (FAILED(hr)) {
+    return hr;
+  }
+  return mIA2PassThru->put_accValue(varChild, szValue);
 }
 
 /*** IAccessible2 ***/
 
 HRESULT
 AccessibleHandler::get_nRelations(long* nRelations) {
   if (!nRelations) {
     return E_INVALIDARG;
--- a/accessible/mac/mozAccessible.mm
+++ b/accessible/mac/mozAccessible.mm
@@ -866,16 +866,20 @@ struct RoleDescrComparator {
 
 - (NSString*)roleDescription {
   if (mRole == roles::DOCUMENT) return utils::LocalizedString(NS_LITERAL_STRING("htmlContent"));
 
   if (mRole == roles::FIGURE) return utils::LocalizedString(NS_LITERAL_STRING("figure"));
 
   if (mRole == roles::HEADING) return utils::LocalizedString(NS_LITERAL_STRING("heading"));
 
+  if (mRole == roles::MARK) {
+    return utils::LocalizedString(NS_LITERAL_STRING("highlight"));
+  }
+
   NSString* subrole = [self subrole];
 
   if (subrole) {
     size_t idx = 0;
     if (BinarySearchIf(sRoleDescrMap, 0, ArrayLength(sRoleDescrMap), RoleDescrComparator(subrole),
                        &idx)) {
       return utils::LocalizedString(sRoleDescrMap[idx].description);
     }
--- a/accessible/tests/mochitest/elm/test_HTMLSpec.html
+++ b/accessible/tests/mochitest/elm/test_HTMLSpec.html
@@ -997,23 +997,25 @@
       };
       testElm("map", obj);
 
       // ////////////////////////////////////////////////////////////////////////
       // HTML:mark contained by paragraph
 
       obj = {
         role: ROLE_PARAGRAPH,
-        textAttrs: {
-          0: { },
-          6: { "background-color": "rgb(255, 255, 0)" },
-        },
         children: [
           { role: ROLE_TEXT_LEAF }, // plain text
-          { role: ROLE_TEXT_LEAF }, // HTML:mark text
+          { role: ROLE_MARK,  // HTML:mark text
+            attributes: { "xml-roles": "mark" },
+            interfaces: [ nsIAccessibleText, nsIAccessibleHyperText ],
+            textAttrs: {
+              0: { },
+            }
+          }
         ],
       };
       testElm("mark_container", obj);
 
       // ////////////////////////////////////////////////////////////////////////
       // HTML:math
 
       obj = {
--- a/accessible/tests/mochitest/role.js
+++ b/accessible/tests/mochitest/role.js
@@ -46,16 +46,17 @@ const ROLE_HEADING = nsIAccessibleRole.R
 const ROLE_IMAGE_MAP = nsIAccessibleRole.ROLE_IMAGE_MAP;
 const ROLE_INTERNAL_FRAME = nsIAccessibleRole.ROLE_INTERNAL_FRAME;
 const ROLE_LABEL = nsIAccessibleRole.ROLE_LABEL;
 const ROLE_LANDMARK = nsIAccessibleRole.ROLE_LANDMARK;
 const ROLE_LINK = nsIAccessibleRole.ROLE_LINK;
 const ROLE_LIST = nsIAccessibleRole.ROLE_LIST;
 const ROLE_LISTBOX = nsIAccessibleRole.ROLE_LISTBOX;
 const ROLE_LISTITEM = nsIAccessibleRole.ROLE_LISTITEM;
+const ROLE_MARK = nsIAccessibleRole.ROLE_MARK;
 const ROLE_MATHML_MATH = nsIAccessibleRole.ROLE_MATHML_MATH;
 const ROLE_MATHML_IDENTIFIER = nsIAccessibleRole.ROLE_MATHML_IDENTIFIER;
 const ROLE_MATHML_NUMBER = nsIAccessibleRole.ROLE_MATHML_NUMBER;
 const ROLE_MATHML_OPERATOR = nsIAccessibleRole.ROLE_MATHML_OPERATOR;
 const ROLE_MATHML_TEXT = nsIAccessibleRole.ROLE_MATHML_TEXT;
 const ROLE_MATHML_STRING_LITERAL = nsIAccessibleRole.ROLE_MATHML_STRING_LITERAL;
 const ROLE_MATHML_GLYPH = nsIAccessibleRole.ROLE_MATHML_GLYPH;
 const ROLE_MATHML_ROW = nsIAccessibleRole.ROLE_MATHML_ROW;
--- a/accessible/tests/mochitest/textattrs/test_general.html
+++ b/accessible/tests/mochitest/textattrs/test_general.html
@@ -541,29 +541,33 @@
       };
       testTextAttrs(ID, 0, attrs, defAttrs, 0, 3);
       testTextAttrs(ID, 3, { }, defAttrs, 3, 7);
       testTextAttrs(ID, 7, attrs, defAttrs, 7, 8);
 
        // ////////////////////////////////////////////////////////////////////////
       // area19, "HTML5 mark tag" test
       // text enclosed in mark tag will have a different background color
+      // However, since bug 982125, it is its own accessible.
+      // Therefore, anything other than the default background color is
+      // unexpected.
       ID = "area19";
       defAttrs = buildDefaultTextAttrs(ID, "12pt");
 
       attrs = {};
       testTextAttrs(ID, 0, attrs, defAttrs, 0, 10);
 
-      tempElem = getNode(ID).firstChild.nextSibling;
-      gComputedStyle = document.defaultView.getComputedStyle(tempElem);
-      attrs = { "background-color": gComputedStyle.backgroundColor };
-      testTextAttrs(ID, 11, attrs, defAttrs, 10, 17);
+      ID = "area19mark";
+      defMarkAttrs = buildDefaultTextAttrs(ID, "12pt");
+      attrs = {};
+      testTextAttrs(ID, 0, attrs, defMarkAttrs, 0, 7);
 
+      ID = "area19";
       attrs = {};
-      testTextAttrs(ID, 18, attrs, defAttrs, 17, 28);
+      testTextAttrs(ID, 11, attrs, defAttrs, 11, 22);
 
        // ////////////////////////////////////////////////////////////////////////
       // area20, "aOffset as -1 (Mozilla Bug 789621)" test
 
       ID = "area20";
       defAttrs = buildDefaultTextAttrs(ID, "15pt");
       testDefaultTextAttrs(ID, defAttrs);
 
@@ -719,15 +723,15 @@
     </span>
   </p>
 
   <ul>
     <li id="area18" class="gencontent">item</li>
   </ul>
 
   <p id="area19">uncolored
-    <mark>colored</mark> uncolored
+    <mark id="area19mark">colored</mark> uncolored
   </p>
 
   <p id="area20" style="font-size: 15pt;">offset test</p>
 
 </body>
 </html>
--- a/accessible/windows/msaa/AccessibleWrap.cpp
+++ b/accessible/windows/msaa/AccessibleWrap.cpp
@@ -1011,17 +1011,35 @@ AccessibleWrap::put_accName(
     /* [in] */ BSTR szName) {
   return E_NOTIMPL;
 }
 
 STDMETHODIMP
 AccessibleWrap::put_accValue(
     /* [optional][in] */ VARIANT varChild,
     /* [in] */ BSTR szValue) {
-  return E_NOTIMPL;
+  RefPtr<IAccessible> accessible;
+  HRESULT hr = ResolveChild(varChild, getter_AddRefs(accessible));
+  if (FAILED(hr)) {
+    return hr;
+  }
+
+  if (accessible) {
+    return accessible->put_accValue(kVarChildIdSelf, szValue);
+  }
+
+  HyperTextAccessible* ht = AsHyperText();
+  if (!ht) {
+    return E_NOTIMPL;
+  }
+
+  uint32_t length = ::SysStringLen(szValue);
+  nsAutoString text(szValue, length);
+  ht->ReplaceText(text);
+  return S_OK;
 }
 
 ////////////////////////////////////////////////////////////////////////////////
 // IDispatch
 
 STDMETHODIMP
 AccessibleWrap::GetTypeInfoCount(UINT* pctinfo) {
   if (!pctinfo) return E_INVALIDARG;
--- a/browser/base/content/test/sanitize/head.js
+++ b/browser/base/content/test/sanitize/head.js
@@ -64,17 +64,17 @@ function createDomainCookie(host, origin
     false,
     Date.now() + 24000 * 60 * 60,
     originAttributes,
     Ci.nsICookie.SAMESITE_NONE
   );
 }
 
 function checkCookie(host, originAttributes) {
-  for (let cookie of Services.cookies.enumerator) {
+  for (let cookie of Services.cookies.cookies) {
     if (
       ChromeUtils.isOriginAttributesEqual(
         originAttributes,
         cookie.originAttributes
       ) &&
       cookie.host.includes(host)
     ) {
       return true;
--- a/browser/components/extensions/parent/ext-browsingData.js
+++ b/browser/components/extensions/parent/ext-browsingData.js
@@ -62,17 +62,17 @@ const clearCache = () => {
 
 const clearCookies = async function(options) {
   let cookieMgr = Services.cookies;
   // This code has been borrowed from Sanitizer.jsm.
   let yieldCounter = 0;
 
   if (options.since || options.hostnames) {
     // Iterate through the cookies and delete any created after our cutoff.
-    for (const cookie of cookieMgr.enumerator) {
+    for (const cookie of cookieMgr.cookies) {
       if (
         (!options.since ||
           cookie.creationTime >= PlacesUtils.toPRTime(options.since)) &&
         (!options.hostnames ||
           options.hostnames.includes(cookie.host.replace(/^\./, "")))
       ) {
         // This cookie was created after our cutoff, clear it.
         cookieMgr.remove(
--- a/browser/components/originattributes/test/browser/browser_firstPartyIsolation.js
+++ b/browser/components/originattributes/test/browser/browser_firstPartyIsolation.js
@@ -80,17 +80,17 @@ add_task(async function principal_test()
 add_task(async function cookie_test() {
   let tab = BrowserTestUtils.addTab(
     gBrowser,
     BASE_URL + "test_firstParty_cookie.html"
   );
   await BrowserTestUtils.browserLoaded(tab.linkedBrowser, true);
 
   let count = 0;
-  for (let cookie of Services.cookies.enumerator) {
+  for (let cookie of Services.cookies.cookies) {
     count++;
     Assert.equal(cookie.value, "foo", "Cookie value should be foo");
     Assert.equal(
       cookie.originAttributes.firstPartyDomain,
       BASE_DOMAIN,
       "Cookie's origin attributes should be " + BASE_DOMAIN
     );
   }
--- a/browser/components/sessionstore/SessionCookies.jsm
+++ b/browser/components/sessionstore/SessionCookies.jsm
@@ -189,17 +189,17 @@ var SessionCookiesInternal = {
   _reloadCookies() {
     CookieStore.clear();
 
     // Bail out if we're not supposed to store cookies at all.
     if (!PrivacyLevel.canSave(false)) {
       return;
     }
 
-    for (let cookie of Services.cookies.sessionEnumerator) {
+    for (let cookie of Services.cookies.sessionCookies) {
       this._addCookie(cookie);
     }
   },
 };
 
 /**
  * The internal storage that keeps track of session cookies.
  */
--- a/browser/components/sessionstore/test/browser_423132.js
+++ b/browser/components/sessionstore/test/browser_423132.js
@@ -20,29 +20,29 @@ add_task(async function() {
   await BrowserTestUtils.browserLoaded(tab.linkedBrowser);
   await TabStateFlusher.flush(tab.linkedBrowser);
 
   // get the sessionstore state for the window
   let state = ss.getBrowserState();
 
   // verify our cookie got set during pageload
   let i = 0;
-  for (var cookie of Services.cookies.enumerator) {
+  for (var cookie of Services.cookies.cookies) {
     i++;
   }
   Assert.equal(i, 1, "expected one cookie");
 
   // remove the cookie
   Services.cookies.removeAll();
 
   // restore the window state
   await setBrowserState(state);
 
   // at this point, the cookie should be restored...
-  for (var cookie2 of Services.cookies.enumerator) {
+  for (var cookie2 of Services.cookies.cookies) {
     if (cookie.name == cookie2.name) {
       break;
     }
   }
   is(cookie.name, cookie2.name, "cookie name successfully restored");
   is(cookie.value, cookie2.value, "cookie value successfully restored");
   is(cookie.path, cookie2.path, "cookie path successfully restored");
 
--- a/browser/components/sessionstore/test/browser_cookies_sameSite.js
+++ b/browser/components/sessionstore/test/browser_cookies_sameSite.js
@@ -1,15 +1,15 @@
 "use strict";
 
 const TEST_URL = "http://example.com";
 const MAX_EXPIRY = Math.pow(2, 62);
 
 function getSingleCookie() {
-  let cookies = Array.from(Services.cookies.enumerator);
+  let cookies = Array.from(Services.cookies.cookies);
   Assert.equal(cookies.length, 1, "expected one cookie");
   return cookies[0];
 }
 
 async function verifyRestore(sameSiteSetting) {
   Services.cookies.removeAll();
 
   // Make sure that sessionstore.js can be forced to be created by setting
--- a/browser/modules/Sanitizer.jsm
+++ b/browser/modules/Sanitizer.jsm
@@ -805,19 +805,19 @@ class PrincipalsCollector {
         Ci.nsIServiceWorkerRegistrationInfo
       );
       // We don't need to check the scheme. SW are just exposed to http/https URLs.
       principals.push(sw.principal);
     }
 
     // Let's take the list of unique hosts+OA from cookies.
     progress.step = "principals-cookies";
-    let enumerator = Services.cookies.enumerator;
+    let cookies = Services.cookies.cookies;
     let hosts = new Set();
-    for (let cookie of enumerator) {
+    for (let cookie of cookies) {
       hosts.add(
         cookie.rawHost +
           ChromeUtils.originAttributesToSuffix(cookie.originAttributes)
       );
     }
 
     progress.step = "principals-host-cookie";
     hosts.forEach(host => {
--- a/browser/modules/SiteDataManager.jsm
+++ b/browser/modules/SiteDataManager.jsm
@@ -173,17 +173,17 @@ var SiteDataManager = {
       //      After the bug 742822 and 1286798 landed, localStorage usage will be included.
       //      So currently only get indexedDB usage.
       this._quotaUsageRequest = Services.qms.getUsage(onUsageResult);
     });
     return this._getQuotaUsagePromise;
   },
 
   _getAllCookies() {
-    for (let cookie of Services.cookies.enumerator) {
+    for (let cookie of Services.cookies.cookies) {
       let site = this._getOrInsertSite(cookie.rawHost);
       site.cookies.push(cookie);
       if (site.lastAccessed < cookie.lastAccessed) {
         site.lastAccessed = cookie.lastAccessed;
       }
     }
   },
 
--- a/devtools/server/actors/utils/event-breakpoints.js
+++ b/devtools/server/actors/utils/event-breakpoints.js
@@ -258,17 +258,23 @@ const AVAILABLE_BREAKPOINTS = [
       generalEvent("touch", "touchstart"),
       generalEvent("touch", "touchmove"),
       generalEvent("touch", "touchend"),
       generalEvent("touch", "touchcancel"),
     ],
   },
   {
     name: "Worker",
-    items: [workerEvent("message"), workerEvent("messageerror")],
+    items: [
+      workerEvent("message"),
+      workerEvent("messageerror"),
+
+      // Service Worker events.
+      globalEvent("serviceworker", "fetch"),
+    ],
   },
   {
     name: "XHR",
     items: [
       xhrEvent("xhr", "readystatechange"),
       xhrEvent("xhr", "load"),
       xhrEvent("xhr", "loadstart"),
       xhrEvent("xhr", "loadend"),
--- a/dom/html/test/file_cookiemanager.js
+++ b/dom/html/test/file_cookiemanager.js
@@ -1,13 +1,13 @@
 addMessageListener("getCookieFromManager", ({ host, path }) => {
   let cm = Cc["@mozilla.org/cookiemanager;1"].getService(Ci.nsICookieManager);
   let values = [];
   path = path.substring(0, path.lastIndexOf("/"));
-  for (let cookie of cm.enumerator) {
+  for (let cookie of cm.cookies) {
     if (!cookie) {
       break;
     }
     if (host != cookie.host || path != cookie.path) {
       continue;
     }
     values.push(cookie.name + "=" + cookie.value);
   }
--- a/dom/locales/en-US/chrome/accessibility/mac/accessible.properties
+++ b/dom/locales/en-US/chrome/accessibility/mac/accessible.properties
@@ -51,8 +51,10 @@ marquee     =      marquee
 math        =      math
 note        =      note
 region      =      region
 status      =      application status
 timer       =      timer
 tooltip     =      tooltip
 separator    =      separator
 tabPanel     =      tab panel
+# The roleDescription for the html:mark element
+highlight = highlight
--- a/dom/media/webaudio/AudioWorkletGlobalScope.cpp
+++ b/dom/media/webaudio/AudioWorkletGlobalScope.cpp
@@ -282,75 +282,69 @@ AudioParamDescriptorMap AudioWorkletGlob
       return AudioParamDescriptorMap();
     }
   }
 
   return res;
 }
 
 bool AudioWorkletGlobalScope::ConstructProcessor(
-    const nsAString& aName,
-    NotNull<StructuredCloneHolder*> aOptionsSerialization,
+    const nsAString& aName, NotNull<StructuredCloneHolder*> aSerializedOptions,
     JS::MutableHandle<JSObject*> aRetProcessor) {
   /**
-   * See the second algorithm at
-   * https://webaudio.github.io/web-audio-api/#instantiation-of-AudioWorkletNode-and-AudioWorkletProcessor
+   * See
+   * https://webaudio.github.io/web-audio-api/#AudioWorkletProcessor-instantiation
    */
   AutoJSAPI jsapi;
   if (NS_WARN_IF(!jsapi.Init(this))) {
     return false;
   }
   JSContext* cx = jsapi.cx();
   ErrorResult rv;
   /** TODO https://bugzilla.mozilla.org/show_bug.cgi?id=1565956
-   * 1. Let processorPort be
-   *    StructuredDeserializeWithTransfer(processorPortSerialization,
-   *                                      the current Realm).
+   * 4. Let deserializedPort be the result of
+   *    StructuredDeserialize(serializedPort, the current Realm).
    */
   /**
-   * 2. Let options be StructuredDeserialize(optionsSerialization,
-   *                                         the current Realm).
+   * 5. Let deserializedOptions be the result of
+   *    StructuredDeserialize(serializedOptions, the current Realm).
    */
-  JS::Rooted<JS::Value> optionsVal(cx);
-  aOptionsSerialization->Read(this, cx, &optionsVal, rv);
+  JS::Rooted<JS::Value> deserializedOptions(cx);
+  aSerializedOptions->Read(this, cx, &deserializedOptions, rv);
   if (rv.MaybeSetPendingException(cx)) {
     return false;
   }
   /**
-   * 3. Let processorConstructor be the result of looking up nodeName on the
+   * 6. Let processorCtor be the result of looking up processorName on the
    *    AudioWorkletGlobalScope's node name to processor definition map.
    */
-  RefPtr<AudioWorkletProcessorConstructor> processorConstructor =
+  RefPtr<AudioWorkletProcessorConstructor> processorCtor =
       mNameToProcessorMap.Get(aName);
   // AudioWorkletNode has already checked the definition exists.
   // See also https://github.com/WebAudio/web-audio-api/issues/1854
-  MOZ_ASSERT(processorConstructor);
+  MOZ_ASSERT(processorCtor);
+  /** TODO https://bugzilla.mozilla.org/show_bug.cgi?id=1565956
+   * 7. Store nodeReference and deserializedPort to node reference and
+   *    transferred port of this AudioWorkletGlobalScope's pending processor
+   *    construction data respectively.
+   */
   /**
-   * 4. Let processor be the result of Construct(processorConstructor,
-   *                                             « options »).
+   * 8. Construct a callback function from processorCtor with the argument
+   *    of deserializedOptions.
    */
   // The options were an object before serialization and so will be an object
   // if deserialization succeeded above.  toObject() asserts.
-  JS::Rooted<JSObject*> options(cx, &optionsVal.toObject());
-  // Using https://heycam.github.io/webidl/#construct-a-callback-function
-  // See
-  // https://github.com/WebAudio/web-audio-api/pull/1843#issuecomment-478590304
-  RefPtr<AudioWorkletProcessor> processor = processorConstructor->Construct(
+  JS::Rooted<JSObject*> options(cx, &deserializedOptions.toObject());
+  RefPtr<AudioWorkletProcessor> processor = processorCtor->Construct(
       options, rv, "AudioWorkletProcessor construction",
       CallbackFunction::eReportExceptions);
   if (rv.Failed()) {
     rv.SuppressException();  // already reported
     return false;
   }
-  /** TODO https://bugzilla.mozilla.org/show_bug.cgi?id=1565956
-   * but see https://github.com/WebAudio/web-audio-api/issues/1973
-   *
-   * 5. Set processor’s port to processorPort.
-   */
-
   JS::Rooted<JS::Value> processorVal(cx);
   if (NS_WARN_IF(!ToJSValue(cx, processor, &processorVal))) {
     return false;
   }
   MOZ_ASSERT(processorVal.isObject());
   aRetProcessor.set(&processorVal.toObject());
   return true;
 }
--- a/dom/media/webaudio/AudioWorkletGlobalScope.h
+++ b/dom/media/webaudio/AudioWorkletGlobalScope.h
@@ -43,17 +43,17 @@ class AudioWorkletGlobalScope final : pu
   double CurrentTime() const;
 
   float SampleRate() const;
 
   // If successful, returns true and sets aRetProcessor, which will be in the
   // compartment for the realm of this global.  Returns false on failure.
   MOZ_CAN_RUN_SCRIPT
   bool ConstructProcessor(const nsAString& aName,
-                          NotNull<StructuredCloneHolder*> aOptionsSerialization,
+                          NotNull<StructuredCloneHolder*> aSerializedOptions,
                           JS::MutableHandle<JSObject*> aRetProcessor);
 
  private:
   ~AudioWorkletGlobalScope() = default;
 
   // Returns an AudioParamDescriptorMap filled with AudioParamDescriptor
   // objects, extracted from JS. Returns an empty map in case of error and set
   // aRv accordingly.
--- a/dom/media/webaudio/AudioWorkletNode.cpp
+++ b/dom/media/webaudio/AudioWorkletNode.cpp
@@ -21,19 +21,19 @@ class WorkletNodeEngine final : public A
                     const Optional<Sequence<uint32_t>>& aOutputChannelCount)
       : AudioNodeEngine(aNode) {
     if (aOutputChannelCount.WasPassed()) {
       mOutputChannelCount = aOutputChannelCount.Value();
     }
   }
 
   MOZ_CAN_RUN_SCRIPT
-  void ConstructProcessor(
-      AudioWorkletImpl* aWorkletImpl, const nsAString& aName,
-      NotNull<StructuredCloneHolder*> aOptionsSerialization);
+  void ConstructProcessor(AudioWorkletImpl* aWorkletImpl,
+                          const nsAString& aName,
+                          NotNull<StructuredCloneHolder*> aSerializedOptions);
 
   void ProcessBlock(AudioNodeTrack* aTrack, GraphTime aFrom,
                     const AudioBlock& aInput, AudioBlock* aOutput,
                     bool* aFinished) override {
     MOZ_ASSERT(InputCount() <= 1);
     MOZ_ASSERT(OutputCount() <= 1);
     ProcessBlocksOnPorts(aTrack, MakeSpan(&aInput, InputCount()),
                          MakeSpan(aOutput, OutputCount()), aFinished);
@@ -113,23 +113,23 @@ void WorkletNodeEngine::SendProcessorErr
    * Note that once an exception is thrown, the processor will output silence
    * throughout its lifetime.
    */
   ReleaseJSResources();
 }
 
 void WorkletNodeEngine::ConstructProcessor(
     AudioWorkletImpl* aWorkletImpl, const nsAString& aName,
-    NotNull<StructuredCloneHolder*> aOptionsSerialization) {
+    NotNull<StructuredCloneHolder*> aSerializedOptions) {
   MOZ_ASSERT(mInputs.mPorts.empty() && mOutputs.mPorts.empty());
   RefPtr<AudioWorkletGlobalScope> global = aWorkletImpl->GetGlobalScope();
   MOZ_ASSERT(global);  // global has already been used to register processor
   JS::RootingContext* cx = RootingCx();
   mProcessor.init(cx);
-  if (!global->ConstructProcessor(aName, aOptionsSerialization, &mProcessor) ||
+  if (!global->ConstructProcessor(aName, aSerializedOptions, &mProcessor) ||
       // mInputs and mOutputs outer arrays are fixed length and so much of the
       // initialization need only be performed once (i.e. here).
       NS_WARN_IF(!mInputs.mPorts.growBy(InputCount())) ||
       NS_WARN_IF(!mOutputs.mPorts.growBy(OutputCount()))) {
     SendProcessorError();
     return;
   }
   mGlobal = std::move(global);
@@ -365,108 +365,125 @@ AudioWorkletNode::AudioWorkletNode(Audio
       mInputCount(aOptions.mNumberOfInputs),
       mOutputCount(aOptions.mNumberOfOutputs) {}
 
 /* static */
 already_AddRefed<AudioWorkletNode> AudioWorkletNode::Constructor(
     const GlobalObject& aGlobal, AudioContext& aAudioContext,
     const nsAString& aName, const AudioWorkletNodeOptions& aOptions,
     ErrorResult& aRv) {
-  if (aOptions.mNumberOfInputs == 0 && aOptions.mNumberOfOutputs == 0) {
-    aRv.Throw(NS_ERROR_DOM_NOT_SUPPORTED_ERR);
-    return nullptr;
-  }
-
-  if (aOptions.mOutputChannelCount.WasPassed()) {
-    if (aOptions.mOutputChannelCount.Value().Length() !=
-        aOptions.mNumberOfOutputs) {
-      aRv.Throw(NS_ERROR_DOM_INDEX_SIZE_ERR);
-      return nullptr;
-    }
-
-    for (uint32_t channelCount : aOptions.mOutputChannelCount.Value()) {
-      if (channelCount == 0 || channelCount > WebAudioUtils::MaxChannelCount) {
-        aRv.Throw(NS_ERROR_DOM_NOT_SUPPORTED_ERR);
-        return nullptr;
-      }
-    }
-  }
   /**
-   * 2. If nodeName does not exists as a key in the BaseAudioContext’s node
+   * 1. If nodeName does not exist as a key in the BaseAudioContext’s node
    *    name to parameter descriptor map, throw a NotSupportedError exception
    *    and abort these steps.
    */
   const AudioParamDescriptorMap* parameterDescriptors =
       aAudioContext.GetParamMapForWorkletName(aName);
   if (!parameterDescriptors) {
     aRv.Throw(NS_ERROR_DOM_NOT_SUPPORTED_ERR);
     return nullptr;
   }
 
+  // See https://github.com/WebAudio/web-audio-api/issues/2074 for ordering.
+  RefPtr<AudioWorkletNode> audioWorkletNode =
+      new AudioWorkletNode(&aAudioContext, aName, aOptions);
+  audioWorkletNode->Initialize(aOptions, aRv);
+  if (NS_WARN_IF(aRv.Failed())) {
+    return nullptr;
+  }
+
+  /**
+   * 3. Configure input, output and output channels of node with options.
+   */
+  if (aOptions.mNumberOfInputs == 0 && aOptions.mNumberOfOutputs == 0) {
+    aRv.Throw(NS_ERROR_DOM_NOT_SUPPORTED_ERR);
+    return nullptr;
+  }
+
+  if (aOptions.mOutputChannelCount.WasPassed()) {
+    /**
+     * 1. If any value in outputChannelCount is zero or greater than the
+     *    implementation’s maximum number of channels, throw a
+     *    NotSupportedError and abort the remaining steps.
+     */
+    for (uint32_t channelCount : aOptions.mOutputChannelCount.Value()) {
+      if (channelCount == 0 || channelCount > WebAudioUtils::MaxChannelCount) {
+        aRv.Throw(NS_ERROR_DOM_NOT_SUPPORTED_ERR);
+        return nullptr;
+      }
+    }
+    /**
+     * 2. If the length of outputChannelCount does not equal numberOfOutputs,
+     *    throw an IndexSizeError and abort the remaining steps.
+     */
+    if (aOptions.mOutputChannelCount.Value().Length() !=
+        aOptions.mNumberOfOutputs) {
+      aRv.Throw(NS_ERROR_DOM_INDEX_SIZE_ERR);
+      return nullptr;
+    }
+  }
   // MTG does not support more than UINT16_MAX inputs or outputs.
   if (aOptions.mNumberOfInputs > UINT16_MAX) {
     aRv.ThrowRangeError<MSG_VALUE_OUT_OF_RANGE>(
         NS_LITERAL_STRING("numberOfInputs"));
     return nullptr;
   }
   if (aOptions.mNumberOfOutputs > UINT16_MAX) {
     aRv.ThrowRangeError<MSG_VALUE_OUT_OF_RANGE>(
         NS_LITERAL_STRING("numberOfOutputs"));
     return nullptr;
   }
 
-  RefPtr<AudioWorkletNode> audioWorkletNode =
-      new AudioWorkletNode(&aAudioContext, aName, aOptions);
-
-  audioWorkletNode->Initialize(aOptions, aRv);
-  if (NS_WARN_IF(aRv.Failed())) {
-    return nullptr;
-  }
-
   /**
-   * 7. Let optionsSerialization be the result of StructuredSerialize(options).
+   * 8. Convert options dictionary to optionsObject.
    */
   JSContext* cx = aGlobal.Context();
   JS::Rooted<JS::Value> optionsVal(cx);
   if (NS_WARN_IF(!ToJSValue(cx, aOptions, &optionsVal))) {
     aRv.NoteJSContextException(cx);
     return nullptr;
   }
+  /**
+   * 9. Let serializedOptions be the result of
+   *    StructuredSerialize(optionsObject).
+   */
   // StructuredCloneHolder does not have a move constructor.  Instead allocate
   // memory so that the pointer can be passed to the rendering thread.
-  UniquePtr<StructuredCloneHolder> optionsSerialization =
+  UniquePtr<StructuredCloneHolder> serializedOptions =
       MakeUnique<StructuredCloneHolder>(
           StructuredCloneHolder::CloningSupported,
           StructuredCloneHolder::TransferringNotSupported,
           JS::StructuredCloneScope::SameProcessDifferentThread);
-  optionsSerialization->Write(cx, optionsVal, aRv);
+  serializedOptions->Write(cx, optionsVal, aRv);
   if (NS_WARN_IF(aRv.Failed())) {
     return nullptr;
   }
 
   auto engine =
       new WorkletNodeEngine(audioWorkletNode, aOptions.mOutputChannelCount);
   audioWorkletNode->mTrack = AudioNodeTrack::Create(
       &aAudioContext, engine, AudioNodeTrack::NO_TRACK_FLAGS,
       aAudioContext.Graph());
 
   /**
-   * 10. Queue a control message to create an AudioWorkletProcessor, given
-   *     nodeName, processorPortSerialization, optionsSerialization, and node.
+   * 12. Queue a control message to invoke the constructor of the
+   *     corresponding AudioWorkletProcessor with the processor construction
+   *     data that consists of: nodeName, node, serializedOptions, and
+   *     serializedProcessorPort.
    */
   Worklet* worklet = aAudioContext.GetAudioWorklet(aRv);
   MOZ_ASSERT(worklet, "Worklet already existed and so getter shouldn't fail.");
   auto workletImpl = static_cast<AudioWorkletImpl*>(worklet->Impl());
   audioWorkletNode->mTrack->SendRunnable(NS_NewRunnableFunction(
       "WorkletNodeEngine::ConstructProcessor",
       // MOZ_CAN_RUN_SCRIPT_BOUNDARY until Runnable::Run is MOZ_CAN_RUN_SCRIPT.
       // See bug 1535398.
       [track = audioWorkletNode->mTrack,
        workletImpl = RefPtr<AudioWorkletImpl>(workletImpl),
-       name = nsString(aName), options = std::move(optionsSerialization)]()
+       name = nsString(aName), options = std::move(serializedOptions)]()
           MOZ_CAN_RUN_SCRIPT_BOUNDARY {
             auto engine = static_cast<WorkletNodeEngine*>(track->Engine());
             engine->ConstructProcessor(workletImpl, name,
                                        WrapNotNull(options.get()));
           }));
 
   return audioWorkletNode.forget();
 }
--- a/dom/messagechannel/MessagePort.cpp
+++ b/dom/messagechannel/MessagePort.cpp
@@ -260,22 +260,19 @@ void MessagePort::Initialize(const nsID&
     }
   } else {
     MOZ_ASSERT(mState == eStateUnshippedEntangled);
   }
 
   // The port has to keep itself alive until it's entangled.
   UpdateMustKeepAlive();
 
-  if (!NS_IsMainThread()) {
+  if (WorkerPrivate* workerPrivate = GetCurrentThreadWorkerPrivate()) {
     RefPtr<MessagePort> self = this;
 
-    WorkerPrivate* workerPrivate = GetCurrentThreadWorkerPrivate();
-    MOZ_ASSERT(workerPrivate);
-
     // When the callback is executed, we cannot process messages anymore because
     // we cannot dispatch new runnables. Let's force a Close().
     RefPtr<StrongWorkerRef> strongWorkerRef = StrongWorkerRef::Create(
         workerPrivate, "MessagePort", [self]() { self->CloseForced(); });
     if (NS_WARN_IF(!strongWorkerRef)) {
       // The worker is shutting down.
       mState = eStateDisentangled;
       UpdateMustKeepAlive();
--- a/dom/security/test/general/test_same_site_cookies_laxByDefault.html
+++ b/dom/security/test/general/test_same_site_cookies_laxByDefault.html
@@ -25,17 +25,17 @@ async function realTest(noneRequiresSecu
 
   info("Check cookies");
   let chromeScript = SpecialPowers.loadChromeScript(() => {
     const {sendAsyncMessage} = this;
     const {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm");
 
     let cookies = { test: null, test2: null, test3: null };
 
-    for (let cookie of Services.cookies.enumerator) {
+    for (let cookie of Services.cookies.cookies) {
       if (cookie.host != "example.com") continue;
 
       if (cookie.name == "test" && cookie.value == "wow") {
         cookies.test = cookie.sameSite == Ci.nsICookie.SAMESITE_LAX ? 'lax' : 'none';
       }
 
       if (cookie.name == "test2" && cookie.value == "wow2") {
         cookies.test2 = cookie.sameSite == Ci.nsICookie.SAMESITE_LAX ? 'lax' : 'none';
--- a/dom/workers/RuntimeService.cpp
+++ b/dom/workers/RuntimeService.cpp
@@ -2464,40 +2464,43 @@ WorkerPrivate* GetWorkerPrivateFromConte
   // context private is cleared early in ~CycleCollectedJSContext() and so
   // GetFor() returns null above if called after ccjscx is no longer a
   // WorkerJSContext.
   MOZ_ASSERT(workerjscx);
   return workerjscx->GetWorkerPrivate();
 }
 
 WorkerPrivate* GetCurrentThreadWorkerPrivate() {
-  MOZ_ASSERT(!NS_IsMainThread());
+  if (NS_IsMainThread()) {
+    return nullptr;
+  }
 
   CycleCollectedJSContext* ccjscx = CycleCollectedJSContext::Get();
   if (!ccjscx) {
     return nullptr;
   }
 
   WorkerJSContext* workerjscx = ccjscx->GetAsWorkerJSContext();
-  // Although GetCurrentThreadWorkerPrivate() is called only for worker
+  // Even when GetCurrentThreadWorkerPrivate() is called on worker
   // threads, the ccjscx will no longer be a WorkerJSContext if called from
   // stable state events during ~CycleCollectedJSContext().
   if (!workerjscx) {
     return nullptr;
   }
 
   return workerjscx->GetWorkerPrivate();
 }
 
 bool IsCurrentThreadRunningWorker() {
   return !NS_IsMainThread() && !!GetCurrentThreadWorkerPrivate();
 }
 
 bool IsCurrentThreadRunningChromeWorker() {
-  return GetCurrentThreadWorkerPrivate()->UsesSystemPrincipal();
+  WorkerPrivate* wp = GetCurrentThreadWorkerPrivate();
+  return wp && wp->UsesSystemPrincipal();
 }
 
 JSContext* GetCurrentWorkerThreadJSContext() {
   WorkerPrivate* wp = GetCurrentThreadWorkerPrivate();
   if (!wp) {
     return nullptr;
   }
   return wp->GetJSContext();
--- a/dom/worklet/WorkletThread.cpp
+++ b/dom/worklet/WorkletThread.cpp
@@ -4,16 +4,17 @@
  * 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 "WorkletThread.h"
 #include "prthread.h"
 #include "nsContentUtils.h"
 #include "nsCycleCollector.h"
 #include "mozilla/dom/AtomList.h"
+#include "mozilla/ipc/BackgroundChild.h"
 #include "mozilla/Attributes.h"
 #include "mozilla/EventQueue.h"
 #include "mozilla/ThreadEventQueue.h"
 
 namespace mozilla {
 namespace dom {
 
 namespace {
@@ -384,16 +385,19 @@ void WorkletThread::TerminateInternal() 
 
 /* static */
 void WorkletThread::DeleteCycleCollectedJSContext() {
   CycleCollectedJSContext* ccjscx = CycleCollectedJSContext::Get();
   if (!ccjscx) {
     return;
   }
 
+  // Release any MessagePort kept alive by its ipc actor.
+  mozilla::ipc::BackgroundChild::CloseForCurrentThread();
+
   WorkletJSContext* workletjscx = ccjscx->GetAsWorkletJSContext();
   MOZ_ASSERT(workletjscx);
   delete workletjscx;
 }
 
 /* static */
 bool WorkletThread::IsOnWorkletThread() {
   CycleCollectedJSContext* ccjscx = CycleCollectedJSContext::Get();
--- a/extensions/permissions/nsPermissionManager.cpp
+++ b/extensions/permissions/nsPermissionManager.cpp
@@ -1308,18 +1308,16 @@ nsresult nsPermissionManager::InitDB(boo
       // backwards compatability), and a moz_perms table. The moz_hosts table
       // will have a v4 schema, and the moz_perms table will have a v6 schema.
       case 4:
       case 6: {
         bool hostsTableExists = false;
         mDBConn->TableExists(NS_LITERAL_CSTRING("moz_hosts"),
                              &hostsTableExists);
         if (hostsTableExists) {
-          bool migrationError = false;
-
           // Both versions 4 and 6 have a version 4 formatted hosts table named
           // moz_hosts. We can migrate this table to our version 7 table
           // moz_perms. If moz_perms is present, then we can use it as a basis
           // for comparison.
 
           rv = mDBConn->BeginTransaction();
           NS_ENSURE_SUCCESS(rv, rv);
 
@@ -1362,22 +1360,20 @@ nsresult nsPermissionManager::InitDB(boo
           int64_t modificationTime;
           bool isInBrowserElement;
           bool hasResult;
 
           while (NS_SUCCEEDED(stmt->ExecuteStep(&hasResult)) && hasResult) {
             // Read in the old row
             rv = stmt->GetUTF8String(0, host);
             if (NS_WARN_IF(NS_FAILED(rv))) {
-              migrationError = true;
               continue;
             }
             rv = stmt->GetUTF8String(1, type);
             if (NS_WARN_IF(NS_FAILED(rv))) {
-              migrationError = true;
               continue;
             }
             permission = stmt->AsInt32(2);
             expireType = stmt->AsInt32(3);
             expireTime = stmt->AsInt64(4);
             modificationTime = stmt->AsInt64(5);
             isInBrowserElement = static_cast<bool>(stmt->AsInt32(6));
 
@@ -1386,17 +1382,16 @@ nsresult nsPermissionManager::InitDB(boo
             UpgradeHostToOriginDBMigration upHelper(mDBConn, &id);
             rv = UpgradeHostToOriginAndInsert(
                 host, type, permission, expireType, expireTime,
                 modificationTime, isInBrowserElement, &upHelper);
             if (NS_FAILED(rv)) {
               NS_WARNING(
                   "Unexpected failure when upgrading migrating permission "
                   "from host to origin");
-              migrationError = true;
             }
           }
 
           // We don't drop the moz_hosts table such that it is available for
           // backwards-compatability and for future migrations in case of
           // migration errors in the current code.
           // Create a marker empty table which will indicate that the moz_hosts
           // table is intended to act as a backup. If this table is not present,
@@ -1413,58 +1408,34 @@ nsresult nsPermissionManager::InitDB(boo
             // re-migration. We count the rows in the old table for telemetry,
             // and then back up their old database as moz_perms_v6
 
             nsCOMPtr<mozIStorageStatement> countStmt;
             rv = mDBConn->CreateStatement(
                 NS_LITERAL_CSTRING("SELECT COUNT(*) FROM moz_perms"),
                 getter_AddRefs(countStmt));
             bool hasResult = false;
-            if (NS_SUCCEEDED(rv) &&
-                NS_SUCCEEDED(countStmt->ExecuteStep(&hasResult)) && hasResult) {
-              int32_t permsCount = countStmt->AsInt32(0);
-
-              // The id variable contains the number of rows inserted into the
-              // moz_hosts_new table (as one ID was used per entry)
-              uint32_t telemetryValue;
-              if (permsCount > id) {
-                telemetryValue = 3;  // NEW > OLD
-              } else if (permsCount == id) {
-                telemetryValue = 2;  // NEW == OLD
-              } else if (permsCount == 0) {
-                telemetryValue = 0;  // NEW = 0
-              } else {
-                telemetryValue = 1;  // NEW < OLD
-              }
-
-              // Report the telemetry value to telemetry
-              mozilla::Telemetry::Accumulate(
-                  mozilla::Telemetry::PERMISSIONS_REMIGRATION_COMPARISON,
-                  telemetryValue);
-            } else {
+            if (NS_FAILED(rv) ||
+                NS_FAILED(countStmt->ExecuteStep(&hasResult)) || !hasResult) {
               NS_WARNING("Could not count the rows in moz_perms");
             }
 
             // Back up the old moz_perms database as moz_perms_v6 before we
             // move the new table into its position
             rv = mDBConn->ExecuteSimpleSQL(NS_LITERAL_CSTRING(
                 "ALTER TABLE moz_perms RENAME TO moz_perms_v6"));
             NS_ENSURE_SUCCESS(rv, rv);
           }
 
           rv = mDBConn->ExecuteSimpleSQL(NS_LITERAL_CSTRING(
               "ALTER TABLE moz_hosts_new RENAME TO moz_perms"));
           NS_ENSURE_SUCCESS(rv, rv);
 
           rv = mDBConn->CommitTransaction();
           NS_ENSURE_SUCCESS(rv, rv);
-
-          mozilla::Telemetry::Accumulate(
-              mozilla::Telemetry::PERMISSIONS_MIGRATION_7_ERROR,
-              NS_WARN_IF(migrationError));
         } else {
           // We don't have a moz_hosts table, so we create one for downgrading
           // purposes. This table is empty.
           rv = mDBConn->ExecuteSimpleSQL(
               NS_LITERAL_CSTRING("CREATE TABLE moz_hosts ("
                                  " id INTEGER PRIMARY KEY"
                                  ",host TEXT"
                                  ",type TEXT"
new file mode 100644
--- /dev/null
+++ b/layout/style/crashtests/1586444.html
@@ -0,0 +1,15 @@
+<style>
+#a {
+  overflow: auto auto;
+  display: -webkit-box;
+}
+</style>
+<script>
+window.onload = () => {
+  a.align = "ABSMIDDLE"
+  document.documentElement.style.display="none"
+  document.documentElement.getBoundingClientRect()
+  document.documentElement.style.display=""
+}
+</script>
+<object id="a">
--- a/layout/style/crashtests/crashtests.list
+++ b/layout/style/crashtests/crashtests.list
@@ -307,8 +307,9 @@ pref(layout.css.resizeobserver.enabled,t
 load 1562361.html
 load 1566684.html
 load 1579788.html
 load 1580307.html
 load 1581579.html
 skip-if(release_or_beta) pref(dom.paintWorklet.enabled,true) pref(dom.worklet.enabled,true) load 1593766.html # bug 1581896
 pref(layout.css.motion-path.enabled,true) load 1594949.html
 pref(layout.css.motion-path.enabled,true) pref(layout.css.individual-transform.enabled,true) load 1594960.html
+load 1586444.html
--- a/mobile/android/components/extensions/ext-browsingData.js
+++ b/mobile/android/components/extensions/ext-browsingData.js
@@ -27,17 +27,17 @@ const clearCookies = async function(opti
   let cookieMgr = Services.cookies;
   let yieldCounter = 0;
   const YIELD_PERIOD = 10;
 
   if (options.since) {
     // Convert it to microseconds
     let since = options.since * 1000;
     // Iterate through the cookies and delete any created after our cutoff.
-    for (let cookie of cookieMgr.enumerator) {
+    for (let cookie of cookieMgr.cookies) {
       if (cookie.creationTime >= since) {
         // This cookie was created after our cutoff, clear it.
         cookieMgr.remove(
           cookie.host,
           cookie.name,
           cookie.path,
           cookie.originAttributes
         );
--- a/netwerk/cookie/nsCookieService.cpp
+++ b/netwerk/cookie/nsCookieService.cpp
@@ -41,25 +41,22 @@
 #include "nsIEffectiveTLDService.h"
 #include "nsIIDNService.h"
 #include "nsIThread.h"
 #include "mozIThirdPartyUtil.h"
 
 #include "nsTArray.h"
 #include "nsCOMArray.h"
 #include "nsIMutableArray.h"
-#include "nsArrayEnumerator.h"
-#include "nsEnumeratorUtils.h"
 #include "nsAutoPtr.h"
 #include "nsReadableUtils.h"
 #include "nsCRT.h"
 #include "prprf.h"
 #include "nsNetUtil.h"
 #include "nsNetCID.h"
-#include "nsISimpleEnumerator.h"
 #include "nsIInputStream.h"
 #include "nsAppDirectoryServiceDefs.h"
 #include "nsNetCID.h"
 #include "mozilla/storage.h"
 #include "mozilla/AutoRestore.h"
 #include "mozilla/FileUtils.h"
 #include "mozilla/ScopeExit.h"
 #include "mozilla/StaticPrefs_network.h"
@@ -2422,57 +2419,57 @@ nsCookieService::RemoveAll() {
     }
   }
 
   NotifyChanged(nullptr, u"cleared");
   return NS_OK;
 }
 
 NS_IMETHODIMP
-nsCookieService::GetEnumerator(nsISimpleEnumerator** aEnumerator) {
+nsCookieService::GetCookies(nsTArray<RefPtr<nsICookie>>& aCookies) {
   if (!mDBState) {
     NS_WARNING("No DBState! Profile already closed?");
     return NS_ERROR_NOT_AVAILABLE;
   }
 
   EnsureReadComplete(true);
 
-  nsCOMArray<nsICookie> cookieList(mDBState->cookieCount);
+  aCookies.SetCapacity(mDBState->cookieCount);
   for (auto iter = mDBState->hostTable.Iter(); !iter.Done(); iter.Next()) {
     const nsCookieEntry::ArrayType& cookies = iter.Get()->GetCookies();
     for (nsCookieEntry::IndexType i = 0; i < cookies.Length(); ++i) {
-      cookieList.AppendObject(cookies[i]);
+      aCookies.AppendElement(cookies[i]);
     }
   }
 
-  return NS_NewArrayEnumerator(aEnumerator, cookieList, NS_GET_IID(nsICookie));
+  return NS_OK;
 }
 
 NS_IMETHODIMP
-nsCookieService::GetSessionEnumerator(nsISimpleEnumerator** aEnumerator) {
+nsCookieService::GetSessionCookies(nsTArray<RefPtr<nsICookie>>& aCookies) {
   if (!mDBState) {
     NS_WARNING("No DBState! Profile already closed?");
     return NS_ERROR_NOT_AVAILABLE;
   }
 
   EnsureReadComplete(true);
 
-  nsCOMArray<nsICookie> cookieList(mDBState->cookieCount);
+  aCookies.SetCapacity(mDBState->cookieCount);
   for (auto iter = mDBState->hostTable.Iter(); !iter.Done(); iter.Next()) {
     const nsCookieEntry::ArrayType& cookies = iter.Get()->GetCookies();
     for (nsCookieEntry::IndexType i = 0; i < cookies.Length(); ++i) {
       nsCookie* cookie = cookies[i];
       // Filter out non-session cookies.
       if (cookie->IsSession()) {
-        cookieList.AppendObject(cookie);
+        aCookies.AppendElement(cookie);
       }
     }
   }
 
-  return NS_NewArrayEnumerator(aEnumerator, cookieList, NS_GET_IID(nsICookie));
+  return NS_OK;
 }
 
 NS_IMETHODIMP
 nsCookieService::Add(const nsACString& aHost, const nsACString& aPath,
                      const nsACString& aName, const nsACString& aValue,
                      bool aIsSecure, bool aIsHttpOnly, bool aIsSession,
                      int64_t aExpiry, JS::HandleValue aOriginAttributes,
                      int32_t aSameSite, JSContext* aCx) {
--- a/netwerk/cookie/nsICookieManager.idl
+++ b/netwerk/cookie/nsICookieManager.idl
@@ -8,17 +8,16 @@
 %{ C++
 namespace mozilla {
 class OriginAttributes;
 } // mozilla namespace
 %}
 
 [ptr] native OriginAttributesPtr(mozilla::OriginAttributes);
 
-interface nsISimpleEnumerator;
 interface nsICookie;
 interface nsIFile;
 
 /**
  * An optional interface for accessing or removing the cookies
  * that are in the cookie list
  */
 
@@ -27,30 +26,30 @@ interface nsICookieManager : nsISupports
 {
 
   /**
    * Called to remove all cookies from the cookie list
    */
   void removeAll();
 
   /**
-   * Called to enumerate through each cookie in the cookie list.
-   * The objects enumerated over are of type nsICookie
-   * This enumerator should only be used for non-private browsing cookies.
-   * To retrieve an enumerator for private browsing cookies, use
+   * Returns an array of cookies in the cookie list.
+   * The objects in the array are of type nsICookie
+   * This array only contains non-private browsing cookies.
+   * To retrieve an array of private browsing cookies, use
    * getCookiesWithOriginAttributes.
    */
-  readonly attribute nsISimpleEnumerator enumerator;
+  readonly attribute Array<nsICookie> cookies;
 
   /**
-   * Called to enumerate through each session cookie in the cookie list.
-   * The objects enumerated over are of type nsICookie
-   * This enumerator should only be used for non-private browsing cookies.
+   * Returns an array of session cookies in the cookie list.
+   * The objects in the array are of type nsICookie
+   * This array only contains non-private browsing cookies.
    */
-  readonly attribute nsISimpleEnumerator sessionEnumerator;
+  readonly attribute Array<nsICookie> sessionCookies;
 
   /**
    * Called to remove an individual cookie from the cookie list, specified
    * by host, name, and path. If the cookie cannot be found, no exception
    * is thrown. Typically, the arguments to this method will be obtained
    * directly from the desired nsICookie object.
    *
    * @param aHost The host or domain for which the cookie was set. @see
@@ -173,29 +172,29 @@ interface nsICookieManager : nsISupports
    *        of only the host portion of a URI. see @add for a description of
    *        acceptable host strings.
    *
    * @return the number of cookies found.
    */
   unsigned long countCookiesFromHost(in AUTF8String aHost);
 
   /**
-   * Returns an enumerator of cookies that exist within the base domain of
+   * Returns an array of cookies that exist within the base domain of
    * 'aHost'. Thus, for a host "weather.yahoo.com", the base domain would be
    * "yahoo.com", and any host or domain cookies for "yahoo.com" and its
    * subdomains would be returned.
    *
    * @param aHost
    *        the host string to search for, e.g. "google.com". this should consist
    *        of only the host portion of a URI. see @add for a description of
    *        acceptable host strings.
    * @param aOriginAttributes The originAttributes of cookies that would be
    *                          retrived.
    *
-   * @return an nsISimpleEnumerator of nsICookie objects.
+   * @return an array of nsICookie objects.
    *
    * @see countCookiesFromHost
    */
   [implicit_jscontext]
   Array<nsICookie> getCookiesFromHost(in AUTF8String aHost,
                                       in jsval aOriginAttributes);
 
   /**
--- a/netwerk/cookie/test/unit/test_bug1321912.js
+++ b/netwerk/cookie/test/unit/test_bug1321912.js
@@ -53,18 +53,18 @@ conn.executeSimpleSQL(
     ", " +
     now +
     ", " +
     now +
     ", 1, 1)"
 );
 
 // Now start the cookie service, and then check the fields in the table.
-// Get sessionEnumerator to wait for the initialization in cookie thread
-const enumerator = Services.cookies.sessionEnumerator;
+// Get sessionCookies to wait for the initialization in cookie thread
+const cookies = Services.cookies.sessionCookies;
 
 Assert.equal(conn.schemaVersion, 10);
 let stmt = conn.createStatement(
   "SELECT sql FROM sqlite_master " +
     "WHERE type = 'table' AND " +
     "      name = 'moz_cookies'"
 );
 try {
--- a/netwerk/test/TestCookie.cpp
+++ b/netwerk/test/TestCookie.cpp
@@ -10,17 +10,16 @@
 #include "nsICookieManager.h"
 #include "nsICookie.h"
 #include <stdio.h>
 #include "plstr.h"
 #include "nsNetUtil.h"
 #include "nsIChannel.h"
 #include "nsIPrincipal.h"
 #include "nsIScriptSecurityManager.h"
-#include "nsISimpleEnumerator.h"
 #include "nsServiceManagerUtils.h"
 #include "nsNetCID.h"
 #include "nsIPrefBranch.h"
 #include "nsIPrefService.h"
 #include "mozilla/Unused.h"
 #include "mozilla/net/CookieSettings.h"
 #include "nsIURI.h"
 
@@ -878,38 +877,28 @@ TEST(TestCookie, TestCookieMain)
                             NS_LITERAL_CSTRING("yes"),         // value
                             false,                             // is secure
                             false,                             // is httponly
                             true,                              // is session
                             INT64_MAX,                         // expiry time
                             &attrs,  // originAttributes
                             nsICookie::SAMESITE_NONE)));
   // confirm using enumerator
-  nsCOMPtr<nsISimpleEnumerator> enumerator;
-  EXPECT_TRUE(
-      NS_SUCCEEDED(cookieMgr->GetEnumerator(getter_AddRefs(enumerator))));
-  int32_t i = 0;
-  bool more;
+  nsTArray<RefPtr<nsICookie>> cookies;
+  EXPECT_TRUE(NS_SUCCEEDED(cookieMgr->GetCookies(cookies)));
   nsCOMPtr<nsICookie> expiredCookie, newDomainCookie;
-  while (NS_SUCCEEDED(enumerator->HasMoreElements(&more)) && more) {
-    nsCOMPtr<nsISupports> cookie;
-    if (NS_FAILED(enumerator->GetNext(getter_AddRefs(cookie)))) break;
-    ++i;
-
-    // keep tabs on the second and third cookies, so we can check them later
-    nsCOMPtr<nsICookie> cookie2(do_QueryInterface(cookie));
-    if (!cookie2) break;
+  for (const auto& cookie : cookies) {
     nsAutoCString name;
-    cookie2->GetName(name);
+    cookie->GetName(name);
     if (name.EqualsLiteral("test2"))
-      expiredCookie = cookie2;
+      expiredCookie = cookie;
     else if (name.EqualsLiteral("test3"))
-      newDomainCookie = cookie2;
+      newDomainCookie = cookie;
   }
-  EXPECT_EQ(i, 3);
+  EXPECT_EQ(cookies.Length(), 3ul);
   // check the httpOnly attribute of the second cookie is honored
   GetACookie(cookieService, "http://cookiemgr.test/foo/", nullptr, cookie);
   EXPECT_TRUE(CheckResult(cookie.get(), MUST_CONTAIN, "test2=yes"));
   GetACookieNoHttp(cookieService, "http://cookiemgr.test/foo/", cookie);
   EXPECT_TRUE(CheckResult(cookie.get(), MUST_NOT_CONTAIN, "test2=yes"));
   // check CountCookiesFromHost()
   uint32_t hostCookies = 0;
   EXPECT_TRUE(NS_SUCCEEDED(cookieMgr2->CountCookiesFromHost(
@@ -930,19 +919,19 @@ TEST(TestCookie, TestCookieMain)
       NS_LITERAL_CSTRING("cookiemgr.test"), &hostCookies)));
   EXPECT_EQ(hostCookies, 2u);
   EXPECT_TRUE(NS_SUCCEEDED(cookieMgr2->CookieExistsNative(
       NS_LITERAL_CSTRING("cookiemgr.test"), NS_LITERAL_CSTRING("/foo"),
       NS_LITERAL_CSTRING("test2"), &attrs, &found)));
   EXPECT_TRUE(found);
   // double-check RemoveAll() using the enumerator
   EXPECT_TRUE(NS_SUCCEEDED(cookieMgr->RemoveAll()));
-  EXPECT_TRUE(
-      NS_SUCCEEDED(cookieMgr->GetEnumerator(getter_AddRefs(enumerator))) &&
-      NS_SUCCEEDED(enumerator->HasMoreElements(&more)) && !more);
+  cookies.SetLength(0);
+  EXPECT_TRUE(NS_SUCCEEDED(cookieMgr->GetCookies(cookies)) &&
+              cookies.IsEmpty());
 
   // *** eviction and creation ordering tests
 
   // test that cookies are
   // a) returned by order of creation time (oldest first, newest last)
   // b) evicted by order of lastAccessed time, if the limit on cookies per host
   // (50) is reached
   nsAutoCString name;
@@ -999,28 +988,20 @@ TEST(TestCookie, TestCookieMain)
                      "empty=yes; samesite=", nullptr, false);
   SetASameSiteCookie(cookieService, "http://samesite.test", nullptr,
                      "bogus=yes; samesite=bogus", nullptr, false);
   SetASameSiteCookie(cookieService, "http://samesite.test", nullptr,
                      "strict=yes; samesite=strict", nullptr, false);
   SetASameSiteCookie(cookieService, "http://samesite.test", nullptr,
                      "lax=yes; samesite=lax", nullptr, false);
 
-  EXPECT_TRUE(
-      NS_SUCCEEDED(cookieMgr->GetEnumerator(getter_AddRefs(enumerator))));
-  i = 0;
+  cookies.SetLength(0);
+  EXPECT_TRUE(NS_SUCCEEDED(cookieMgr->GetCookies(cookies)));
 
-  // check the cookies for the required samesite value
-  while (NS_SUCCEEDED(enumerator->HasMoreElements(&more)) && more) {
-    nsCOMPtr<nsISupports> cookie;
-    if (NS_FAILED(enumerator->GetNext(getter_AddRefs(cookie)))) break;
-    ++i;
-  }
-
-  EXPECT_TRUE(i == 0);
+  EXPECT_TRUE(cookies.IsEmpty());
 
   // Set cookies with various incantations of the samesite attribute:
   // No same site attribute present
   SetASameSiteCookie(cookieService, "http://samesite.test", nullptr,
                      "unset=yes", nullptr, true);
   // samesite attribute present but with no value
   SetASameSiteCookie(cookieService, "http://samesite.test", nullptr,
                      "unspecified=yes; samesite", nullptr, true);
@@ -1032,49 +1013,41 @@ TEST(TestCookie, TestCookieMain)
                      "bogus=yes; samesite=bogus", nullptr, true);
   // samesite=strict
   SetASameSiteCookie(cookieService, "http://samesite.test", nullptr,
                      "strict=yes; samesite=strict", nullptr, true);
   // samesite=lax
   SetASameSiteCookie(cookieService, "http://samesite.test", nullptr,
                      "lax=yes; samesite=lax", nullptr, true);
 
-  EXPECT_TRUE(
-      NS_SUCCEEDED(cookieMgr->GetEnumerator(getter_AddRefs(enumerator))));
-  i = 0;
+  cookies.SetLength(0);
+  EXPECT_TRUE(NS_SUCCEEDED(cookieMgr->GetCookies(cookies)));
 
   // check the cookies for the required samesite value
-  while (NS_SUCCEEDED(enumerator->HasMoreElements(&more)) && more) {
-    nsCOMPtr<nsISupports> cookie;
-    if (NS_FAILED(enumerator->GetNext(getter_AddRefs(cookie)))) break;
-    ++i;
-
-    // keep tabs on the second and third cookies, so we can check them later
-    nsCOMPtr<nsICookie> cookie2(do_QueryInterface(cookie));
-    if (!cookie2) break;
+  for (const auto& cookie : cookies) {
     nsAutoCString name;
-    cookie2->GetName(name);
+    cookie->GetName(name);
     int32_t sameSiteAttr;
-    cookie2->GetSameSite(&sameSiteAttr);
+    cookie->GetSameSite(&sameSiteAttr);
     if (name.EqualsLiteral("unset")) {
       EXPECT_TRUE(sameSiteAttr == nsICookie::SAMESITE_NONE);
     } else if (name.EqualsLiteral("unspecified")) {
       EXPECT_TRUE(sameSiteAttr == nsICookie::SAMESITE_NONE);
     } else if (name.EqualsLiteral("empty")) {
       EXPECT_TRUE(sameSiteAttr == nsICookie::SAMESITE_NONE);
     } else if (name.EqualsLiteral("bogus")) {
       EXPECT_TRUE(sameSiteAttr == nsICookie::SAMESITE_NONE);
     } else if (name.EqualsLiteral("strict")) {
       EXPECT_TRUE(sameSiteAttr == nsICookie::SAMESITE_STRICT);
     } else if (name.EqualsLiteral("lax")) {
       EXPECT_TRUE(sameSiteAttr == nsICookie::SAMESITE_LAX);
     }
   }
 
-  EXPECT_TRUE(i == 6);
+  EXPECT_TRUE(cookies.Length() == 6);
 
   // *** SameSite attribute
   // Clear the cookies
   EXPECT_TRUE(NS_SUCCEEDED(cookieMgr->RemoveAll()));
 
   // please note that the flag aForeign is always set to true using this test
   // setup because no nsIChannel is passed to SetCookieString(). therefore we
   // can only test that no cookies are sent for cross origin requests using
--- a/netwerk/test/mochitests/file_chromecommon.js
+++ b/netwerk/test/mochitests/file_chromecommon.js
@@ -1,13 +1,13 @@
 let cs = Cc["@mozilla.org/cookiemanager;1"].getService(Ci.nsICookieManager);
 
 addMessageListener("getCookieCountAndClear", () => {
   let count = 0;
-  for (let cookie of cs.enumerator) {
+  for (let cookie of cs.cookies) {
     ++count;
   }
   cs.removeAll();
 
   sendAsyncMessage("getCookieCountAndClear:return", { count });
 });
 
 cs.removeAll();
--- a/netwerk/test/mochitests/file_documentcookie_maxage_chromescript.js
+++ b/netwerk/test/mochitests/file_documentcookie_maxage_chromescript.js
@@ -1,15 +1,15 @@
 function getCookieService() {
   return Cc["@mozilla.org/cookiemanager;1"].getService(Ci.nsICookieManager);
 }
 
 function getCookies(cs) {
   let cookies = [];
-  for (let cookie of cs.enumerator) {
+  for (let cookie of cs.cookies) {
     cookies.push({
       host: cookie.host,
       path: cookie.path,
       name: cookie.name,
       value: cookie.value,
       expires: cookie.expires,
     });
   }
--- a/netwerk/test/mochitests/file_testloadflags_chromescript.js
+++ b/netwerk/test/mochitests/file_testloadflags_chromescript.js
@@ -63,17 +63,17 @@ obs.prototype = {
 
     this.os.removeObserver(this, "http-on-modify-request");
     this.os = null;
   },
 };
 
 function getCookieCount(cs) {
   let count = 0;
-  for (let cookie of cs.enumerator) {
+  for (let cookie of cs.cookies) {
     info("cookie: " + cookie);
     info(
       "cookie host " +
         cookie.host +
         " path " +
         cookie.path +
         " name " +
         cookie.name +
--- a/netwerk/test/unit/head_cookies.js
+++ b/netwerk/test/unit/head_cookies.js
@@ -144,27 +144,18 @@ function do_set_cookies(uri, channel, se
     null,
     "hot=dog" + suffix,
     null,
     channel
   );
   Assert.equal(Services.cookiemgr.countCookiesFromHost(uri.host), expected[3]);
 }
 
-function do_count_enumerator(enumerator) {
-  let i = 0;
-  for (let cookie of enumerator) {
-    void cookie;
-    ++i;
-  }
-  return i;
-}
-
 function do_count_cookies() {
-  return do_count_enumerator(Services.cookiemgr.enumerator);
+  return Services.cookiemgr.cookies.length;
 }
 
 // Helper object to store cookie data.
 function Cookie(
   name,
   value,
   host,
   path,
--- a/netwerk/test/unit/test_bug411952.js
+++ b/netwerk/test/unit/test_bug411952.js
@@ -14,17 +14,17 @@ function run_test() {
       false,
       time,
       {},
       Ci.nsICookie.SAMESITE_NONE
     );
     const now = Math.floor(new Date().getTime() / 1000);
 
     var found = false;
-    for (let cookie of cm.enumerator) {
+    for (let cookie of cm.cookies) {
       if (
         cookie.host == "example.com" &&
         cookie.path == "/" &&
         cookie.name == "C"
       ) {
         Assert.ok(
           "creationTime" in cookie,
           "creationTime attribute is not accessible on the cookie"
--- a/netwerk/test/unit/test_bug526789.js
+++ b/netwerk/test/unit/test_bug526789.js
@@ -252,17 +252,17 @@ function run_test() {
   testTrailingDotCookie("http://foo.com", "foo.com");
 
   cm.removeAll();
 }
 
 function getCookieCount() {
   var count = 0;
   var cm = Cc["@mozilla.org/cookiemanager;1"].getService(Ci.nsICookieManager);
-  for (let cookie of cm.enumerator) {
+  for (let cookie of cm.cookies) {
     ++count;
   }
   return count;
 }
 
 function testDomainCookie(uriString, domain) {
   var cs = Cc["@mozilla.org/cookieService;1"].getService(Ci.nsICookieService);
   var cm = Cc["@mozilla.org/cookiemanager;1"].getService(Ci.nsICookieManager);
--- a/netwerk/test/unit/test_cookies_profile_close.js
+++ b/netwerk/test/unit/test_cookies_profile_close.js
@@ -25,20 +25,19 @@ function* do_run_test() {
   Services.prefs.setIntPref("network.cookie.cookieBehavior", 0);
 
   // Start the cookieservice.
   Services.cookies;
 
   // Set a cookie.
   let uri = NetUtil.newURI("http://foo.com");
   Services.cookies.setCookieString(uri, null, "oh=hai; max-age=1000", null);
-  let enumerator = Services.cookiemgr.enumerator;
-  Assert.ok(enumerator.hasMoreElements());
-  let cookie = enumerator.getNext().QueryInterface(Ci.nsICookie);
-  Assert.ok(!enumerator.hasMoreElements());
+  let cookies = Services.cookiemgr.cookies;
+  Assert.ok(cookies.length == 1);
+  let cookie = cookies[0];
 
   // Fire 'profile-before-change'.
   do_close_profile();
 
   // Check that the APIs behave appropriately.
   Assert.equal(Services.cookies.getCookieString(uri, null), "");
   Assert.equal(Services.cookies.getCookieStringFromHttp(uri, null, null), "");
   Services.cookies.setCookieString(uri, null, "oh2=hai", null);
@@ -52,17 +51,17 @@ function* do_run_test() {
   );
   Assert.equal(Services.cookies.getCookieString(uri, null), "");
 
   do_check_throws(function() {
     Services.cookiemgr.removeAll();
   }, Cr.NS_ERROR_NOT_AVAILABLE);
 
   do_check_throws(function() {
-    Services.cookiemgr.enumerator;
+    Services.cookiemgr.cookies;
   }, Cr.NS_ERROR_NOT_AVAILABLE);
 
   do_check_throws(function() {
     Services.cookiemgr.add(
       "foo.com",
       "",
       "oh4",
       "hai",
--- a/netwerk/test/unit/test_cookies_read.js
+++ b/netwerk/test/unit/test_cookies_read.js
@@ -22,18 +22,18 @@ function finish_test() {
 function* do_run_test() {
   // Set up a profile.
   let profile = do_get_profile();
 
   // Allow all cookies.
   Services.prefs.setIntPref("network.cookie.cookieBehavior", 0);
 
   // Start the cookieservice, to force creation of a database.
-  // Get the sessionEnumerator to join the initialization in cookie thread
-  Services.cookiemgr.sessionEnumerator;
+  // Get the sessionCookies to join the initialization in cookie thread
+  Services.cookiemgr.sessionCookies;
 
   // Open a database connection now, after synchronous initialization has
   // completed. We may not be able to open one later once asynchronous writing
   // begins.
   Assert.ok(do_get_cookie_file(profile).exists());
   let db = new CookieDatabaseConnection(do_get_cookie_file(profile), 4);
 
   for (let i = 0; i < CMAX; ++i) {
--- a/netwerk/test/unit/test_domain_eviction.js
+++ b/netwerk/test/unit/test_domain_eviction.js
@@ -51,17 +51,17 @@ function* do_run_test() {
   // Wait a while, to make sure the first batch of cookies is older than
   // the second (timer resolution varies on different platforms).
   do_timeout(100, continue_test);
   yield;
 
   setCookies("tasty.horse.radish", 50, futureExpiry);
   Assert.equal(countCookies("horse.radish", "horse.radish"), 50);
 
-  for (let cookie of Services.cookiemgr.enumerator) {
+  for (let cookie of Services.cookiemgr.cookies) {
     if (cookie.host == "horse.radish") {
       do_throw("cookies not evicted by lastAccessed order");
     }
   }
 
   // Test that expired cookies for a domain are evicted before live ones.
   let shortExpiry = Math.floor(Date.now() / 1000 + 2);
   setCookies("captchart.com", 49, futureExpiry);
@@ -120,25 +120,25 @@ function setCookies(aHost, aNumber, aExp
       {},
       Ci.nsICookie.SAMESITE_NONE
     );
   }
 }
 
 // count how many cookies are within domain 'aBaseDomain', using three
 // independent interface methods on nsICookieManager:
-// 1) 'enumerator', an enumerator of all cookies;
+// 1) 'cookies', an array of all cookies;
 // 2) 'countCookiesFromHost', which returns the number of cookies within the
 //    base domain of 'aHost',
-// 3) 'getCookiesFromHost', which returns an enumerator of 2).
+// 3) 'getCookiesFromHost', which returns an array of 2).
 function countCookies(aBaseDomain, aHost) {
-  // count how many cookies are within domain 'aBaseDomain' using the cookie
-  // enumerator.
+  // count how many cookies are within domain 'aBaseDomain' using the cookies
+  // array.
   let cookies = [];
-  for (let cookie of Services.cookiemgr.enumerator) {
+  for (let cookie of Services.cookiemgr.cookies) {
     if (
       cookie.host.length >= aBaseDomain.length &&
       cookie.host.slice(cookie.host.length - aBaseDomain.length) == aBaseDomain
     ) {
       cookies.push(cookie);
     }
   }
 
@@ -160,17 +160,17 @@ function countCookies(aBaseDomain, aHost
         if (cookies[i].host == cookie.host && cookies[i].name == cookie.name) {
           found = true;
           cookies.splice(i, 1);
           break;
         }
       }
 
       if (!found) {
-        do_throw("cookie " + cookie.name + " not found in master enumerator");
+        do_throw("cookie " + cookie.name + " not found in master cookies");
       }
     } else {
       do_throw(
         "cookie host " + cookie.host + " not within domain " + aBaseDomain
       );
     }
   }
 
--- a/netwerk/test/unit/test_eviction.js
+++ b/netwerk/test/unit/test_eviction.js
@@ -230,17 +230,17 @@ function get_creationTime(i) {
 
 // Test that 'aNumberToExpect' cookies remain after purging is complete, and
 // that the cookies that remain consist of the set expected given the number of
 // of older and newer cookies -- eviction should occur by order of lastAccessed
 // time, if both the limit on total cookies (maxNumber + 10%) and the purge age
 // + 10% are exceeded.
 function check_remaining_cookies(aNumberTotal, aNumberOld, aNumberToExpect) {
   let i = 0;
-  for (let cookie of Services.cookiemgr.enumerator) {
+  for (let cookie of Services.cookiemgr.cookies) {
     ++i;
 
     if (aNumberTotal != aNumberToExpect) {
       // make sure the cookie is one of the batch we expect was purged.
       var hostNumber = new Number(cookie.rawHost.split(".")[1]);
       if (hostNumber < aNumberOld - aNumberToExpect) {
         break;
       }
--- a/netwerk/test/unit/test_schema_2_migration.js
+++ b/netwerk/test/unit/test_schema_2_migration.js
@@ -18,18 +18,18 @@ function finish_test() {
   });
 }
 
 function* do_run_test() {
   // Set up a profile.
   let profile = do_get_profile();
 
   // Start the cookieservice, to force creation of a database.
-  // Get the sessionEnumerator to join the initialization in cookie thread
-  Services.cookiemgr.sessionEnumerator;
+  // Get the sessionCookies to join the initialization in cookie thread
+  Services.cookiemgr.sessionCookies;
 
   // Close the profile.
   do_close_profile(test_generator);
   yield;
 
   // Remove the cookie file in order to create another database file.
   do_get_cookie_file(profile).remove(false);
 
--- a/netwerk/test/unit/test_schema_3_migration.js
+++ b/netwerk/test/unit/test_schema_3_migration.js
@@ -18,18 +18,18 @@ function finish_test() {
   });
 }
 
 function* do_run_test() {
   // Set up a profile.
   let profile = do_get_profile();
 
   // Start the cookieservice, to force creation of a database.
-  // Get the sessionEnumerator to join the initialization in cookie thread
-  Services.cookiemgr.sessionEnumerator;
+  // Get the sessionCookies to join the initialization in cookie thread
+  Services.cookiemgr.sessionCookies;
 
   // Close the profile.
   do_close_profile(test_generator);
   yield;
 
   // Remove the cookie file in order to create another database file.
   do_get_cookie_file(profile).remove(false);
 
--- a/servo/components/style/animation.rs
+++ b/servo/components/style/animation.rs
@@ -11,18 +11,18 @@
 use crate::bezier::Bezier;
 use crate::context::SharedStyleContext;
 use crate::dom::{OpaqueNode, TElement};
 use crate::font_metrics::FontMetricsProvider;
 use crate::properties::animated_properties::AnimatedProperty;
 use crate::properties::longhands::animation_direction::computed_value::single_value::T as AnimationDirection;
 use crate::properties::longhands::animation_play_state::computed_value::single_value::T as AnimationPlayState;
 use crate::properties::{self, CascadeMode, ComputedValues, LonghandId};
-use crate::rule_tree::CascadeLevel;
 use crate::stylesheets::keyframes_rule::{KeyframesAnimation, KeyframesStep, KeyframesStepValue};
+use crate::stylesheets::Origin;
 use crate::timer::Timer;
 use crate::values::computed::box_::TransitionProperty;
 use crate::values::computed::Time;
 use crate::values::computed::TimingFunction;
 use crate::values::generics::box_::AnimationIterationCount;
 use crate::values::generics::easing::{StepPosition, TimingFunction as GenericTimingFunction};
 use crate::Atom;
 #[cfg(feature = "servo")]
@@ -486,17 +486,17 @@ where
             let iter = || {
                 // It's possible to have !important properties in keyframes
                 // so we have to filter them out.
                 // See the spec issue https://github.com/w3c/csswg-drafts/issues/1824
                 // Also we filter our non-animatable properties.
                 guard
                     .normal_declaration_iter()
                     .filter(|declaration| declaration.is_animatable())
-                    .map(|decl| (decl, CascadeLevel::Animations))
+                    .map(|decl| (decl, Origin::Author))
             };
 
             // This currently ignores visited styles, which seems acceptable,
             // as existing browsers don't appear to animate visited styles.
             let computed = properties::apply_declarations::<E, _, _>(
                 context.stylist.device(),
                 /* pseudo = */ None,
                 previous_style.rules(),
--- a/servo/components/style/properties/cascade.rs
+++ b/servo/components/style/properties/cascade.rs
@@ -10,17 +10,17 @@ use crate::dom::TElement;
 use crate::font_metrics::FontMetricsProvider;
 use crate::logical_geometry::WritingMode;
 use crate::media_queries::Device;
 use crate::properties::{ComputedValues, StyleBuilder};
 use crate::properties::{LonghandId, LonghandIdSet, CSSWideKeyword};
 use crate::properties::{PropertyDeclaration, PropertyDeclarationId, DeclarationImportanceIterator};
 use crate::properties::CASCADE_PROPERTY;
 use crate::rule_cache::{RuleCache, RuleCacheConditions};
-use crate::rule_tree::{CascadeLevel, StrongRuleNode};
+use crate::rule_tree::StrongRuleNode;
 use crate::selector_parser::PseudoElement;
 use crate::stylesheets::{Origin, PerOrigin};
 use servo_arc::Arc;
 use crate::shared_lock::StylesheetGuards;
 use smallbitvec::SmallBitVec;
 use smallvec::SmallVec;
 use std::borrow::Cow;
 use std::cell::RefCell;
@@ -129,43 +129,47 @@ where
     debug_assert_eq!(
         parent_style.is_some(),
         parent_style_ignoring_first_line.is_some()
     );
     let empty = SmallBitVec::new();
     let restriction = pseudo.and_then(|p| p.property_restriction());
     let iter_declarations = || {
         rule_node.self_and_ancestors().flat_map(|node| {
-            let cascade_level = node.cascade_level();
+            let origin = node.cascade_level().origin();
             let node_importance = node.importance();
+            let guard = match origin {
+                Origin::Author => guards.author,
+                Origin::User | Origin::UserAgent => guards.ua_or_user,
+            };
             let declarations = match node.style_source() {
                 Some(source) => source
-                    .read(cascade_level.guard(guards))
+                    .read(guard)
                     .declaration_importance_iter(),
                 None => DeclarationImportanceIterator::new(&[], &empty),
             };
 
             declarations
                 // Yield declarations later in source order (with more precedence) first.
                 .rev()
                 .filter_map(move |(declaration, declaration_importance)| {
                     if let Some(restriction) = restriction {
                         // declaration.id() is either a longhand or a custom
                         // property.  Custom properties are always allowed, but
                         // longhands are only allowed if they have our
                         // restriction flag set.
                         if let PropertyDeclarationId::Longhand(id) = declaration.id() {
-                            if !id.flags().contains(restriction) && cascade_level.origin() != Origin::UserAgent {
+                            if !id.flags().contains(restriction) && origin != Origin::UserAgent {
                                 return None;
                             }
                         }
                     }
 
                     if declaration_importance == node_importance {
-                        Some((declaration, cascade_level))
+                        Some((declaration, origin))
                     } else {
                         None
                     }
                 })
         })
     };
 
     apply_declarations(
@@ -218,17 +222,17 @@ pub fn apply_declarations<'a, E, F, I>(
     quirks_mode: QuirksMode,
     rule_cache: Option<&RuleCache>,
     rule_cache_conditions: &mut RuleCacheConditions,
     element: Option<E>,
 ) -> Arc<ComputedValues>
 where
     E: TElement,
     F: Fn() -> I,
-    I: Iterator<Item = (&'a PropertyDeclaration, CascadeLevel)>,
+    I: Iterator<Item = (&'a PropertyDeclaration, Origin)>,
 {
     debug_assert!(layout_parent_style.is_none() || parent_style.is_some());
     debug_assert_eq!(
         parent_style.is_some(),
         parent_style_ignoring_first_line.is_some()
     );
     #[cfg(feature = "gecko")]
     debug_assert!(
@@ -237,27 +241,27 @@ where
                 parent_style.unwrap(),
                 parent_style_ignoring_first_line.unwrap()
             ) ||
             parent_style.unwrap().is_first_line_style()
     );
 
     let inherited_style = parent_style.unwrap_or(device.default_computed_values());
 
-    let mut declarations = SmallVec::<[(&_, CascadeLevel); 32]>::new();
+    let mut declarations = SmallVec::<[(&_, Origin); 32]>::new();
     let custom_properties = {
         let mut builder = CustomPropertiesBuilder::new(
             inherited_style.custom_properties(),
             device.environment(),
         );
 
-        for (declaration, cascade_level) in iter_declarations() {
-            declarations.push((declaration, cascade_level));
+        for (declaration, origin) in iter_declarations() {
+            declarations.push((declaration, origin));
             if let PropertyDeclaration::Custom(ref declaration) = *declaration {
-                builder.cascade(declaration, cascade_level.origin());
+                builder.cascade(declaration, origin);
             }
         }
 
         builder.build()
     };
 
     let mut context = computed::Context {
         is_root_element: pseudo.is_none() && element.map_or(false, |e| e.is_root()),
@@ -327,26 +331,25 @@ where
     }
 
     context.builder.build()
 }
 
 fn should_ignore_declaration_when_ignoring_document_colors(
     device: &Device,
     longhand_id: LonghandId,
-    cascade_level: CascadeLevel,
+    origin: Origin,
     pseudo: Option<&PseudoElement>,
     declaration: &mut Cow<PropertyDeclaration>,
 ) -> bool {
     if !longhand_id.ignored_when_document_colors_disabled() {
         return false;
     }
 
-    let is_ua_or_user_rule =
-        matches!(cascade_level.origin(), Origin::User | Origin::UserAgent);
+    let is_ua_or_user_rule = matches!(origin, Origin::User | Origin::UserAgent);
     if is_ua_or_user_rule {
         return false;
     }
 
     // Don't override background-color on ::-moz-color-swatch. It is set as an
     // author style (via the style attribute), but it's pretty important for it
     // to show up for obvious reasons :)
     if pseudo.map_or(false, |p| p.is_color_swatch()) && longhand_id == LonghandId::BackgroundColor {
@@ -441,32 +444,31 @@ impl<'a, 'b: 'a> Cascade<'a, 'b> {
     }
 
     fn apply_properties<'decls, Phase, I>(
         &mut self,
         apply_reset: ApplyResetProperties,
         declarations: I,
     ) where
         Phase: CascadePhase,
-        I: Iterator<Item = (&'decls PropertyDeclaration, CascadeLevel)>,
+        I: Iterator<Item = (&'decls PropertyDeclaration, Origin)>,
     {
         let apply_reset = apply_reset == ApplyResetProperties::Yes;
 
         debug_assert!(
             !Phase::is_early() || apply_reset,
             "Should always apply reset properties in the early phase, since we \
              need to know font-size / writing-mode to decide whether to use the \
              cached reset properties"
         );
 
         let ignore_colors = !self.context.builder.device.use_document_colors();
 
-        for (declaration, cascade_level) in declarations {
+        for (declaration, origin) in declarations {
             let declaration_id = declaration.id();
-            let origin = cascade_level.origin();
             let longhand_id = match declaration_id {
                 PropertyDeclarationId::Longhand(id) => id,
                 PropertyDeclarationId::Custom(..) => continue,
             };
 
             let inherited = longhand_id.inherited();
             if !apply_reset && !inherited {
                 continue;
@@ -504,17 +506,17 @@ impl<'a, 'b: 'a> Cascade<'a, 'b> {
 
             // When document colors are disabled, skip properties that are
             // marked as ignored in that mode, unless they come from a UA or
             // user style sheet.
             if ignore_colors {
                 let should_ignore = should_ignore_declaration_when_ignoring_document_colors(
                     self.context.builder.device,
                     longhand_id,
-                    cascade_level,
+                    origin,
                     self.context.builder.pseudo,
                     &mut declaration,
                 );
                 if should_ignore {
                     continue;
                 }
             }
 
--- a/servo/components/style/stylist.rs
+++ b/servo/components/style/stylist.rs
@@ -1317,26 +1317,27 @@ impl Stylist {
         E: TElement,
     {
         use crate::font_metrics::get_metrics_provider_for_product;
 
         let block = declarations.read_with(guards.author);
         let iter_declarations = || {
             block
                 .declaration_importance_iter()
-                .map(|(declaration, importance)| {
-                    debug_assert!(!importance.important());
-                    (declaration, CascadeLevel::same_tree_author_normal())
-                })
+                .map(|(declaration, _)| (declaration, Origin::Author))
         };
 
         let metrics = get_metrics_provider_for_product();
 
         // We don't bother inserting these declarations in the rule tree, since
         // it'd be quite useless and slow.
+        //
+        // TODO(emilio): Now that we fixed bug 1493420, we should consider
+        // reversing this as it shouldn't be slow anymore, and should avoid
+        // generating two instantiations of apply_declarations.
         properties::apply_declarations::<E, _, _>(
             &self.device,
             /* pseudo = */ None,
             self.rule_tree.root(),
             guards,
             iter_declarations,
             Some(parent_style),
             Some(parent_style),
--- a/testing/web-platform/tests/webaudio/js/worklet-recorder.js
+++ b/testing/web-platform/tests/webaudio/js/worklet-recorder.js
@@ -25,16 +25,17 @@ class RecorderProcessor extends AudioWor
   }
 
   process(inputs, outputs) {
     if (this._recordBufferLength <= currentFrame) {
       this.port.postMessage({
         type: 'recordfinished',
         recordBuffer: this._recordBuffer
       });
+      this.port.close();
       return false;
     }
 
     // Records the incoming data from |inputs| and also bypasses the data to
     // |outputs|.
     const input = inputs[0];
     const output = outputs[0];
     for (let channel = 0; channel < input.length; ++channel) {
--- a/third_party/rust/failure/.cargo-checksum.json
+++ b/third_party/rust/failure/.cargo-checksum.json
@@ -1,1 +1,1 @@
-{"files":{"CODE_OF_CONDUCT.md":"9a7bc3fdffac1288f51485e70a910a4e9de1260a64fbe894f60ad73b3386dda9","Cargo.toml":"2e6b46b3ac49b9890868cd4ea2118efbaf4ca80e136a1b5b417ce95ea91fb293","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"23f18e03dc49df91622fe2a76176497404e46ced8a715d9d2b67a7446571cca3","Makefile":"61a649ecb55115ba0f357215eb322fa6676ce163ca20bff59d7c5e275aa37035","README.md":"d4dba8ed8b388c1e24bcaaa0f0e75a0830885d6db9bedc9630591a180c744f73","RELEASES.md":"42304b5bc4cfd3a5f93d17bfe34d24f6b8bb918e89c57425adbb503f500b558c","book/src/SUMMARY.md":"32f211f5aeb51a05b3c6a41a128bdb9e410ae84008a93e6b13442e45cd1c91d4","book/src/bail-and-ensure.md":"08fb463570143ec6568189468f1f54a7210b0a1ad66a57f7f7c36619831b4d72","book/src/custom-fail.md":"d4b1501201f9c54637bc40a2413e333f6f7d4fcfc8e3de74bf40d48eca0d4e41","book/src/derive-fail.md":"69916338286f970ae6709fb309bd4d80c321fea10b927f14efe402e3c0a5fdc9","book/src/error-errorkind.md":"40663de622bfb89a3dedcf6e093ec61eb1ab704d512d725e33f66aec38911757","book/src/error-msg.md":"2ab003bde8e88e0e3b9d1559d95e84b0ca7068522e324235bc4b2fdb88996d51","book/src/error.md":"c978778e7986e5febfb37e635525053ef73c534e4b6e9fc25deb576fdbdc111d","book/src/fail.md":"076ed560e9ad293bf99611f9407d4dc17310c42cf1652dd1f3f4be85fb5f17b8","book/src/guidance.md":"614cb85ae32c2b59119cd1db7eea008e50b051563c15ba1305f312fa2eeb3ac0","book/src/howto.md":"e18744011f5cc5779f5bb981ebd10f0af440c98398b2eb5af0ee27b9662ee410","book/src/intro.md":"eeb23e1ac3ccf75c4779603662910e96df647a02c73665a206dcc34c56d77eaf","book/src/string-custom-error.md":"f1d94e211f1d2dfb2d9d9a0d7eb745b8ea7f08f26243283fddb440cb099893ff","book/src/use-error.md":"a7f91e06eb676318da04a56e4b31c73dd7db888d43c215e1534a5bc415e98258","build-docs.sh":"27b611219773192b9f972b2054522481fd5c2c9419c155535f58d05bfc31fffe","examples/bail_ensure.rs":"fffc71e41f9fbbc2a7db453ef20779716007ed6bbb01e45fbcefb1e073745ecc","examples/error_as_cause.rs":"e0a6472455db5e484febc196667bc46c939d9f890bfe550ab7435d52b1ac6b2b","examples/simple.rs":"7a5fc0673b6bb5bd3716416a6545f7ff471d182292a2c8424cf18bc4a72f6936","examples/string_custom_error_pattern.rs":"23b5bf79a7219aa8a80484c0df70cd43d882b7dccd91de9ceb1aac05b0b1b4f2","src/as_fail.rs":"8a381a9624b3d28b45f92f8b527d7496e7a722c8aa0d632f0b23bbe0af98a76e","src/backtrace/internal.rs":"3fc4943061d4396c855571f134cd922f428cbe930689c8191376867b729d7b08","src/backtrace/mod.rs":"df3a348300775182c2780c542f119c989a6004cff841d817bdf7b93eef9a0dd3","src/box_std.rs":"224f3e3f48ad217ba34a54a62f608f9cba3ce95b176558684706c2f7fe72ce72","src/compat.rs":"97ed4fa49ac80c915b384b29a1bf678430cf1ea8ea61aa794a6014a1c3217762","src/context.rs":"d91ed85add638af7c9d481cb82ee6633c3678978951a5530c166fc156efac2e4","src/error/error_impl.rs":"063b9d9127f455b7555184af2576bc59e650add13c820be4960a3a5e5da0a9e4","src/error/error_impl_small.rs":"e6cbbd4d12e8eec1bd0f15713d33a0e525599268c9316dd40240eb7cd9e19a9d","src/error/mod.rs":"103621b313bd729c94054c5d88edd59d8c07311b650873e81b5021362647ae7a","src/error_message.rs":"2a45a3bd142e6547fc5da27c182fb690e2990de11db2a9b8ce63e50d9c589997","src/lib.rs":"0969303376ab328e16d7c64d690fc71a1e4eee00b413e79009cd590a2c4abbc0","src/macros.rs":"47cc9c73291e6edb3365d72b772d781215d123240f89a5fff914d23927781efa","src/result_ext.rs":"8088c3cb1481e81891014c99cc0f1b75f25a2f212b52ae856583e4c1f1901d09","src/small_error.rs":"652bf6ff2016d8e31b6ee709ad3efaff9f4e96d5aec8120ea3986a0bb8f57c54","src/sync_failure.rs":"a92a2e8b416196322718a4e7e1262f5b1b0a6be47b849d9a7e1050c1d33490db","travis.sh":"836024f7a56fdbe24a99ab9ce9350713831f4375a60f02593aad6637b766a330"},"package":"6dd377bcc1b1b7ce911967e3ec24fa19c3224394ec05b54aa7b083d498341ac7"}
\ No newline at end of file
+{"files":{"CODE_OF_CONDUCT.md":"9a7bc3fdffac1288f51485e70a910a4e9de1260a64fbe894f60ad73b3386dda9","Cargo.lock":"3206fd88e783a8cc7da73232c080b0b7d7a3c8332d5b2976f0c0c4afa873befb","Cargo.lock.ci":"3c1120d0dc287aa2966eb168521ec84016b09f7f335c6d320f1bee1d367a618e","Cargo.toml":"55a4adc0822ccc0826689542349068af9b83eec4523802b410c1c607daa0e029","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"23f18e03dc49df91622fe2a76176497404e46ced8a715d9d2b67a7446571cca3","Makefile":"61a649ecb55115ba0f357215eb322fa6676ce163ca20bff59d7c5e275aa37035","README.md":"bce9d1eae485cda6c5f9ed94fef92c30d60de117a1e3a23563b9308be1bf5d55","RELEASES.md":"3314fd66e694c74ee389796c0307c1ac94e93c62bf9cb7cc3b029d5396244feb","book/src/SUMMARY.md":"32f211f5aeb51a05b3c6a41a128bdb9e410ae84008a93e6b13442e45cd1c91d4","book/src/bail-and-ensure.md":"08fb463570143ec6568189468f1f54a7210b0a1ad66a57f7f7c36619831b4d72","book/src/custom-fail.md":"d4b1501201f9c54637bc40a2413e333f6f7d4fcfc8e3de74bf40d48eca0d4e41","book/src/derive-fail.md":"69916338286f970ae6709fb309bd4d80c321fea10b927f14efe402e3c0a5fdc9","book/src/error-errorkind.md":"5aae25fce531e9740aa70343bcda3de0f2718949922c2e4a91ceb09062c45892","book/src/error-msg.md":"32e17b280379d2bc83e7cb7a6c664a2e9225802f31638beda508056da53ba6af","book/src/error.md":"c978778e7986e5febfb37e635525053ef73c534e4b6e9fc25deb576fdbdc111d","book/src/fail.md":"2865d1fef1d94de5fc086306ba5a734b26dd1d60effa718906919557bf4d779c","book/src/guidance.md":"614cb85ae32c2b59119cd1db7eea008e50b051563c15ba1305f312fa2eeb3ac0","book/src/howto.md":"e18744011f5cc5779f5bb981ebd10f0af440c98398b2eb5af0ee27b9662ee410","book/src/intro.md":"2a6eed661e059016d067d2891e9e27b673425dbc87f077849a302619a182d112","book/src/string-custom-error.md":"55e3ef77748c1dcdfe984fe3c510e7001267ac2b3ece230b90844655dd2da957","book/src/use-error.md":"a7f91e06eb676318da04a56e4b31c73dd7db888d43c215e1534a5bc415e98258","build-docs.sh":"27b611219773192b9f972b2054522481fd5c2c9419c155535f58d05bfc31fffe","examples/bail_ensure.rs":"fffc71e41f9fbbc2a7db453ef20779716007ed6bbb01e45fbcefb1e073745ecc","examples/error_as_cause.rs":"e0a6472455db5e484febc196667bc46c939d9f890bfe550ab7435d52b1ac6b2b","examples/simple.rs":"39b2263d4b92f22c9e1ceefb78b67e1299fc46eba5621d1c47afd937fd7d5318","examples/string_custom_error_pattern.rs":"23b5bf79a7219aa8a80484c0df70cd43d882b7dccd91de9ceb1aac05b0b1b4f2","src/as_fail.rs":"6d4f549f8c9d8abcfbb0a70fe5c0853c82f1c127f87f94fc14c06e2fdaf09db1","src/backtrace/internal.rs":"ff809782e9f9f17928595e00d1bc2f3ff8ccf9b48482126049a318d34957ceb6","src/backtrace/mod.rs":"33c7988b61db9995260fd4470821ea4bce5316052d4c41b4326f99dcc9858b0e","src/box_std.rs":"0455cd53c4a7e5150574ea7c30d5d2692e7e0ff98a83a2fd9656f62600077112","src/compat.rs":"8825b752a92cf1f902424be83b139fa76c85bd016e27565e2ec2fe5dfb4759aa","src/context.rs":"0ee2a96a5c84761bdba37c65babdfd8c556747778a8cac649cdc18747f7d15ba","src/error/error_impl.rs":"74b3337d9dc16de0bdd1cd355841f7035972cded053d7a213590c11c3463d595","src/error/error_impl_small.rs":"e6cbbd4d12e8eec1bd0f15713d33a0e525599268c9316dd40240eb7cd9e19a9d","src/error/mod.rs":"a4f7c1db02d3d16034993b78f5e93d36f70a23ef9218375f952034effd5d58bc","src/error_message.rs":"9c45597e8237c601c4c49aa07adeab41126d38f0886789acf3f8874bb149c6be","src/lib.rs":"11ff9348d697afbf44f73eb82d1cd22509ce4064bd41929fd5fbc677e4d04a42","src/macros.rs":"351758673f77384f82ff3373d96f378706b07ff7ef9c98788a21ae8b1cc70359","src/result_ext.rs":"8088c3cb1481e81891014c99cc0f1b75f25a2f212b52ae856583e4c1f1901d09","src/small_error.rs":"652bf6ff2016d8e31b6ee709ad3efaff9f4e96d5aec8120ea3986a0bb8f57c54","src/sync_failure.rs":"a92a2e8b416196322718a4e7e1262f5b1b0a6be47b849d9a7e1050c1d33490db","tests/basic_fail.rs":"d24b8a90a5a122287eedc91c7322a162f2e0c124494a1084c8dc13c711db278b","tests/fail_compat.rs":"ffc1db79138168a618889d8eb1917d3963e6367a3fc5b2541d3120c480a73310","tests/macro_trailing_comma.rs":"e98caf539fa5e34bb11cd0f7c2a315190cdb8b2aeadeb12c706c19f1f5e8cf3e","travis.sh":"836024f7a56fdbe24a99ab9ce9350713831f4375a60f02593aad6637b766a330"},"package":"f8273f13c977665c5db7eb2b99ae520952fe5ac831ae4cd09d80c4c7042b5ed9"}
\ No newline at end of file
new file mode 100644
--- /dev/null
+++ b/third_party/rust/failure/Cargo.lock
@@ -0,0 +1,116 @@
+# This file is automatically @generated by Cargo.
+# It is not intended for manual editing.
+[[package]]
+name = "backtrace"
+version = "0.3.38"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "backtrace-sys 0.1.31 (registry+https://github.com/rust-lang/crates.io-index)",
+ "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)",
+ "rustc-demangle 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "backtrace-sys"
+version = "0.1.31"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "cc 1.0.45 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "cc"
+version = "1.0.45"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+
+[[package]]
+name = "cfg-if"
+version = "0.1.10"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+
+[[package]]
+name = "failure"
+version = "0.1.6"
+dependencies = [
+ "backtrace 0.3.38 (registry+https://github.com/rust-lang/crates.io-index)",
+ "failure_derive 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "failure_derive"
+version = "0.1.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "proc-macro2 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)",
+ "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
+ "syn 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)",
+ "synstructure 0.12.1 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "libc"
+version = "0.2.62"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+
+[[package]]
+name = "proc-macro2"
+version = "1.0.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "unicode-xid 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "quote"
+version = "1.0.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "proc-macro2 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "rustc-demangle"
+version = "0.1.16"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+
+[[package]]
+name = "syn"
+version = "1.0.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "proc-macro2 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)",
+ "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
+ "unicode-xid 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "synstructure"
+version = "0.12.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "proc-macro2 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)",
+ "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
+ "syn 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)",
+ "unicode-xid 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "unicode-xid"
+version = "0.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+
+[metadata]
+"checksum backtrace 0.3.38 (registry+https://github.com/rust-lang/crates.io-index)" = "690a62be8920ccf773ee00ef0968649b0e724cda8bd5b12286302b4ae955fdf5"
+"checksum backtrace-sys 0.1.31 (registry+https://github.com/rust-lang/crates.io-index)" = "82a830b4ef2d1124a711c71d263c5abdc710ef8e907bd508c88be475cebc422b"
+"checksum cc 1.0.45 (registry+https://github.com/rust-lang/crates.io-index)" = "4fc9a35e1f4290eb9e5fc54ba6cf40671ed2a2514c3eeb2b2a908dda2ea5a1be"
+"checksum cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)" = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822"
+"checksum failure_derive 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "0bc225b78e0391e4b8683440bf2e63c2deeeb2ce5189eab46e2b68c6d3725d08"
+"checksum libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)" = "34fcd2c08d2f832f376f4173a231990fa5aef4e99fb569867318a227ef4c06ba"
+"checksum proc-macro2 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)" = "90cf5f418035b98e655e9cdb225047638296b862b42411c4e45bb88d700f7fc0"
+"checksum quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "053a8c8bcc71fcce321828dc897a98ab9760bef03a4fc36693c231e5b3216cfe"
+"checksum rustc-demangle 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)" = "4c691c0e608126e00913e33f0ccf3727d5fc84573623b8d65b2df340b5201783"
+"checksum syn 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)" = "66850e97125af79138385e9b88339cbcd037e3f28ceab8c5ad98e64f0f1f80bf"
+"checksum synstructure 0.12.1 (registry+https://github.com/rust-lang/crates.io-index)" = "3f085a5855930c0441ca1288cf044ea4aecf4f43a91668abdb870b4ba546a203"
+"checksum unicode-xid 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "826e7639553986605ec5979c7dd957c7895e93eabed50ab2ffa7f6128a75097c"
new file mode 100644
--- /dev/null
+++ b/third_party/rust/failure/Cargo.lock.ci
@@ -0,0 +1,136 @@
+[[package]]
+name = "backtrace"
+version = "0.3.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "backtrace-sys 0.1.24 (registry+https://github.com/rust-lang/crates.io-index)",
+ "cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)",
+ "rustc-demangle 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)",
+ "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "backtrace-sys"
+version = "0.1.24"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "cc 1.0.28 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "cc"
+version = "1.0.28"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+
+[[package]]
+name = "cfg-if"
+version = "0.1.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+
+[[package]]
+name = "failure"
+version = "0.1.6"
+dependencies = [
+ "backtrace 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)",
+ "failure_derive 0.1.6",
+]
+
+[[package]]
+name = "failure_derive"
+version = "0.1.6"
+dependencies = [
+ "failure 0.1.6",
+ "proc-macro2 0.4.24 (registry+https://github.com/rust-lang/crates.io-index)",
+ "quote 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)",
+ "syn 0.15.23 (registry+https://github.com/rust-lang/crates.io-index)",
+ "synstructure 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "libc"
+version = "0.2.43"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+
+[[package]]
+name = "proc-macro2"
+version = "0.4.24"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "quote"
+version = "0.6.10"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "proc-macro2 0.4.24 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "rustc-demangle"
+version = "0.1.11"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+
+[[package]]
+name = "syn"
+version = "0.15.23"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "proc-macro2 0.4.24 (registry+https://github.com/rust-lang/crates.io-index)",
+ "quote 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)",
+ "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "synstructure"
+version = "0.10.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "proc-macro2 0.4.24 (registry+https://github.com/rust-lang/crates.io-index)",
+ "quote 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)",
+ "syn 0.15.23 (registry+https://github.com/rust-lang/crates.io-index)",
+ "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "unicode-xid"
+version = "0.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+
+[[package]]
+name = "winapi"
+version = "0.3.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "winapi-x86_64-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "winapi-i686-pc-windows-gnu"
+version = "0.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+
+[[package]]
+name = "winapi-x86_64-pc-windows-gnu"
+version = "0.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+
+[metadata]
+"checksum backtrace 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)" = "89a47830402e9981c5c41223151efcced65a0510c13097c769cede7efb34782a"
+"checksum backtrace-sys 0.1.24 (registry+https://github.com/rust-lang/crates.io-index)" = "c66d56ac8dabd07f6aacdaf633f4b8262f5b3601a810a0dcddffd5c22c69daa0"
+"checksum cc 1.0.28 (registry+https://github.com/rust-lang/crates.io-index)" = "bb4a8b715cb4597106ea87c7c84b2f1d452c7492033765df7f32651e66fcf749"
+"checksum cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "082bb9b28e00d3c9d39cc03e64ce4cea0f1bb9b3fde493f0cbc008472d22bdf4"
+"checksum libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)" = "76e3a3ef172f1a0b9a9ff0dd1491ae5e6c948b94479a3021819ba7d860c8645d"
+"checksum proc-macro2 0.4.24 (registry+https://github.com/rust-lang/crates.io-index)" = "77619697826f31a02ae974457af0b29b723e5619e113e9397b8b82c6bd253f09"
+"checksum quote 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)" = "53fa22a1994bd0f9372d7a816207d8a2677ad0325b073f5c5332760f0fb62b5c"
+"checksum rustc-demangle 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)" = "01b90379b8664dd83460d59bdc5dd1fd3172b8913788db483ed1325171eab2f7"
+"checksum syn 0.15.23 (registry+https://github.com/rust-lang/crates.io-index)" = "9545a6a093a3f0bd59adb472700acc08cad3776f860f16a897dfce8c88721cbc"
+"checksum synstructure 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)" = "73687139bf99285483c96ac0add482c3776528beac1d97d444f6e91f203a2015"
+"checksum unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fc72304796d0818e357ead4e000d19c9c174ab23dc11093ac919054d20a6a7fc"
+"checksum winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)" = "92c1eb33641e276cfa214a0522acad57be5c56b10cb348b3c5117db75f3ac4b0"
+"checksum winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6"
+"checksum winapi-x86_64-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
--- a/third_party/rust/failure/Cargo.toml
+++ b/third_party/rust/failure/Cargo.toml
@@ -1,33 +1,33 @@
 # THIS FILE IS AUTOMATICALLY GENERATED BY CARGO
 #
 # When uploading crates to the registry Cargo will automatically
 # "normalize" Cargo.toml files for maximal compatibility
 # with all versions of Cargo and also rewrite `path` dependencies
-# to registry (e.g. crates.io) dependencies
+# to registry (e.g., crates.io) dependencies
 #
 # If you believe there's an error in this file please file an
 # issue against the rust-lang/cargo repository. If you're
 # editing this file be aware that the upstream Cargo.toml
 # will likely look very different (and much more reasonable)
 
 [package]
 name = "failure"
-version = "0.1.3"
+version = "0.1.6"
 authors = ["Without Boats <boats@mozilla.com>"]
 description = "Experimental error handling abstraction."
-homepage = "https://boats.gitlab.io/failure"
+homepage = "https://rust-lang-nursery.github.io/failure/"
 documentation = "https://docs.rs/failure"
 license = "MIT OR Apache-2.0"
 repository = "https://github.com/rust-lang-nursery/failure"
 [dependencies.backtrace]
 version = "0.3.3"
 optional = true
 
 [dependencies.failure_derive]
-version = "0.1.3"
+version = "0.1.6"
 optional = true
 
 [features]
 default = ["std", "derive"]
 derive = ["failure_derive"]
 std = ["backtrace"]
--- a/third_party/rust/failure/README.md
+++ b/third_party/rust/failure/README.md
@@ -95,18 +95,18 @@ pub fn read_toolchains(path: PathBuf) ->
 
     Ok(toolchains)
 }
 ```
 
 ## Requirements
 
 Both failure and failure_derive are intended to compile on all stable versions
-of Rust newer than 1.18.0, as well as the latest beta and the latest nightly.
-If either crate fails to compile on any version newer than 1.18.0, please open
+of Rust newer than 1.31.0, as well as the latest beta and the latest nightly.
+If either crate fails to compile on any version newer than 1.31.0, please open
 an issue.
 
 failure is **no_std** compatible, though some aspects of it (primarily the
 `Error` type) will not be available in no_std mode.
 
 ## License
 
 failure is licensed under the terms of the MIT License or the Apache License
--- a/third_party/rust/failure/RELEASES.md
+++ b/third_party/rust/failure/RELEASES.md
@@ -1,8 +1,26 @@
+# Version 0.1.6
+
+- Update `syn`, `quote`, and `proc_macro2` dependencies to 1.0.
+- Bump MSRV to 1.31.0.
+
+# Version 0.1.5
+
+- Resolve a regression with error conversions (#290)
+- Added `name()` to `Fail` and `Error`
+
+# Version 0.1.4
+
+- Improved error reporting of the derive feature
+- Resolved a potential internal ambiguity when using the backtrace feature
+  that prevented backtrace from improving an upstream API.
+- Changed the bounds on std error compat conversions through the From trait
+  to take Sync and Send into account.
+
 # Version 0.1.3
 
 - Added `Context::map`
 - Fixed a memory leak for older rust versions on error downcast
 
 # Version 0.1.2
 
 The original plan to release 1.0.0 was changed so that version 0.1.1 is released and a related [RFC to fix the error trait](https://github.com/rust-lang/rfcs/pull/2504) is submitted. See README for details.
--- a/third_party/rust/failure/book/src/error-errorkind.md
+++ b/third_party/rust/failure/book/src/error-errorkind.md
@@ -34,16 +34,20 @@ enum MyErrorKind {
 ```
 
 Unfortunately, it is not easy to correctly derive `Fail` for `MyError` so that
 it delegates things to its inner `Context`. You should write those impls
 yourself:
 
 ```rust
 impl Fail for MyError {
+    fn name(&self) -> Option<&str> {
+        self.inner.name()
+    }
+
     fn cause(&self) -> Option<&Fail> {
         self.inner.cause()
     }
 
     fn backtrace(&self) -> Option<&Backtrace> {
         self.inner.backtrace()
     }
 }
@@ -135,9 +139,9 @@ requires you to apply a contextual messa
 thrown inside your code. It can be a lot of work to maintain this pattern.
 
 Additionally, like the Error type, the Context type may use an allocation and a
 dynamic dispatch internally. If you know this is too expensive for your use
 case, you should not use this pattern.
 
 [use-error]: ./use-error.html
 [custom-fail]: ./custom-fail.html
-[context-api]: https://boats.gitlab.io/failure/doc/failure/struct.Context.html
+[context-api]: https://docs.rs/failure/latest/failure/struct.Context.html
--- a/third_party/rust/failure/book/src/error-msg.md
+++ b/third_party/rust/failure/book/src/error-msg.md
@@ -50,10 +50,10 @@ string. If you ever change the string co
 match.
 
 For these reasons, we strongly recommend against using this pattern except for
 prototyping and when you know the error is just going to get logged or reported
 to the users.
 
 [custom-fail]: ./custom-fail.html
 [use-error]: ./use-error.html
-[err-msg-api]: https://boats.gitlab.io/failure/doc/failure/fn.err_msg.html
-[format-err-api]: https://boats.gitlab.io/failure/doc/failure/macro.format_err.html
+[err-msg-api]: https://docs.rs/failure/latest/failure/fn.err_msg.html
+[format-err-api]: https://docs.rs/failure/latest/failure/macro.format_err.html
--- a/third_party/rust/failure/book/src/fail.md
+++ b/third_party/rust/failure/book/src/fail.md
@@ -142,11 +142,11 @@ Second, `Fail` contains a method called 
 implements `std::error::Error`. If you have a type that implements `Fail`, but
 not the older `Error` trait, you can call `compat` to get a type that does
 implement that trait (for example, if you need to return a `Box<Error>`).
 
 The biggest hole in our backwards compatibility story is that you cannot
 implement `std::error::Error` and also override the backtrace and cause methods
 on `Fail`. We intend to enable this with specialization when it becomes stable.
 
-[derive-docs]: https://boats.gitlab.io/failure/derive-fail.html
+[derive-docs]: ./derive-fail.html
 [stderror]: https://doc.rust-lang.org/std/error/trait.Error.html
 [backtrace-crate]: http://alexcrichton.com/backtrace-rs
--- a/third_party/rust/failure/book/src/intro.md
+++ b/third_party/rust/failure/book/src/intro.md
@@ -1,17 +1,17 @@
 # failure
 
 This is the documentation for the failure crate, which provides a system for
 creating and managing errors in Rust. Additional documentation is found here:
 
 * [API documentation][api]
 * [failure source code][repo]
 
-[api]: https://boats.gitlab.io/failure/doc/failure
+[api]: https://docs.rs/failure
 [repo]: https://github.com/rust-lang-nursery/failure
 
 ```rust
 extern crate serde;
 extern crate toml;
 
 #[macro_use] extern crate failure;
 #[macro_use] extern crate serde_derive;
--- a/third_party/rust/failure/book/src/string-custom-error.md
+++ b/third_party/rust/failure/book/src/string-custom-error.md
@@ -15,16 +15,20 @@ use core::fmt::{self, Display};
 use failure::{Backtrace, Context, Fail, ResultExt};
 
 #[derive(Debug)]
 pub struct MyError {
     inner: Context<String>,
 }
 
 impl Fail for MyError {
+    fn name(&self) -> Option<&str> {
+        self.inner.name()
+    }
+
     fn cause(&self) -> Option<&Fail> {
         self.inner.cause()
     }
 
     fn backtrace(&self) -> Option<&Backtrace> {
         self.inner.backtrace()
     }
 }
@@ -100,16 +104,20 @@ use core::fmt::{self, Display};
 use failure::{Backtrace, Context, Fail, ResultExt};
 
 #[derive(Debug)]
 pub struct MyError {
     inner: Context<&'static str>,
 }
 
 impl Fail for MyError {
+    fn name(&self) -> Option<&str> {
+        self.inner.name()
+    }
+
     fn cause(&self) -> Option<&Fail> {
         self.inner.cause()
     }
 
     fn backtrace(&self) -> Option<&Backtrace> {
         self.inner.backtrace()
     }
 }
--- a/third_party/rust/failure/examples/simple.rs
+++ b/third_party/rust/failure/examples/simple.rs
@@ -11,12 +11,12 @@ struct MyError;
 #[fail(display = "my wrapping error")]
 struct WrappingError(#[fail(cause)] MyError);
 
 fn bad_function() -> Result<(), WrappingError> {
     Err(WrappingError(MyError))
 }
 
 fn main() {
-    for cause in Fail::iter_causes(&bad_function().unwrap_err()) {
-        println!("{}", cause);
+    for cause in Fail::iter_chain(&bad_function().unwrap_err()) {
+        println!("{}: {}", cause.name().unwrap_or("Error"), cause);
     }
 }
--- a/third_party/rust/failure/src/as_fail.rs
+++ b/third_party/rust/failure/src/as_fail.rs
@@ -3,35 +3,35 @@ use Fail;
 /// The `AsFail` trait
 ///
 /// This trait is similar to `AsRef<Fail>`, but it is specialized to handle
 /// the dynamic object of `Fail`. Implementors of `Fail` have a blanket
 /// implementation. It is used in `failure_derive` in order to generate a
 /// custom cause.
 pub trait AsFail {
     /// Converts a reference to `Self` into a dynamic trait object of `Fail`.
-    fn as_fail(&self) -> &Fail;
+    fn as_fail(&self) -> &dyn Fail;
 }
 
 impl<T> AsFail for T
 where
     T: Fail,
 {
-    fn as_fail(&self) -> &Fail {
+    fn as_fail(&self) -> &dyn Fail {
         self
     }
 }
 
-impl AsFail for Fail {
-    fn as_fail(&self) -> &Fail {
+impl AsFail for dyn Fail {
+    fn as_fail(&self) -> &dyn Fail {
         self
     }
 }
 
 with_std! {
     use error::Error;
 
     impl AsFail for Error {
-        fn as_fail(&self) -> &Fail {
+        fn as_fail(&self) -> &dyn Fail {
             self.as_fail()
         }
     }
 }
--- a/third_party/rust/failure/src/backtrace/internal.rs
+++ b/third_party/rust/failure/src/backtrace/internal.rs
@@ -1,12 +1,13 @@
 use std::cell::UnsafeCell;
 use std::env;
 use std::ffi::OsString;
 use std::fmt;
+#[allow(deprecated)] // to allow for older Rust versions (<1.24)
 use std::sync::atomic::{AtomicUsize, ATOMIC_USIZE_INIT, Ordering};
 use std::sync::Mutex;
 
 pub use super::backtrace::Backtrace;
 
 const GENERAL_BACKTRACE: &str = "RUST_BACKTRACE";
 const FAILURE_BACKTRACE: &str = "RUST_FAILURE_BACKTRACE";
 
@@ -19,16 +20,17 @@ struct MaybeResolved {
     backtrace: UnsafeCell<Backtrace>,
 }
 
 unsafe impl Send for MaybeResolved {}
 unsafe impl Sync for MaybeResolved {}
 
 impl InternalBacktrace {
     pub(super) fn new() -> InternalBacktrace {
+        #[allow(deprecated)] // to allow for older Rust versions (<1.24)
         static ENABLED: AtomicUsize = ATOMIC_USIZE_INIT;
 
         match ENABLED.load(Ordering::SeqCst) {
             0 => {
                 let enabled = is_backtrace_enabled(|var| env::var_os(var));
                 ENABLED.store(enabled as usize + 1, Ordering::SeqCst);
                 if !enabled {
                     return InternalBacktrace { backtrace: None }
--- a/third_party/rust/failure/src/backtrace/mod.rs
+++ b/third_party/rust/failure/src/backtrace/mod.rs
@@ -47,16 +47,26 @@ without_backtrace! {
         pub(crate) fn none() -> Backtrace {
             Backtrace { _secret: () }
         }
 
         #[cfg(feature = "std")]
         pub(crate) fn is_none(&self) -> bool {
             true
         }
+
+        /// Returns true if displaying this backtrace would be an empty string.
+        ///
+        /// > (We have detected that this crate was documented with no_std
+        /// > compatibility turned on. The version of this crate that has been
+        /// > documented here will never generate a backtrace and this method
+        /// > will always return true.)
+        pub fn is_empty(&self) -> bool {
+            true
+        }
     }
 
     impl Default for Backtrace {
         fn default() -> Backtrace {
             Backtrace::new()
         }
     }
 
@@ -113,32 +123,37 @@ with_backtrace! {
 
         pub(crate) fn none() -> Backtrace {
             Backtrace { internal: InternalBacktrace::none() }
         }
 
         pub(crate) fn is_none(&self) -> bool {
             self.internal.is_none()
         }
+
+        /// Returns true if displaying this backtrace would be an empty string.
+        pub fn is_empty(&self) -> bool {
+            self.internal.is_none()
+        }
     }
 
     impl Default for Backtrace {
         fn default() -> Backtrace {
             Backtrace::new()
         }
     }
 
     impl Debug for Backtrace {
         fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
             if let Some(bt) = self.internal.as_backtrace() {
-                bt.fmt(f)
+                Debug::fmt(bt, f)
             } else { Ok(()) }
         }
     }
 
     impl Display for Backtrace {
         fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
             if let Some(bt) = self.internal.as_backtrace() {
-                bt.fmt(f)
+                Debug::fmt(bt, f)
             } else { Ok(()) }
         }
     }
 }
--- a/third_party/rust/failure/src/box_std.rs
+++ b/third_party/rust/failure/src/box_std.rs
@@ -1,13 +1,13 @@
 use std::error::Error;
 use std::fmt;
 use Fail;
 
-pub struct BoxStd(pub Box<Error + Send + Sync + 'static>);
+pub struct BoxStd(pub Box<dyn Error + Send + Sync + 'static>);
 
 impl fmt::Display for BoxStd {
     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
         fmt::Display::fmt(&self.0, f)
     }
 }
 
 impl fmt::Debug for BoxStd {
--- a/third_party/rust/failure/src/compat.rs
+++ b/third_party/rust/failure/src/compat.rs
@@ -34,14 +34,20 @@ with_std! {
     use Error;
 
     impl<E: Display + Debug> StdError for Compat<E> {
         fn description(&self) -> &'static str {
             "An error has occurred."
         }
     }
 
-    impl From<Error> for Box<StdError> {
-        fn from(error: Error) -> Box<StdError> {
+    impl From<Error> for Box<dyn StdError> {
+        fn from(error: Error) -> Box<dyn StdError> {
+            Box::new(Compat { error })
+        }
+    }
+
+    impl From<Error> for Box<dyn StdError + Send + Sync> {
+        fn from(error: Error) -> Box<dyn StdError + Send + Sync> {
             Box::new(Compat { error })
         }
     }
 }
--- a/third_party/rust/failure/src/context.rs
+++ b/third_party/rust/failure/src/context.rs
@@ -103,17 +103,21 @@ with_std! {
 
         pub(crate) fn with_err<E: Into<Error>>(context: D, error: E) -> Context<D> {
             let failure = Either::That(error.into());
             Context { context, failure }
         }
     }
 
     impl<D: Display + Send + Sync + 'static> Fail for Context<D> {
-        fn cause(&self) -> Option<&Fail> {
+        fn name(&self) -> Option<&str> {
+            self.failure.as_cause().and_then(|x| x.name())
+        }
+
+        fn cause(&self) -> Option<&dyn Fail> {
             self.failure.as_cause()
         }
 
         fn backtrace(&self) -> Option<&Backtrace> {
             Some(self.failure.backtrace())
         }
     }
 
@@ -137,17 +141,17 @@ with_std! {
     impl Either<Backtrace, Error> {
         fn backtrace(&self) -> &Backtrace {
             match *self {
                 Either::This(ref backtrace) => backtrace,
                 Either::That(ref error)     => error.backtrace(),
             }
         }
 
-        fn as_cause(&self) -> Option<&Fail> {
+        fn as_cause(&self) -> Option<&dyn Fail> {
             match *self {
                 Either::This(_)         => None,
                 Either::That(ref error) => Some(error.as_fail())
             }
         }
     }
 
     impl Debug for Either<Backtrace, Error> {
--- a/third_party/rust/failure/src/error/error_impl.rs
+++ b/third_party/rust/failure/src/error/error_impl.rs
@@ -1,15 +1,15 @@
 use core::any::TypeId;
 
 use Fail;
 use backtrace::Backtrace;
 
 pub(crate) struct ErrorImpl {
-    inner: Box<Inner<Fail>>,
+    inner: Box<Inner<dyn Fail>>,
 }
 
 struct Inner<F: ?Sized + Fail> {
     backtrace: Backtrace,
     pub(crate) failure: F,
 }
 
 impl<F: Fail> From<F> for ErrorImpl {
@@ -20,21 +20,21 @@ impl<F: Fail> From<F> for ErrorImpl {
             } else { Backtrace::none() };
             Inner { failure, backtrace }
         };
         ErrorImpl { inner: Box::new(inner) }
     }
 }
 
 impl ErrorImpl {
-    pub(crate) fn failure(&self) -> &Fail {
+    pub(crate) fn failure(&self) -> &dyn Fail {
         &self.inner.failure
     }
 
-    pub(crate) fn failure_mut(&mut self) -> &mut Fail {
+    pub(crate) fn failure_mut(&mut self) -> &mut dyn Fail {
         &mut self.inner.failure
     }
 
     pub(crate) fn backtrace(&self) -> &Backtrace {
         &self.inner.backtrace
     }
 
     pub(crate) fn downcast<T: Fail>(self) -> Result<T, ErrorImpl> {
--- a/third_party/rust/failure/src/error/mod.rs
+++ b/third_party/rust/failure/src/error/mod.rs
@@ -55,34 +55,39 @@ impl Error {
     ///     Ok(x * 2)
     /// }
     ///
     /// fn library_fn() -> Result<i32, Box<StdError + Sync + Send + 'static>> {
     ///     Ok(92)
     /// }
     /// ```
     #[cfg(feature = "std")]
-    pub fn from_boxed_compat(err: Box<StdError + Sync + Send + 'static>) -> Error {
+    pub fn from_boxed_compat(err: Box<dyn StdError + Sync + Send + 'static>) -> Error {
         Error::from(BoxStd(err))
     }
 
     /// Return a reference to the underlying failure that this `Error`
     /// contains.
-    pub fn as_fail(&self) -> &Fail {
+    pub fn as_fail(&self) -> &dyn Fail {
         self.imp.failure()
     }
 
+    /// Returns the name of the underlying fail.
+    pub fn name(&self) -> Option<&str> {
+        self.as_fail().name()
+    }
+
     /// Returns a reference to the underlying cause of this `Error`. Unlike the
     /// method on `Fail`, this does not return an `Option`. The `Error` type
     /// always has an underlying failure.
     ///
     /// This method has been deprecated in favor of the [Error::as_fail] method,
     /// which does the same thing.
     #[deprecated(since = "0.1.2", note = "please use 'as_fail()' method instead")]
-    pub fn cause(&self) -> &Fail {
+    pub fn cause(&self) -> &dyn Fail {
         self.as_fail()
     }
 
     /// Gets a reference to the `Backtrace` for this `Error`.
     ///
     /// If the failure this wrapped carried a backtrace, that backtrace will
     /// be returned. Otherwise, the backtrace will have been constructed at
     /// the point that failure was cast into the `Error` type.
@@ -123,17 +128,17 @@ impl Error {
     /// the case that the underlying error is of a different type, the
     /// original `Error` is returned.
     pub fn downcast<T: Fail>(self) -> Result<T, Error> {
         self.imp.downcast().map_err(|imp| Error { imp })
     }
 
     /// Returns the "root cause" of this error - the last value in the
     /// cause chain which does not return an underlying `cause`.
-    pub fn find_root_cause(&self) -> &Fail {
+    pub fn find_root_cause(&self) -> &dyn Fail {
         self.as_fail().find_root_cause()
     }
 
     /// Returns a iterator over the causes of this error with the cause
     /// of the fail as the first item and the `root_cause` as the final item.
     ///
     /// Use `iter_chain` to also include the fail of this error itself.
     pub fn iter_causes(&self) -> Causes {
@@ -163,17 +168,17 @@ impl Error {
     ///
     /// If the underlying error is not of type `T`, this will return `None`.
     pub fn downcast_mut<T: Fail>(&mut self) -> Option<&mut T> {
         self.imp.failure_mut().downcast_mut()
     }
 
     /// Deprecated alias to `find_root_cause`.
     #[deprecated(since = "0.1.2", note = "please use the 'find_root_cause()' method instead")]
-    pub fn root_cause(&self) -> &Fail {
+    pub fn root_cause(&self) -> &dyn Fail {
         ::find_root_cause(self.as_fail())
     }
 
     /// Deprecated alias to `iter_causes`.
     #[deprecated(since = "0.1.2", note = "please use the 'iter_chain()' method instead")]
     pub fn causes(&self) -> Causes {
         Causes { fail: Some(self.as_fail()) }
     }
@@ -191,18 +196,18 @@ impl Debug for Error {
         if backtrace.is_none() {
             Debug::fmt(&self.imp.failure(), f)
         } else {
             write!(f, "{:?}\n\n{:?}", &self.imp.failure(), backtrace)
         }
     }
 }
 
-impl AsRef<Fail> for Error {
-    fn as_ref(&self) -> &Fail {
+impl AsRef<dyn Fail> for Error {
+    fn as_ref(&self) -> &dyn Fail {
         self.as_fail()
     }
 }
 
 #[cfg(test)]
 mod test {
     use std::io;
     use super::Error;
--- a/third_party/rust/failure/src/error_message.rs
+++ b/third_party/rust/failure/src/error_message.rs
@@ -14,15 +14,19 @@ pub fn err_msg<D: Display + Debug + Sync
 
 /// A `Fail` type that just contains an error message. You can construct
 /// this from the `err_msg` function.
 #[derive(Debug)]
 struct ErrorMessage<D: Display + Debug + Sync + Send + 'static> {
     msg: D,
 }
 
-impl<D: Display + Debug + Sync + Send + 'static> Fail for ErrorMessage<D> { }
+impl<D: Display + Debug + Sync + Send + 'static> Fail for ErrorMessage<D> {
+    fn name(&self) -> Option<&str> {
+        Some("failure::ErrorMessage")
+    }
+}
 
 impl<D: Display + Debug + Sync + Send + 'static> Display for ErrorMessage<D> {
     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
         Display::fmt(&self.msg, f)
     }
 }
--- a/third_party/rust/failure/src/lib.rs
+++ b/third_party/rust/failure/src/lib.rs
@@ -18,20 +18,17 @@
 //! Backtraces are disabled by default. To turn backtraces on, enable
 //! the `backtrace` Cargo feature and set the `RUST_BACKTRACE` environment
 //! variable to a non-zero value (this also enables backtraces for panics).
 //! Use the `RUST_FAILURE_BACKTRACE` variable to enable or disable backtraces
 //! for `failure` specifically.
 #![cfg_attr(not(feature = "std"), no_std)]
 #![deny(missing_docs)]
 #![deny(warnings)]
-#![cfg_attr(
-    feature = "small-error",
-    feature(extern_types, allocator_api)
-)]
+#![cfg_attr(feature = "small-error", feature(extern_types, allocator_api))]
 
 macro_rules! with_std { ($($i:item)*) => ($(#[cfg(feature = "std")]$i)*) }
 macro_rules! without_std { ($($i:item)*) => ($(#[cfg(not(feature = "std"))]$i)*) }
 
 // Re-export libcore using an alias so that the macros can work without
 // requiring `extern crate core` downstream.
 #[doc(hidden)]
 pub extern crate core as _core;
@@ -104,27 +101,37 @@ with_std! {
 /// may be appropriate to override depending on the definition of your
 /// particular failure: the `cause` and `backtrace` methods.
 ///
 /// The `failure_derive` crate provides a way to derive the `Fail` trait for
 /// your type. Additionally, all types that already implement
 /// `std::error::Error`, and are also `Send`, `Sync`, and `'static`, implement
 /// `Fail` by a blanket impl.
 pub trait Fail: Display + Debug + Send + Sync + 'static {
+    /// Returns the "name" of the error.
+    /// 
+    /// This is typically the type name. Not all errors will implement
+    /// this. This method is expected to be most useful in situations
+    /// where errors need to be reported to external instrumentation systems 
+    /// such as crash reporters.
+    fn name(&self) -> Option<&str> {
+        None
+    }
+
     /// Returns a reference to the underlying cause of this failure, if it
     /// is an error that wraps other errors.
     ///
     /// Returns `None` if this failure does not have another error as its
     /// underlying cause. By default, this returns `None`.
     ///
     /// This should **never** return a reference to `self`, but only return
     /// `Some` when it can return a **different** failure. Users may loop
     /// over the cause chain, and returning `self` would result in an infinite
     /// loop.
-    fn cause(&self) -> Option<&Fail> {
+    fn cause(&self) -> Option<&dyn Fail> {
         None
     }
 
     /// Returns a reference to the `Backtrace` carried by this failure, if it
     /// carries one.
     ///
     /// Returns `None` if this failure does not carry a backtrace. By
     /// default, this returns `None`.
@@ -161,78 +168,75 @@ pub trait Fail: Display + Debug + Send +
     fn compat(self) -> Compat<Self>
     where
         Self: Sized,
     {
         Compat { error: self }
     }
 
     #[doc(hidden)]
-    #[deprecated(
-        since = "0.1.2",
-        note = "please use the 'iter_chain()' method instead"
-    )]
+    #[deprecated(since = "0.1.2", note = "please use the 'iter_chain()' method instead")]
     fn causes(&self) -> Causes
     where
         Self: Sized,
     {
         Causes { fail: Some(self) }
     }
 
     #[doc(hidden)]
     #[deprecated(
         since = "0.1.2",
         note = "please use the 'find_root_cause()' method instead"
     )]
-    fn root_cause(&self) -> &Fail
+    fn root_cause(&self) -> &dyn Fail
     where
         Self: Sized,
     {
         find_root_cause(self)
     }
 
     #[doc(hidden)]
     fn __private_get_type_id__(&self) -> TypeId {
         TypeId::of::<Self>()
     }
 }
 
-impl Fail {
+impl dyn Fail {
     /// Attempts to downcast this failure to a concrete type by reference.
     ///
     /// If the underlying error is not of type `T`, this will return `None`.
     pub fn downcast_ref<T: Fail>(&self) -> Option<&T> {
         if self.__private_get_type_id__() == TypeId::of::<T>() {
-            unsafe { Some(&*(self as *const Fail as *const T)) }
+            unsafe { Some(&*(self as *const dyn Fail as *const T)) }
         } else {
             None
         }
     }
 
     /// Attempts to downcast this failure to a concrete type by mutable
     /// reference.
     ///
     /// If the underlying error is not of type `T`, this will return `None`.
     pub fn downcast_mut<T: Fail>(&mut self) -> Option<&mut T> {
         if self.__private_get_type_id__() == TypeId::of::<T>() {
-            unsafe { Some(&mut *(self as *mut Fail as *mut T)) }
+            unsafe { Some(&mut *(self as *mut dyn Fail as *mut T)) }
         } else {
             None
         }
     }
 
     /// Returns the "root cause" of this `Fail` - the last value in the
     /// cause chain which does not return an underlying `cause`.
     ///
     /// If this type does not have a cause, `self` is returned, because
     /// it is its own root cause.
     ///
     /// This is equivalent to iterating over `iter_causes()` and taking
     /// the last item.
-    pub fn find_root_cause(&self) -> &Fail {
+    pub fn find_root_cause(&self) -> &dyn Fail {
         find_root_cause(self)
     }
 
     /// Returns a iterator over the causes of this `Fail` with the cause
     /// of this fail as the first item and the `root_cause` as the final item.
     ///
     /// Use `iter_chain` to also include the fail itself.
     pub fn iter_causes(&self) -> Causes {
@@ -249,58 +253,55 @@ impl Fail {
         Causes { fail: Some(self) }
     }
 
     /// Deprecated alias to `find_root_cause`.
     #[deprecated(
         since = "0.1.2",
         note = "please use the 'find_root_cause()' method instead"
     )]
-    pub fn root_cause(&self) -> &Fail {
+    pub fn root_cause(&self) -> &dyn Fail {
         find_root_cause(self)
     }
 
     /// Deprecated alias to `iter_chain`.
-    #[deprecated(
-        since = "0.1.2",
-        note = "please use the 'iter_chain()' method instead"
-    )]
+    #[deprecated(since = "0.1.2", note = "please use the 'iter_chain()' method instead")]
     pub fn causes(&self) -> Causes {
         Causes { fail: Some(self) }
     }
 }
 
 #[cfg(feature = "std")]
 impl<E: StdError + Send + Sync + 'static> Fail for E {}
 
 #[cfg(feature = "std")]
-impl Fail for Box<Fail> {
-    fn cause(&self) -> Option<&Fail> {
+impl Fail for Box<dyn Fail> {
+    fn cause(&self) -> Option<&dyn Fail> {
         (**self).cause()
     }
 
     fn backtrace(&self) -> Option<&Backtrace> {
         (**self).backtrace()
     }
 }
 
 /// A iterator over the causes of a `Fail`
 pub struct Causes<'f> {
-    fail: Option<&'f Fail>,
+    fail: Option<&'f dyn Fail>,
 }
 
 impl<'f> Iterator for Causes<'f> {
-    type Item = &'f Fail;
-    fn next(&mut self) -> Option<&'f Fail> {
+    type Item = &'f dyn Fail;
+    fn next(&mut self) -> Option<&'f dyn Fail> {
         self.fail.map(|fail| {
             self.fail = fail.cause();
             fail
         })
     }
 }
 
-fn find_root_cause(mut fail: &Fail) -> &Fail {
+fn find_root_cause(mut fail: &dyn Fail) -> &dyn Fail {
     while let Some(cause) = fail.cause() {
         fail = cause;
     }
 
     fail
 }
--- a/third_party/rust/failure/src/macros.rs
+++ b/third_party/rust/failure/src/macros.rs
@@ -6,40 +6,53 @@
 /// ```rust,ignore
 /// return Err(format_err!(X))
 /// ```
 #[macro_export]
 macro_rules! bail {
     ($e:expr) => {
         return Err($crate::err_msg($e));
     };
-    ($fmt:expr, $($arg:tt)+) => {
-        return Err($crate::err_msg(format!($fmt, $($arg)+)));
+    ($fmt:expr, $($arg:tt)*) => {
+        return Err($crate::err_msg(format!($fmt, $($arg)*)));
     };
 }
 
 /// Exits a function early with an `Error` if the condition is not satisfied.
 ///
 /// Similar to `assert!`, `ensure!` takes a condition and exits the function
 /// if the condition fails. Unlike `assert!`, `ensure!` returns an `Error`,
 /// it does not panic.
 #[macro_export(local_inner_macros)]
 macro_rules! ensure {
+    ($cond:expr) => {
+        if !($cond) {
+            bail!("{}", _failure__stringify!($cond));
+        }
+    };
     ($cond:expr, $e:expr) => {
         if !($cond) {
             bail!($e);
         }
     };
-    ($cond:expr, $fmt:expr, $($arg:tt)+) => {
+    ($cond:expr, $fmt:expr, $($arg:tt)*) => {
         if !($cond) {
-            bail!($fmt, $($arg)+);
+            bail!($fmt, $($arg)*);
         }
     };
 }
 
+#[doc(hidden)]
+#[macro_export]
+macro_rules! _failure__stringify {
+    ($($inner:tt)*) => {
+        stringify! { $($inner)* }
+    }
+}
+
 /// Constructs an `Error` using the standard string interpolation syntax.
 ///
 /// ```rust
 /// #[macro_use] extern crate failure;
 ///
 /// fn main() {
 ///     let code = 101;
 ///     let err = format_err!("Error code: {}", code);
new file mode 100644
--- /dev/null
+++ b/third_party/rust/failure/tests/basic_fail.rs
@@ -0,0 +1,21 @@
+#[macro_use]
+extern crate failure;
+
+use failure::Fail;
+
+#[test]
+fn test_name() {
+    #[derive(Fail, Debug)]
+    #[fail(display = "my error")]
+    struct MyError;
+
+    let err = MyError;
+
+    assert_eq!(err.to_string(), "my error");
+    assert_eq!(err.name(), Some("basic_fail::MyError"));
+
+    let ctx = err.context("whatever");
+
+    assert_eq!(ctx.to_string(), "whatever");
+    assert_eq!(ctx.name(), Some("basic_fail::MyError"));
+}
\ No newline at end of file
new file mode 100644
--- /dev/null
+++ b/third_party/rust/failure/tests/fail_compat.rs
@@ -0,0 +1,35 @@
+#[macro_use]
+extern crate failure;
+
+use failure::Fail;
+
+fn return_failure() -> Result<(), failure::Error> {
+    #[derive(Fail, Debug)]
+    #[fail(display = "my error")]
+    struct MyError;
+
+    let err = MyError;
+    Err(err.into())
+}
+
+fn return_error() -> Result<(), Box<dyn std::error::Error>> {
+    return_failure()?;
+    Ok(())
+}
+
+fn return_error_send_sync() -> Result<(), Box<dyn std::error::Error + Send + Sync>> {
+    return_failure()?;
+    Ok(())
+}
+
+#[test]
+fn smoke_default_compat() {
+    let err = return_error();
+    assert!(err.is_err());
+}
+
+#[test]
+fn smoke_compat_send_sync() {
+    let err = return_error_send_sync();
+    assert!(err.is_err());
+}
new file mode 100644
--- /dev/null
+++ b/third_party/rust/failure/tests/macro_trailing_comma.rs
@@ -0,0 +1,67 @@
+#[macro_use]
+extern crate failure;
+
+// NOTE:
+//
+// This test is in a separate file due to the fact that ensure! cannot be used
+// from within failure.
+//
+// (you get: 'macro-expanded `macro_export` macros from the current crate cannot
+//           be referred to by absolute paths')
+
+// Encloses an early-returning macro in an IIFE so that we
+// can treat it as a Result-returning function.
+macro_rules! wrap_early_return {
+    ($expr:expr) => {{
+        fn func() -> Result<(), failure::Error> {
+            let _ = $expr;
+
+            #[allow(unreachable_code)]
+            Ok(())
+        }
+        func().map_err(|e| e.to_string())
+    }};
+}
+
+#[test]
+fn bail() {
+    assert_eq!(
+        wrap_early_return!(bail!("test")),
+        wrap_early_return!(bail!("test",)));
+    assert_eq!(
+        wrap_early_return!(bail!("test {}", 4)),
+        wrap_early_return!(bail!("test {}", 4,)));
+}
+
+#[test]
+fn ensure() {
+    assert_eq!(
+        wrap_early_return!(ensure!(false, "test")),
+        wrap_early_return!(ensure!(false, "test",)));
+    assert_eq!(
+        wrap_early_return!(ensure!(false, "test {}", 4)),
+        wrap_early_return!(ensure!(false, "test {}", 4,)));
+}
+
+#[test]
+fn single_arg_ensure() {
+    assert_eq!(
+        wrap_early_return!(ensure!(false)),
+        Err("false".to_string()));
+    assert_eq!(
+        wrap_early_return!(ensure!(true == false)),
+        Err("true == false".to_string()));
+    assert_eq!(
+        wrap_early_return!(ensure!(4 == 5)),
+        Err("4 == 5".to_string()));
+}
+
+#[test]
+fn format_err() {
+    assert_eq!(
+        format_err!("test").to_string(),
+        format_err!("test",).to_string());
+    assert_eq!(
+        format_err!("test {}", 4).to_string(),
+        format_err!("test {}", 4,).to_string());
+}
--- a/third_party/rust/failure_derive/.cargo-checksum.json
+++ b/third_party/rust/failure_derive/.cargo-checksum.json
@@ -1,1 +1,1 @@
-{"files":{"Cargo.toml":"e00026aba3492ad169fcb6123e896280d679ffb9a198c6830052c99df3246142","build.rs":"c7481c027fc4c09e2d6dc8ac642ec5314b6a02269fb022b0f3c1850f000d31f5","src/lib.rs":"833b9916cd18b2e0b4fa79cc795afd00089697be7a25bf6895e85ed4cef97916","tests/backtrace.rs":"56b2b97f83e5341108aac403a50491560dc6d897d6002973248c9c9014c0e494","tests/custom_type_bounds.rs":"745d3e488738f5d90bcb1fa66a6784b64a88881b1d62c241cba2f863f4eb31c8","tests/no_derive_display.rs":"3ab159aadf809a95d578b4909470f6ecca24cea0caf514509d326601cc7b933b","tests/tests.rs":"eaf131c01cc101b94fd6478a9964f5e3d919f2260f6d327f0e435ac3520fe71e","tests/wraps.rs":"e00c2761ccd9fe84df47bd102945818f5d8868c95bcab719ebdde0db8334d4a6"},"package":"64c2d913fe8ed3b6c6518eedf4538255b989945c14c2a7d5cbff62a5e2120596"}
\ No newline at end of file
+{"files":{"Cargo.toml":"3fe281152af8a1081e0816949e3e476d3c991341c1a294c064414345aa6bc995","build.rs":"c7481c027fc4c09e2d6dc8ac642ec5314b6a02269fb022b0f3c1850f000d31f5","src/lib.rs":"c446d83b42f5aca4453da4e2dd8e40dbfe9aa33ba1a038217174ece5158b7196","tests/backtrace.rs":"56b2b97f83e5341108aac403a50491560dc6d897d6002973248c9c9014c0e494","tests/custom_type_bounds.rs":"745d3e488738f5d90bcb1fa66a6784b64a88881b1d62c241cba2f863f4eb31c8","tests/no_derive_display.rs":"3ab159aadf809a95d578b4909470f6ecca24cea0caf514509d326601cc7b933b","tests/tests.rs":"eaf131c01cc101b94fd6478a9964f5e3d919f2260f6d327f0e435ac3520fe71e","tests/wraps.rs":"cc2bc5a5555756082ec570afa310939ba7f74a20898991a89fab75232380fd21"},"package":"0bc225b78e0391e4b8683440bf2e63c2deeeb2ce5189eab46e2b68c6d3725d08"}
\ No newline at end of file
--- a/third_party/rust/failure_derive/Cargo.toml
+++ b/third_party/rust/failure_derive/Cargo.toml
@@ -1,41 +1,41 @@
 # THIS FILE IS AUTOMATICALLY GENERATED BY CARGO
 #
 # When uploading crates to the registry Cargo will automatically
 # "normalize" Cargo.toml files for maximal compatibility
 # with all versions of Cargo and also rewrite `path` dependencies
-# to registry (e.g. crates.io) dependencies
+# to registry (e.g., crates.io) dependencies
 #
 # If you believe there's an error in this file please file an
 # issue against the rust-lang/cargo repository. If you're
 # editing this file be aware that the upstream Cargo.toml
 # will likely look very different (and much more reasonable)
 
 [package]
 name = "failure_derive"
-version = "0.1.3"
+version = "0.1.6"
 authors = ["Without Boats <woboats@gmail.com>"]
 build = "build.rs"
 description = "derives for the failure crate"
-homepage = "https://boats.gitlab.io/failure"
-documentation = "https://boats.gitlab.io/failure"
+homepage = "https://rust-lang-nursery.github.io/failure/"
+documentation = "https://docs.rs/failure"
 license = "MIT OR Apache-2.0"
 repository = "https://github.com/withoutboats/failure_derive"
 
 [lib]
 proc-macro = true
 [dependencies.proc-macro2]
-version = "0.4.8"
+version = "1"
 
 [dependencies.quote]
-version = "0.6.3"
+version = "1"
 
 [dependencies.syn]
-version = "0.15.0"
+version = "1.0.3"
 
 [dependencies.synstructure]
-version = "0.10.0"
+version = "0.12.0"
 [dev-dependencies.failure]
 version = "0.1.0"
 
 [features]
 std = []
--- a/third_party/rust/failure_derive/src/lib.rs
+++ b/third_party/rust/failure_derive/src/lib.rs
@@ -1,27 +1,59 @@
 extern crate proc_macro2;
 extern crate syn;
 
 #[macro_use]
 extern crate synstructure;
 #[macro_use]
 extern crate quote;
 
-use proc_macro2::TokenStream;
+use proc_macro2::{TokenStream, Span};
+use syn::LitStr;
+use syn::spanned::Spanned;
+
+#[derive(Debug)]
+struct Error(TokenStream);
+
+impl Error {
+    fn new(span: Span, message: &str) -> Error {
+        Error(quote_spanned! { span =>
+            compile_error!(#message);
+        })
+    }
+
+    fn into_tokens(self) -> TokenStream {
+        self.0
+    }
+}
+
+impl From<syn::Error> for Error {
+    fn from(e: syn::Error) -> Error {
+        Error(e.to_compile_error())
+    }
+}
 
 decl_derive!([Fail, attributes(fail, cause)] => fail_derive);
 
 fn fail_derive(s: synstructure::Structure) -> TokenStream {
+    match fail_derive_impl(s) {
+        Err(err) => err.into_tokens(),
+        Ok(tokens) => tokens,
+    }
+}
+
+fn fail_derive_impl(s: synstructure::Structure) -> Result<TokenStream, Error> {
     let make_dyn = if cfg!(has_dyn_trait) {
         quote! { &dyn }
     } else {
         quote! { & }
     };
 
+    let ty_name = LitStr::new(&s.ast().ident.to_string(), Span::call_site());
+
     let cause_body = s.each_variant(|v| {
         if let Some(cause) = v.bindings().iter().find(is_cause) {
             quote!(return Some(::failure::AsFail::as_fail(#cause)))
         } else {
             quote!(return None)
         }
     });
 
@@ -31,165 +63,199 @@ fn fail_derive(s: synstructure::Structur
         } else {
             quote!(return None)
         }
     });
 
     let fail = s.unbound_impl(
         quote!(::failure::Fail),
         quote! {
+            fn name(&self) -> Option<&str> {
+                Some(concat!(module_path!(), "::", #ty_name))
+            }
+
             #[allow(unreachable_code)]
             fn cause(&self) -> ::failure::_core::option::Option<#make_dyn(::failure::Fail)> {
                 match *self { #cause_body }
                 None
             }
 
             #[allow(unreachable_code)]
             fn backtrace(&self) -> ::failure::_core::option::Option<&::failure::Backtrace> {
                 match *self { #bt_body }
                 None
             }
         },
     );
-    let display = display_body(&s).map(|display_body| {
+    let display = display_body(&s)?.map(|display_body| {
         s.unbound_impl(
             quote!(::failure::_core::fmt::Display),
             quote! {
                 #[allow(unreachable_code)]
                 fn fmt(&self, f: &mut ::failure::_core::fmt::Formatter) -> ::failure::_core::fmt::Result {
                     match *self { #display_body }
                     write!(f, "An error has occurred.")
                 }
             },
         )
     });
 
-    (quote! {
+    Ok(quote! {
         #fail
         #display
-    }).into()
+    })
 }
 
-fn display_body(s: &synstructure::Structure) -> Option<quote::__rt::TokenStream> {
+fn display_body(s: &synstructure::Structure) -> Result<Option<quote::__rt::TokenStream>, Error> {
     let mut msgs = s.variants().iter().map(|v| find_error_msg(&v.ast().attrs));
-    if msgs.all(|msg| msg.is_none()) {
-        return None;
+    if msgs.all(|msg| msg.map(|m| m.is_none()).unwrap_or(true)) {
+        return Ok(None);
     }
 
-    Some(s.each_variant(|v| {
+    let mut tokens = TokenStream::new();
+    for v in s.variants() {
         let msg =
-            find_error_msg(&v.ast().attrs).expect("All variants must have display attribute.");
+            find_error_msg(&v.ast().attrs)?
+              .ok_or_else(|| Error::new(
+                  v.ast().ident.span(),
+                  "All variants must have display attribute."
+              ))?;
         if msg.nested.is_empty() {
-            panic!("Expected at least one argument to fail attribute");
+            return Err(Error::new(
+                msg.span(),
+                "Expected at least one argument to fail attribute"
+            ));
         }
 
         let format_string = match msg.nested[0] {
-            syn::NestedMeta::Meta(syn::Meta::NameValue(ref nv)) if nv.ident == "display" => {
+            syn::NestedMeta::Meta(syn::Meta::NameValue(ref nv)) if nv.path.is_ident("display") => {
                 nv.lit.clone()
             }
             _ => {
-                panic!("Fail attribute must begin `display = \"\"` to control the Display message.")
+                return Err(Error::new(
+                    msg.span(),
+                    "Fail attribute must begin `display = \"\"` to control the Display message."
+                ));
             }
         };
         let args = msg.nested.iter().skip(1).map(|arg| match *arg {
-            syn::NestedMeta::Literal(syn::Lit::Int(ref i)) => {
-                let bi = &v.bindings()[i.value() as usize];
-                quote!(#bi)
+            syn::NestedMeta::Lit(syn::Lit::Int(ref i)) => {
+                let bi = &v.bindings()[i.base10_parse::<usize>()?];
+                Ok(quote!(#bi))
             }
-            syn::NestedMeta::Meta(syn::Meta::Word(ref id)) => {
-                let id_s = id.to_string();
+            syn::NestedMeta::Meta(syn::Meta::Path(ref path)) => {
+                let id_s = path.get_ident().map(syn::Ident::to_string).unwrap_or("".to_string());
                 if id_s.starts_with("_") {
                     if let Ok(idx) = id_s[1..].parse::<usize>() {
                         let bi = match v.bindings().get(idx) {
                             Some(bi) => bi,
                             None => {
-                                panic!(
-                                    "display attempted to access field `{}` in `{}::{}` which \
+                                return Err(Error::new(
+                                    arg.span(),
+                                    &format!(
+                                        "display attempted to access field `{}` in `{}::{}` which \
                                      does not exist (there are {} field{})",
-                                    idx,
-                                    s.ast().ident,
-                                    v.ast().ident,
-                                    v.bindings().len(),
-                                    if v.bindings().len() != 1 { "s" } else { "" }
-                                );
+                                        idx,
+                                        s.ast().ident,
+                                        v.ast().ident,
+                                        v.bindings().len(),
+                                        if v.bindings().len() != 1 { "s" } else { "" }
+                                    )
+                                ));
                             }
                         };
-                        return quote!(#bi);
+                        return Ok(quote!(#bi));
                     }
                 }
                 for bi in v.bindings() {
-                    if bi.ast().ident.as_ref() == Some(id) {
-                        return quote!(#bi);
+                    let id = bi.ast().ident.as_ref();
+                    if id.is_some() && path.is_ident(id.unwrap()) {
+                        return Ok(quote!(#bi));
                     }
                 }
-                panic!(
-                    "Couldn't find field `{}` in `{}::{}`",
-                    id,
-                    s.ast().ident,
-                    v.ast().ident
-                );
+                return Err(Error::new(
+                    arg.span(),
+                    &format!(
+                        "Couldn't find field `{:?}` in `{}::{}`",
+                        path,
+                        s.ast().ident,
+                        v.ast().ident
+                    )
+                ));
             }
-            _ => panic!("Invalid argument to fail attribute!"),
+            ref arg => {
+                return Err(Error::new(
+                    arg.span(),
+                    "Invalid argument to fail attribute!"
+                ));
+            },
         });
+        let args = args.collect::<Result<Vec<_>, _>>()?;
 
-        quote! {
-            return write!(f, #format_string #(, #args)*)
-        }
-    }))
+        let pat = v.pat();
+        tokens.extend(quote!(#pat => { return write!(f, #format_string #(, #args)*) }));
+    }
+    Ok(Some(tokens))
 }
 
-fn find_error_msg(attrs: &[syn::Attribute]) -> Option<syn::MetaList> {
+fn find_error_msg(attrs: &[syn::Attribute]) -> Result<Option<syn::MetaList>, Error> {
     let mut error_msg = None;
     for attr in attrs {
-        if let Some(meta) = attr.interpret_meta() {
-            if meta.name() == "fail" {
+        if let Ok(meta) = attr.parse_meta() {
+            if meta.path().is_ident("fail") {
                 if error_msg.is_some() {
-                    panic!("Cannot have two display attributes")
+                    return Err(Error::new(
+                        meta.span(),
+                        "Cannot have two display attributes"
+                    ));
                 } else {
                     if let syn::Meta::List(list) = meta {
                         error_msg = Some(list);
                     } else {
-                        panic!("fail attribute must take a list in parentheses")
+                        return Err(Error::new(
+                            meta.span(),
+                            "fail attribute must take a list in parentheses"
+                        ));
                     }
                 }
             }
         }
     }
-    error_msg
+    Ok(error_msg)
 }
 
 fn is_backtrace(bi: &&synstructure::BindingInfo) -> bool {
     match bi.ast().ty {
         syn::Type::Path(syn::TypePath {
             qself: None,
             path: syn::Path {
                 segments: ref path, ..
             },
         }) => path.last().map_or(false, |s| {
-            s.value().ident == "Backtrace" && s.value().arguments.is_empty()
+            s.ident == "Backtrace" && s.arguments.is_empty()
         }),
         _ => false,
     }
 }
 
 fn is_cause(bi: &&synstructure::BindingInfo) -> bool {
     let mut found_cause = false;
     for attr in &bi.ast().attrs {
-        if let Some(meta) = attr.interpret_meta() {
-            if meta.name() == "cause" {
+        if let Ok(meta) = attr.parse_meta() {
+            if meta.path().is_ident("cause") {
                 if found_cause {
                     panic!("Cannot have two `cause` attributes");
                 }
                 found_cause = true;
             }
-            if meta.name() == "fail" {
+            if meta.path().is_ident("fail") {
                 if let syn::Meta::List(ref list) = meta {
                     if let Some(ref pair) = list.nested.first() {
-                        if let &&syn::NestedMeta::Meta(syn::Meta::Word(ref word)) = pair.value() {
-                            if word == "cause" {
+                        if let &&syn::NestedMeta::Meta(syn::Meta::Path(ref path)) = pair {
+                            if path.is_ident("cause") {
                                 if found_cause {
                                     panic!("Cannot have two `cause` attributes");
                                 }
                                 found_cause = true;
                             }
                         }
                     }
                 }
--- a/third_party/rust/failure_derive/tests/wraps.rs
+++ b/third_party/rust/failure_derive/tests/wraps.rs
@@ -13,36 +13,34 @@ struct WrapError {
     #[fail(cause)]
     inner: io::Error,
 }
 
 #[test]
 fn wrap_error() {
     let inner = io::Error::from_raw_os_error(98);
     let err = WrapError { inner };
-    assert!(
-        err.cause()
-            .and_then(|err| err.downcast_ref::<io::Error>())
-            .is_some()
-    );
+    assert!(err
+        .cause()
+        .and_then(|err| err.downcast_ref::<io::Error>())
+        .is_some());
 }
 
 #[derive(Fail, Debug)]
 #[fail(display = "An error has occurred: {}", _0)]
 struct WrapTupleError(#[fail(cause)] io::Error);
 
 #[test]
 fn wrap_tuple_error() {
     let io_error = io::Error::from_raw_os_error(98);
     let err: WrapTupleError = WrapTupleError(io_error);
-    assert!(
-        err.cause()
-            .and_then(|err| err.downcast_ref::<io::Error>())
-            .is_some()
-    );
+    assert!(err
+        .cause()
+        .and_then(|err| err.downcast_ref::<io::Error>())
+        .is_some());
 }
 
 #[derive(Fail, Debug)]
 #[fail(display = "An error has occurred: {}", inner)]
 struct WrapBacktraceError {
     #[fail(cause)]
     inner: io::Error,
     backtrace: Backtrace,
@@ -50,22 +48,23 @@ struct WrapBacktraceError {
 
 #[test]
 fn wrap_backtrace_error() {
     let inner = io::Error::from_raw_os_error(98);
     let err: WrapBacktraceError = WrapBacktraceError {
         inner,
         backtrace: Backtrace::new(),
     };
-    assert!(
-        err.cause()
-            .and_then(|err| err.downcast_ref::<io::Error>())
-            .is_some()
-    );
+    assert!(err
+        .cause()
+        .and_then(|err| err.downcast_ref::<io::Error>())
+        .is_some());
     assert!(err.backtrace().is_some());
+    assert!(err.backtrace().unwrap().is_empty());
+    assert!(err.backtrace().unwrap().to_string().trim().is_empty());
 }
 
 #[derive(Fail, Debug)]
 enum WrapEnumError {
     #[fail(display = "An error has occurred: {}", _0)]
     Io(#[fail(cause)] io::Error),
     #[fail(display = "An error has occurred: {}", inner)]
     Fmt {
@@ -74,26 +73,26 @@ enum WrapEnumError {
         backtrace: Backtrace,
     },
 }
 
 #[test]
 fn wrap_enum_error() {
     let io_error = io::Error::from_raw_os_error(98);
     let err: WrapEnumError = WrapEnumError::Io(io_error);
-    assert!(
-        err.cause()
-            .and_then(|err| err.downcast_ref::<io::Error>())
-            .is_some()
-    );
+    assert!(err
+        .cause()
+        .and_then(|err| err.downcast_ref::<io::Error>())
+        .is_some());
     assert!(err.backtrace().is_none());
     let fmt_error = fmt::Error::default();
     let err: WrapEnumError = WrapEnumError::Fmt {
         inner: fmt_error,
         backtrace: Backtrace::new(),
     };
-    assert!(
-        err.cause()
-            .and_then(|err| err.downcast_ref::<fmt::Error>())
-            .is_some()
-    );
+    assert!(err
+        .cause()
+        .and_then(|err| err.downcast_ref::<fmt::Error>())
+        .is_some());
     assert!(err.backtrace().is_some());
+    assert!(err.backtrace().unwrap().is_empty());
+    assert!(err.backtrace().unwrap().to_string().trim().is_empty());
 }
--- a/third_party/rust/malloc_size_of_derive/.cargo-checksum.json
+++ b/third_party/rust/malloc_size_of_derive/.cargo-checksum.json
@@ -1,1 +1,1 @@
-{"files":{"Cargo.toml":"ca54d29c0cfac91471c60317233978b7e23f4d82537b3116431f681b44f98b33","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"23f18e03dc49df91622fe2a76176497404e46ced8a715d9d2b67a7446571cca3","README.md":"c6f47e3c516f7dfc1b0eeaa999e557ec129cb0bbe2e70d712293d56af09141c3","lib.rs":"d0aec9f3ccc0a86d4d8979baa7b8c334e211878b12f1a3df9c6489b786894f03"},"package":"35adee9ed962cf7d07d62cb58bc45029f3227f5b5b86246caa8632f06c187bc3"}
\ No newline at end of file
+{"files":{"Cargo.toml":"8dd7d4c64162814f1633a91c8705ce70e3821da10b1571c7f5702d9985c7e54d","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"23f18e03dc49df91622fe2a76176497404e46ced8a715d9d2b67a7446571cca3","README.md":"c6f47e3c516f7dfc1b0eeaa999e557ec129cb0bbe2e70d712293d56af09141c3","lib.rs":"222afac401a8cb257b30c45afb844f61d06bb031c999f8b2d45992163fbd7706"},"package":"e37c5d4cd9473c5f4c9c111f033f15d4df9bd378fdf615944e360a4f55a05f0b"}
\ No newline at end of file
--- a/third_party/rust/malloc_size_of_derive/Cargo.toml
+++ b/third_party/rust/malloc_size_of_derive/Cargo.toml
@@ -1,32 +1,32 @@
 # THIS FILE IS AUTOMATICALLY GENERATED BY CARGO
 #
 # When uploading crates to the registry Cargo will automatically
 # "normalize" Cargo.toml files for maximal compatibility
 # with all versions of Cargo and also rewrite `path` dependencies
-# to registry (e.g. crates.io) dependencies
+# to registry (e.g., crates.io) dependencies
 #
 # If you believe there's an error in this file please file an
 # issue against the rust-lang/cargo repository. If you're
 # editing this file be aware that the upstream Cargo.toml
 # will likely look very different (and much more reasonable)
 
 [package]
 name = "malloc_size_of_derive"
-version = "0.1.0"
+version = "0.1.1"
 authors = ["The Servo Project Developers"]
 description = "Crate for Firefox memory reporting, not intended for external use"
 license = "MIT/Apache-2.0"
 repository = "https://github.com/bholley/malloc_size_of_derive"
 
 [lib]
 path = "lib.rs"
 proc-macro = true
 [dependencies.proc-macro2]
-version = "0.4"
+version = "1"
 
 [dependencies.syn]
-version = "0.15"
+version = "1"
 features = ["full"]
 
 [dependencies.synstructure]
-version = "0.10"
+version = "0.12"
--- a/third_party/rust/malloc_size_of_derive/lib.rs
+++ b/third_party/rust/malloc_size_of_derive/lib.rs
@@ -20,27 +20,27 @@ extern crate synstructure;
 decl_derive!([MallocSizeOf, attributes(ignore_malloc_size_of)] => malloc_size_of_derive);
 
 fn malloc_size_of_derive(s: synstructure::Structure) -> proc_macro2::TokenStream {
     let match_body = s.each(|binding| {
         let ignore = binding
             .ast()
             .attrs
             .iter()
-            .any(|attr| match attr.interpret_meta().unwrap() {
-                syn::Meta::Word(ref ident) | syn::Meta::List(syn::MetaList { ref ident, .. })
-                    if ident == "ignore_malloc_size_of" =>
+            .any(|attr| match attr.parse_meta().unwrap() {
+                syn::Meta::Path(ref path) | syn::Meta::List(syn::MetaList { ref path, .. })
+                    if path.is_ident("ignore_malloc_size_of") =>
                 {
                     panic!(
                         "#[ignore_malloc_size_of] should have an explanation, \
                          e.g. #[ignore_malloc_size_of = \"because reasons\"]"
                     );
                 }
-                syn::Meta::NameValue(syn::MetaNameValue { ref ident, .. })
-                    if ident == "ignore_malloc_size_of" =>
+                syn::Meta::NameValue(syn::MetaNameValue { ref path, .. })
+                    if path.is_ident("ignore_malloc_size_of") =>
                 {
                     true
                 },
                 _ => false,
             });
         if ignore {
             None
         } else if let syn::Type::Array(..) = binding.ast().ty {
deleted file mode 100644
--- a/third_party/rust/synstructure-0.10.1/.cargo-checksum.json
+++ /dev/null
@@ -1,1 +0,0 @@
-{"files":{"Cargo.toml":"e36eaee82d5b5aa7864148b96c363f1aa05676de4537d914b244446b685d23c0","LICENSE":"219920e865eee70b7dcfc948a86b099e7f4fe2de01bcca2ca9a20c0a033f2b59","README.md":"1ae9f6797e1affc45eaafac10cd5e2b68f4b7d9463c38d61bccbfb1115523bb1","src/lib.rs":"30ddc0d6d750328f146985d90c8a8e873f4105363722c31f16f466013c58cf82","src/macros.rs":"0db8830809f1e0e9f72767e3a0d45d8bd3f5be78ad20dc6e083e3b80fadebf60"},"package":"73687139bf99285483c96ac0add482c3776528beac1d97d444f6e91f203a2015"}
\ No newline at end of file
deleted file mode 100644
--- a/third_party/rust/synstructure-0.10.1/Cargo.toml
+++ /dev/null
@@ -1,40 +0,0 @@
-# THIS FILE IS AUTOMATICALLY GENERATED BY CARGO
-#
-# When uploading crates to the registry Cargo will automatically
-# "normalize" Cargo.toml files for maximal compatibility
-# with all versions of Cargo and also rewrite `path` dependencies
-# to registry (e.g. crates.io) dependencies
-#
-# If you believe there's an error in this file please file an
-# issue against the rust-lang/cargo repository. If you're
-# editing this file be aware that the upstream Cargo.toml
-# will likely look very different (and much more reasonable)
-
-[package]
-name = "synstructure"
-version = "0.10.1"
-authors = ["Nika Layzell <nika@thelayzells.com>"]
-include = ["src/**/*", "Cargo.toml", "README.md", "LICENSE"]
-description = "Helper methods and macros for custom derives"
-documentation = "https://docs.rs/synstructure"
-readme = "README.md"
-keywords = ["syn", "macros", "derive", "expand_substructure", "enum"]
-license = "MIT"
-repository = "https://github.com/mystor/synstructure"
-[dependencies.proc-macro2]
-version = "0.4"
-
-[dependencies.quote]
-version = "0.6"
-
-[dependencies.syn]
-version = "0.15"
-features = ["visit", "extra-traits"]
-
-[dependencies.unicode-xid]
-version = "0.1"
-[dev-dependencies.synstructure_test_traits]
-version = "0.1"
-
-[features]
-simple-derive = []
deleted file mode 100644
--- a/third_party/rust/synstructure-0.10.1/LICENSE
+++ /dev/null
@@ -1,7 +0,0 @@
-Copyright 2016 Nika Layzell
-
-Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
deleted file mode 100644
--- a/third_party/rust/synstructure-0.10.1/README.md
+++ /dev/null
@@ -1,159 +0,0 @@
-# synstructure
-
-[![Latest Version](https://img.shields.io/crates/v/synstructure.svg)](https://crates.io/crates/synstructure)
-[![Documentation](https://docs.rs/synstructure/badge.svg)](https://docs.rs/synstructure)
-[![Build Status](https://travis-ci.org/mystor/synstructure.svg?branch=master)](https://travis-ci.org/mystor/synstructure)
-[![Rustc Version 1.15+](https://img.shields.io/badge/rustc-1.15+-lightgray.svg)](https://blog.rust-lang.org/2017/02/02/Rust-1.15.html)
-
-> NOTE: What follows is an exerpt from the module level documentation. For full
-> details read the docs on [docs.rs](https://docs.rs/synstructure/)
-
-This crate provides helper types for matching against enum variants, and
-extracting bindings to each of the fields in the deriving Struct or Enum in
-a generic way.
-
-If you are writing a `#[derive]` which needs to perform some operation on
-every field, then you have come to the right place!
-
-# Example: `WalkFields`
-### Trait Implementation
-```rust
-pub trait WalkFields: std::any::Any {
-    fn walk_fields(&self, walk: &mut FnMut(&WalkFields));
-}
-impl WalkFields for i32 {
-    fn walk_fields(&self, _walk: &mut FnMut(&WalkFields)) {}
-}
-```
-
-### Custom Derive
-```rust
-#[macro_use]
-extern crate synstructure;
-#[macro_use]
-extern crate quote;
-extern crate proc_macro2;
-
-fn walkfields_derive(s: synstructure::Structure) -> proc_macro2::TokenStream {
-    let body = s.each(|bi| quote!{
-        walk(#bi)
-    });
-
-    s.bound_impl(quote!(example_traits::WalkFields), quote!{
-        fn walk_fields(&self, walk: &mut FnMut(&example_traits::WalkFields)) {
-            match *self { #body }
-        }
-    })
-}
-decl_derive!([WalkFields] => walkfields_derive);
-
-/*
- * Test Case
- */
-fn main() {
-    test_derive! {
-        walkfields_derive {
-            enum A<T> {
-                B(i32, T),
-                C(i32),
-            }
-        }
-        expands to {
-            #[allow(non_upper_case_globals)]
-            const _DERIVE_example_traits_WalkFields_FOR_A: () = {
-                extern crate example_traits;
-                impl<T> example_traits::WalkFields for A<T>
-                    where T: example_traits::WalkFields
-                {
-                    fn walk_fields(&self, walk: &mut FnMut(&example_traits::WalkFields)) {
-                        match *self {
-                            A::B(ref __binding_0, ref __binding_1,) => {
-                                { walk(__binding_0) }
-                                { walk(__binding_1) }
-                            }
-                            A::C(ref __binding_0,) => {
-                                { walk(__binding_0) }
-                            }
-                        }
-                    }
-                }
-            };
-        }
-    }
-}
-```
-
-# Example: `Interest`
-### Trait Implementation
-```rust
-pub trait Interest {
-    fn interesting(&self) -> bool;
-}
-impl Interest for i32 {
-    fn interesting(&self) -> bool { *self > 0 }
-}
-```
-
-### Custom Derive
-```rust
-#[macro_use]
-extern crate synstructure;
-#[macro_use]
-extern crate quote;
-extern crate proc_macro2;
-
-fn interest_derive(mut s: synstructure::Structure) -> proc_macro2::TokenStream {
-    let body = s.fold(false, |acc, bi| quote!{
-        #acc || example_traits::Interest::interesting(#bi)
-    });
-
-    s.bound_impl(quote!(example_traits::Interest), quote!{
-        fn interesting(&self) -> bool {
-            match *self {
-                #body
-            }
-        }
-    })
-}
-decl_derive!([Interest] => interest_derive);
-
-/*
- * Test Case
- */
-fn main() {
-    test_derive!{
-        interest_derive {
-            enum A<T> {
-                B(i32, T),
-                C(i32),
-            }
-        }
-        expands to {
-            #[allow(non_upper_case_globals)]
-            const _DERIVE_example_traits_Interest_FOR_A: () = {
-                extern crate example_traits;
-                impl<T> example_traits::Interest for A<T>
-                    where T: example_traits::Interest
-                {
-                    fn interesting(&self) -> bool {
-                        match *self {
-                            A::B(ref __binding_0, ref __binding_1,) => {
-                                false ||
-                                    example_traits::Interest::interesting(__binding_0) ||
-                                    example_traits::Interest::interesting(__binding_1)
-                            }
-                            A::C(ref __binding_0,) => {
-                                false ||
-                                    example_traits::Interest::interesting(__binding_0)
-                            }
-                        }
-                    }
-                }
-            };
-        }
-    }
-}
-```
-
-For more example usage, consider investigating the `abomonation_derive` crate,
-which makes use of this crate, and is fairly simple.
deleted file mode 100644
--- a/third_party/rust/synstructure-0.10.1/src/lib.rs
+++ /dev/null
@@ -1,2283 +0,0 @@
-//! This crate provides helper types for matching against enum variants, and
-//! extracting bindings to each of the fields in the deriving Struct or Enum in
-//! a generic way.
-//!
-//! If you are writing a `#[derive]` which needs to perform some operation on
-//! every field, then you have come to the right place!
-//!
-//! # Example: `WalkFields`
-//! ### Trait Implementation
-//! ```
-//! pub trait WalkFields: std::any::Any {
-//!     fn walk_fields(&self, walk: &mut FnMut(&WalkFields));
-//! }
-//! impl WalkFields for i32 {
-//!     fn walk_fields(&self, _walk: &mut FnMut(&WalkFields)) {}
-//! }
-//! ```
-//!
-//! ### Custom Derive
-//! ```
-//! #[macro_use]
-//! extern crate synstructure;
-//! #[macro_use]
-//! extern crate quote;
-//! extern crate proc_macro2;
-//!
-//! fn walkfields_derive(s: synstructure::Structure) -> proc_macro2::TokenStream {
-//!     let body = s.each(|bi| quote!{
-//!         walk(#bi)
-//!     });
-//!
-//!     s.gen_impl(quote! {
-//!         extern crate synstructure_test_traits;
-//!
-//!         gen impl synstructure_test_traits::WalkFields for @Self {
-//!             fn walk_fields(&self, walk: &mut FnMut(&synstructure_test_traits::WalkFields)) {
-//!                 match *self { #body }
-//!             }
-//!         }
-//!     })
-//! }
-//! # const _IGNORE: &'static str = stringify!(
-//! decl_derive!([WalkFields] => walkfields_derive);
-//! # );
-//!
-//! /*
-//!  * Test Case
-//!  */
-//! fn main() {
-//!     test_derive! {
-//!         walkfields_derive {
-//!             enum A<T> {
-//!                 B(i32, T),
-//!                 C(i32),
-//!             }
-//!         }
-//!         expands to {
-//!             #[allow(non_upper_case_globals)]
-//!             const _DERIVE_synstructure_test_traits_WalkFields_FOR_A: () = {
-//!                 extern crate synstructure_test_traits;
-//!                 impl<T> synstructure_test_traits::WalkFields for A<T>
-//!                     where T: synstructure_test_traits::WalkFields
-//!                 {
-//!                     fn walk_fields(&self, walk: &mut FnMut(&synstructure_test_traits::WalkFields)) {
-//!                         match *self {
-//!                             A::B(ref __binding_0, ref __binding_1,) => {
-//!                                 { walk(__binding_0) }
-//!                                 { walk(__binding_1) }
-//!                             }
-//!                             A::C(ref __binding_0,) => {
-//!                                 { walk(__binding_0) }
-//!                             }
-//!                         }
-//!                     }
-//!                 }
-//!             };
-//!         }
-//!     }
-//! }
-//! ```
-//!
-//! # Example: `Interest`
-//! ### Trait Implementation
-//! ```
-//! pub trait Interest {
-//!     fn interesting(&self) -> bool;
-//! }
-//! impl Interest for i32 {
-//!     fn interesting(&self) -> bool { *self > 0 }
-//! }
-//! ```
-//!
-//! ### Custom Derive
-//! ```
-//! #[macro_use]
-//! extern crate synstructure;
-//! #[macro_use]
-//! extern crate quote;
-//! extern crate proc_macro2;
-//!
-//! fn interest_derive(mut s: synstructure::Structure) -> proc_macro2::TokenStream {
-//!     let body = s.fold(false, |acc, bi| quote!{
-//!         #acc || synstructure_test_traits::Interest::interesting(#bi)
-//!     });
-//!
-//!     s.gen_impl(quote! {
-//!         extern crate synstructure_test_traits;
-//!         gen impl synstructure_test_traits::Interest for @Self {
-//!             fn interesting(&self) -> bool {
-//!                 match *self {
-//!                     #body
-//!                 }
-//!             }
-//!         }
-//!     })
-//! }
-//! # const _IGNORE: &'static str = stringify!(
-//! decl_derive!([Interest] => interest_derive);
-//! # );
-//!
-//! /*
-//!  * Test Case
-//!  */
-//! fn main() {
-//!     test_derive!{
-//!         interest_derive {
-//!             enum A<T> {
-//!                 B(i32, T),
-//!                 C(i32),
-//!             }
-//!         }
-//!         expands to {
-//!             #[allow(non_upper_case_globals)]
-//!             const _DERIVE_synstructure_test_traits_Interest_FOR_A: () = {
-//!                 extern crate synstructure_test_traits;
-//!                 impl<T> synstructure_test_traits::Interest for A<T>
-//!                     where T: synstructure_test_traits::Interest
-//!                 {
-//!                     fn interesting(&self) -> bool {
-//!                         match *self {
-//!                             A::B(ref __binding_0, ref __binding_1,) => {
-//!                                 false ||
-//!                                     synstructure_test_traits::Interest::interesting(__binding_0) ||
-//!                                     synstructure_test_traits::Interest::interesting(__binding_1)
-//!                             }
-//!                             A::C(ref __binding_0,) => {
-//!                                 false ||
-//!                                     synstructure_test_traits::Interest::interesting(__binding_0)
-//!                             }
-//!                         }
-//!                     }
-//!                 }
-//!             };
-//!         }
-//!     }
-//! }
-//! ```
-//!
-//! For more example usage, consider investigating the `abomonation_derive` crate,
-//! which makes use of this crate, and is fairly simple.
-
-extern crate proc_macro;
-extern crate proc_macro2;
-#[macro_use]
-extern crate quote;
-#[macro_use]
-extern crate syn;
-extern crate unicode_xid;
-
-use std::collections::HashSet;
-
-use syn::{
-    Generics, Ident, Attribute, Field, Fields, Expr, DeriveInput,
-    TraitBound, WhereClause, GenericParam, Data, WherePredicate,
-    TypeParamBound, Type, TypeMacro, FieldsUnnamed, FieldsNamed,
-    PredicateType, TypePath, token, punctuated,
-};
-use syn::visit::{self, Visit};
-
-// re-export the quote! macro so we can depend on it being around in our macro's
-// implementations.
-#[doc(hidden)]
-pub use quote::*;
-use proc_macro2::{TokenStream, TokenTree};
-
-use unicode_xid::UnicodeXID;
-
-use proc_macro2::Span;
-
-// NOTE: This module has documentation hidden, as it only exports macros (which
-// always appear in the root of the crate) and helper methods / re-exports used
-// in the implementation of those macros.
-#[doc(hidden)]
-pub mod macros;
-
-/// Changes how bounds are added
-#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
-pub enum AddBounds {
-    /// Add for fields and generics
-    Both,
-    /// Fields only
-    Fields,
-    /// Generics only
-    Generics,
-    /// None
-    None,
-    #[doc(hidden)]
-    __Nonexhaustive,
-}
-
-/// The type of binding to use when generating a pattern.
-#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
-pub enum BindStyle {
-    /// `x`
-    Move,
-    /// `mut x`
-    MoveMut,
-    /// `ref x`
-    Ref,
-    /// `ref mut x`
-    RefMut,
-}
-
-impl ToTokens for BindStyle {
-    fn to_tokens(&self, tokens: &mut TokenStream) {
-        match *self {
-            BindStyle::Move => {}
-            BindStyle::MoveMut => quote_spanned!(Span::call_site() => mut).to_tokens(tokens),
-            BindStyle::Ref => quote_spanned!(Span::call_site() => ref).to_tokens(tokens),
-            BindStyle::RefMut => quote_spanned!(Span::call_site() => ref mut).to_tokens(tokens),
-        }
-    }
-}
-
-// Internal method for merging seen_generics arrays together.
-fn generics_fuse(res: &mut Vec<bool>, new: &[bool]) {
-    for (i, &flag) in new.iter().enumerate() {
-        if i == res.len() {
-            res.push(false);
-        }
-        if flag {
-            res[i] = true;
-        }
-    }
-}
-
-// Internal method for extracting the set of generics which have been matched.
-fn fetch_generics<'a>(set: &[bool], generics: &'a Generics) -> Vec<&'a Ident> {
-    let mut tys = vec![];
-    for (&seen, param) in set.iter().zip(generics.params.iter()) {
-        if seen {
-            match *param {
-                GenericParam::Type(ref tparam) => tys.push(&tparam.ident),
-                _ => {}
-            }
-        }
-    }
-    tys
-}
-
-// Internal method for sanitizing an identifier for hygiene purposes.
-fn sanitize_ident(s: &str) -> Ident {
-    let mut res = String::with_capacity(s.len());
-    for mut c in s.chars() {
-        if ! UnicodeXID::is_xid_continue(c) { c = '_' }
-        // Deduplicate consecutive _ characters.
-        if res.ends_with('_') && c == '_' { continue }
-        res.push(c);
-    }
-    Ident::new(&res, Span::call_site())
-}
-
-// Internal method to merge two Generics objects together intelligently.
-fn merge_generics(into: &mut Generics, from: &Generics) {
-    // Try to add the param into `into`, and merge parmas with identical names.
-    'outer: for p in &from.params {
-        for op in &into.params {
-            match (op, p) {
-                (&GenericParam::Type(ref otp), &GenericParam::Type(ref tp)) => {
-                    // NOTE: This is only OK because syn ignores the span for equality purposes.
-                    if otp.ident == tp.ident {
-                        panic!("Attempted to merge conflicting generic params: {} and {}", quote!{#op}, quote!{#p});
-                    }
-                }
-                (&GenericParam::Lifetime(ref olp), &GenericParam::Lifetime(ref lp)) => {
-                    // NOTE: This is only OK because syn ignores the span for equality purposes.
-                    if olp.lifetime == lp.lifetime {
-                        panic!("Attempted to merge conflicting generic params: {} and {}", quote!{#op}, quote!{#p});
-                    }
-                }
-                // We don't support merging Const parameters, because that wouldn't make much sense.
-                _ => (),
-            }
-        }
-        into.params.push(p.clone());
-    }
-
-    // Add any where clauses from the input generics object.
-    if let Some(ref from_clause) = from.where_clause {
-        into.make_where_clause()
-            .predicates
-            .extend(from_clause.predicates.iter().cloned());
-    }
-}
-
-/// Information about a specific binding. This contains both an `Ident`
-/// reference to the given field, and the syn `&'a Field` descriptor for that
-/// field.
-///
-/// This type supports `quote::ToTokens`, so can be directly used within the
-/// `quote!` macro. It expands to a reference to the matched field.
-#[derive(Debug, Clone, PartialEq, Eq, Hash)]
-pub struct BindingInfo<'a> {
-    /// The name which this BindingInfo will bind to.
-    pub binding: Ident,
-
-    /// The type of binding which this BindingInfo will create.
-    pub style: BindStyle,
-
-    field: &'a Field,
-
-    // These are used to determine which type parameters are avaliable.
-    generics: &'a Generics,
-    seen_generics: Vec<bool>,
-}
-
-impl<'a> ToTokens for BindingInfo<'a> {
-    fn to_tokens(&self, tokens: &mut TokenStream) {
-        self.binding.to_tokens(tokens);
-    }
-}
-
-impl<'a> BindingInfo<'a> {
-    /// Returns a reference to the underlying `syn` AST node which this
-    /// `BindingInfo` references
-    pub fn ast(&self) -> &'a Field {
-        self.field
-    }
-
-    /// Generates the pattern fragment for this field binding.
-    ///
-    /// # Example
-    /// ```
-    /// # #[macro_use] extern crate quote;
-    /// # extern crate synstructure;
-    /// # #[macro_use] extern crate syn;
-    /// # use synstructure::*;
-    /// # fn main() {
-    /// let di: syn::DeriveInput = parse_quote! {
-    ///     enum A {
-    ///         B{ a: i32, b: i32 },
-    ///         C(u32),
-    ///     }
-    /// };
-    /// let s = Structure::new(&di);
-    ///
-    /// assert_eq!(
-    ///     s.variants()[0].bindings()[0].pat().to_string(),
-    ///     quote! {
-    ///         ref __binding_0
-    ///     }.to_string()
-    /// );
-    /// # }
-    /// ```
-    pub fn pat(&self) -> TokenStream {
-        let BindingInfo {
-            ref binding,
-            ref style,
-            ..
-        } = *self;
-        quote!(#style #binding)
-    }
-
-    /// Returns a list of the type parameters which are referenced in this
-    /// field's type.
-    ///
-    /// # Caveat
-    ///
-    /// If the field contains any macros in type position, all parameters will
-    /// be considered bound. This is because we cannot determine which type
-    /// parameters are bound by type macros.
-    ///
-    /// # Example
-    /// ```
-    /// # #[macro_use] extern crate quote;
-    /// # extern crate synstructure;
-    /// # #[macro_use] extern crate syn;
-    /// # extern crate proc_macro2;
-    /// # use synstructure::*;
-    /// # fn main() {
-    /// let di: syn::DeriveInput = parse_quote! {
-    ///     struct A<T, U> {
-    ///         a: Option<T>,
-    ///         b: U,
-    ///     }
-    /// };
-    /// let mut s = Structure::new(&di);
-    ///
-    /// assert_eq!(
-    ///     s.variants()[0].bindings()[0].referenced_ty_params(),
-    ///     &[&(syn::Ident::new("T", proc_macro2::Span::call_site()))]
-    /// );
-    /// # }
-    /// ```
-    pub fn referenced_ty_params(&self) -> Vec<&'a Ident> {
-        fetch_generics(&self.seen_generics, self.generics)
-    }
-}
-
-/// This type is similar to `syn`'s `Variant` type, however each of the fields
-/// are references rather than owned. When this is used as the AST for a real
-/// variant, this struct simply borrows the fields of the `syn::Variant`,
-/// however this type may also be used as the sole variant for a struct.
-#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
-pub struct VariantAst<'a> {
-    pub attrs: &'a [Attribute],
-    pub ident: &'a Ident,
-    pub fields: &'a Fields,
-    pub discriminant: &'a Option<(token::Eq, Expr)>,
-}
-
-/// A wrapper around a `syn::DeriveInput`'s variant which provides utilities
-/// for destructuring `Variant`s with `match` expressions.
-#[derive(Debug, Clone, PartialEq, Eq, Hash)]
-pub struct VariantInfo<'a> {
-    pub prefix: Option<&'a Ident>,
-    bindings: Vec<BindingInfo<'a>>,
-    omitted_fields: bool,
-    ast: VariantAst<'a>,
-    generics: &'a Generics,
-}
-
-/// Helper function used by the VariantInfo constructor. Walks all of the types
-/// in `field` and returns a list of the type parameters from `ty_params` which
-/// are referenced in the field.
-fn get_ty_params<'a>(field: &Field, generics: &Generics) -> Vec<bool> {
-    // Helper type. Discovers all identifiers inside of the visited type,
-    // and calls a callback with them.
-    struct BoundTypeLocator<'a> {
-        result: Vec<bool>,
-        generics: &'a Generics,
-    }
-
-    impl<'a> Visit<'a> for BoundTypeLocator<'a> {
-        // XXX: This also (intentionally) captures paths like T::SomeType. Is
-        // this desirable?
-        fn visit_ident(&mut self, id: &Ident) {
-            for (idx, i) in self.generics.params.iter().enumerate() {
-                if let GenericParam::Type(ref tparam) = *i {
-                    if tparam.ident == *id {
-                        self.result[idx] = true;
-                    }
-                }
-            }
-        }
-
-        fn visit_type_macro(&mut self, x: &'a TypeMacro) {
-            // If we see a type_mac declaration, then we can't know what type parameters
-            // it might be binding, so we presume it binds all of them.
-            for r in &mut self.result {
-                *r = true;
-            }
-            visit::visit_type_macro(self, x)
-        }
-    }
-
-    let mut btl = BoundTypeLocator {
-        result: vec![false; generics.params.len()],
-        generics: generics,
-    };
-
-    btl.visit_type(&field.ty);
-
-    btl.result
-}
-
-impl<'a> VariantInfo<'a> {
-    fn new(ast: VariantAst<'a>, prefix: Option<&'a Ident>, generics: &'a Generics) -> Self {
-        let bindings = match *ast.fields {
-            Fields::Unit => vec![],
-            Fields::Unnamed(FieldsUnnamed { unnamed: ref fields, .. }) |
-            Fields::Named(FieldsNamed { named: ref fields, .. }) => {
-                fields.into_iter()
-                    .enumerate()
-                    .map(|(i, field)| {
-                        BindingInfo {
-                            // XXX: This has to be call_site to avoid privacy
-                            // when deriving on private fields.
-                            binding: Ident::new(
-                                &format!("__binding_{}", i),
-                                Span::call_site(),
-                            ),
-                            style: BindStyle::Ref,
-                            field: field,
-                            generics: generics,
-                            seen_generics: get_ty_params(field, generics),
-                        }
-                    })
-                    .collect::<Vec<_>>()
-            }
-        };
-
-        VariantInfo {
-            prefix: prefix,
-            bindings: bindings,
-            omitted_fields: false,
-            ast: ast,
-            generics: generics,
-        }
-    }
-
-    /// Returns a slice of the bindings in this Variant.
-    pub fn bindings(&self) -> &[BindingInfo<'a>] {
-        &self.bindings
-    }
-
-    /// Returns a mut slice of the bindings in this Variant.
-    pub fn bindings_mut(&mut self) -> &mut [BindingInfo<'a>] {
-        &mut self.bindings
-    }
-
-    /// Returns a `VariantAst` object which contains references to the
-    /// underlying `syn` AST node which this `Variant` was created from.
-    pub fn ast(&self) -> VariantAst<'a> {
-        self.ast
-    }
-
-    /// True if any bindings were omitted due to a `filter` call.
-    pub fn omitted_bindings(&self) -> bool {
-        self.omitted_fields
-    }
-
-    /// Generates the match-arm pattern which could be used to match against this Variant.
-    ///
-    /// # Example
-    /// ```
-    /// # #[macro_use] extern crate quote;
-    /// # extern crate synstructure;
-    /// # #[macro_use] extern crate syn;
-    /// # use synstructure::*;
-    /// # fn main() {
-    /// let di: syn::DeriveInput = parse_quote! {
-    ///     enum A {
-    ///         B(i32, i32),
-    ///         C(u32),
-    ///     }
-    /// };
-    /// let s = Structure::new(&di);
-    ///
-    /// assert_eq!(
-    ///     s.variants()[0].pat().to_string(),
-    ///     quote!{
-    ///         A::B(ref __binding_0, ref __binding_1,)
-    ///     }.to_string()
-    /// );
-    /// # }
-    /// ```
-    pub fn pat(&self) -> TokenStream {
-        let mut t = TokenStream::new();
-        if let Some(prefix) = self.prefix {
-            prefix.to_tokens(&mut t);
-            quote!(::).to_tokens(&mut t);
-        }
-        self.ast.ident.to_tokens(&mut t);
-        match *self.ast.fields {
-            Fields::Unit => {
-                assert!(self.bindings.len() == 0);
-            }
-            Fields::Unnamed(..) => {
-                token::Paren(Span::call_site()).surround(&mut t, |t| {
-                    for binding in &self.bindings {
-                        binding.pat().to_tokens(t);
-                        quote!(,).to_tokens(t);
-                    }
-                    if self.omitted_fields {
-                        quote!(..).to_tokens(t);
-                    }
-                })
-            }
-            Fields::Named(..) => {
-                token::Brace(Span::call_site()).surround(&mut t, |t| {
-                    for binding in &self.bindings {
-                        binding.field.ident.to_tokens(t);
-                        quote!(:).to_tokens(t);
-                        binding.pat().to_tokens(t);
-                        quote!(,).to_tokens(t);
-                    }
-                    if self.omitted_fields {
-                        quote!(..).to_tokens(t);
-                    }
-                })
-            }
-        }
-        t
-    }
-
-    /// Generates the token stream required to construct the current variant.
-    ///
-    /// The init array initializes each of the fields in the order they are
-    /// written in `variant.ast().fields`.
-    ///
-    /// # Example
-    /// ```
-    /// # #[macro_use] extern crate quote;
-    /// # extern crate synstructure;
-    /// # #[macro_use] extern crate syn;
-    /// # use synstructure::*;
-    /// # fn main() {
-    /// let di: syn::DeriveInput = parse_quote! {
-    ///     enum A {
-    ///         B(usize, usize),
-    ///         C{ v: usize },
-    ///     }
-    /// };
-    /// let s = Structure::new(&di);
-    ///
-    /// assert_eq!(
-    ///     s.variants()[0].construct(|_, i| quote!(#i)).to_string(),
-    ///
-    ///     quote!{
-    ///         A::B(0usize, 1usize,)
-    ///     }.to_string()
-    /// );
-    ///
-    /// assert_eq!(
-    ///     s.variants()[1].construct(|_, i| quote!(#i)).to_string(),
-    ///
-    ///     quote!{
-    ///         A::C{ v: 0usize, }
-    ///     }.to_string()
-    /// );
-    /// # }
-    /// ```
-    pub fn construct<F, T>(&self, mut func: F) -> TokenStream
-    where
-        F: FnMut(&Field, usize) -> T,
-        T: ToTokens,
-    {
-        let mut t = TokenStream::new();
-        if let Some(prefix) = self.prefix {
-            quote!(#prefix ::).to_tokens(&mut t);
-        }
-        self.ast.ident.to_tokens(&mut t);
-
-        match *self.ast.fields {
-            Fields::Unit => (),
-            Fields::Unnamed(FieldsUnnamed { ref unnamed, .. }) => {
-                token::Paren::default().surround(&mut t, |t| {
-                    for (i, field) in unnamed.into_iter().enumerate() {
-                        func(field, i).to_tokens(t);
-                        quote!(,).to_tokens(t);
-                    }
-                })
-            }
-            Fields::Named(FieldsNamed { ref named, .. }) => {
-                token::Brace::default().surround(&mut t, |t| {
-                    for (i, field) in named.into_iter().enumerate() {
-                        field.ident.to_tokens(t);
-                        quote!(:).to_tokens(t);
-                        func(field, i).to_tokens(t);
-                        quote!(,).to_tokens(t);
-                    }
-                })
-            }
-        }
-        t
-    }
-
-    /// Runs the passed-in function once for each bound field, passing in a `BindingInfo`.
-    /// and generating a `match` arm which evaluates the returned tokens.
-    ///
-    /// This method will ignore fields which are ignored through the `filter`
-    /// method.
-    ///
-    /// # Example
-    /// ```
-    /// # #[macro_use] extern crate quote;
-    /// # extern crate synstructure;
-    /// # #[macro_use] extern crate syn;
-    /// # use synstructure::*;
-    /// # fn main() {
-    /// let di: syn::DeriveInput = parse_quote! {
-    ///     enum A {
-    ///         B(i32, i32),
-    ///         C(u32),
-    ///     }
-    /// };
-    /// let s = Structure::new(&di);
-    ///
-    /// assert_eq!(
-    ///     s.variants()[0].each(|bi| quote!(println!("{:?}", #bi))).to_string(),
-    ///
-    ///     quote!{
-    ///         A::B(ref __binding_0, ref __binding_1,) => {
-    ///             { println!("{:?}", __binding_0) }
-    ///             { println!("{:?}", __binding_1) }
-    ///         }
-    ///     }.to_string()
-    /// );
-    /// # }
-    /// ```
-    pub fn each<F, R>(&self, mut f: F) -> TokenStream
-    where
-        F: FnMut(&BindingInfo) -> R,
-        R: ToTokens,
-    {
-        let pat = self.pat();
-        let mut body = TokenStream::new();
-        for binding in &self.bindings {
-            token::Brace::default().surround(&mut body, |body| {
-                f(binding).to_tokens(body);
-            });
-        }
-        quote!(#pat => { #body })
-    }
-
-    /// Runs the passed-in function once for each bound field, passing in the
-    /// result of the previous call, and a `BindingInfo`. generating a `match`
-    /// arm which evaluates to the resulting tokens.
-    ///
-    /// This method will ignore fields which are ignored through the `filter`
-    /// method.
-    ///
-    /// # Example
-    /// ```
-    /// # #[macro_use] extern crate quote;
-    /// # extern crate synstructure;
-    /// # #[macro_use] extern crate syn;
-    /// # use synstructure::*;
-    /// # fn main() {
-    /// let di: syn::DeriveInput = parse_quote! {
-    ///     enum A {
-    ///         B(i32, i32),
-    ///         C(u32),
-    ///     }
-    /// };
-    /// let s = Structure::new(&di);
-    ///
-    /// assert_eq!(
-    ///     s.variants()[0].fold(quote!(0), |acc, bi| quote!(#acc + #bi)).to_string(),
-    ///
-    ///     quote!{
-    ///         A::B(ref __binding_0, ref __binding_1,) => {
-    ///             0 + __binding_0 + __binding_1
-    ///         }
-    ///     }.to_string()
-    /// );
-    /// # }
-    /// ```
-    pub fn fold<F, I, R>(&self, init: I, mut f: F) -> TokenStream
-    where
-        F: FnMut(TokenStream, &BindingInfo) -> R,
-        I: ToTokens,
-        R: ToTokens,
-    {
-        let pat = self.pat();
-        let body = self.bindings.iter().fold(quote!(#init), |i, bi| {
-            let r = f(i, bi);
-            quote!(#r)
-        });
-        quote!(#pat => { #body })
-    }
-
-    /// Filter the bindings created by this `Variant` object. This has 2 effects:
-    ///
-    /// * The bindings will no longer appear in match arms generated by methods
-    ///   on this `Variant` or its subobjects.
-    ///
-    /// * Impl blocks created with the `bound_impl` or `unsafe_bound_impl`
-    ///   method only consider type parameters referenced in the types of
-    ///   non-filtered fields.
-    ///
-    /// # Example
-    /// ```
-    /// # #[macro_use] extern crate quote;
-    /// # extern crate synstructure;
-    /// # #[macro_use] extern crate syn;
-    /// # extern crate proc_macro2;
-    /// # use synstructure::*;
-    /// # fn main() {
-    /// let di: syn::DeriveInput = parse_quote! {
-    ///     enum A {
-    ///         B{ a: i32, b: i32 },
-    ///         C{ a: u32 },
-    ///     }
-    /// };
-    /// let mut s = Structure::new(&di);
-    ///
-    /// s.variants_mut()[0].filter(|bi| {
-    ///     bi.ast().ident == Some(syn::Ident::new("b", proc_macro2::Span::call_site()))
-    /// });
-    ///
-    /// assert_eq!(
-    ///     s.each(|bi| quote!(println!("{:?}", #bi))).to_string(),
-    ///
-    ///     quote!{
-    ///         A::B{ b: ref __binding_1, .. } => {
-    ///             { println!("{:?}", __binding_1) }
-    ///         }
-    ///         A::C{ a: ref __binding_0, } => {
-    ///             { println!("{:?}", __binding_0) }
-    ///         }
-    ///     }.to_string()
-    /// );
-    /// # }
-    /// ```
-    pub fn filter<F>(&mut self, f: F) -> &mut Self
-    where
-        F: FnMut(&BindingInfo) -> bool,
-    {
-        let before_len = self.bindings.len();
-        self.bindings.retain(f);
-        if self.bindings.len() != before_len {
-            self.omitted_fields = true;
-        }
-        self
-    }
-
-    /// Remove the binding at the given index.
-    ///
-    /// # Panics
-    ///
-    /// Panics if the index is out of range.
-    pub fn remove_binding(&mut self, idx: usize) -> &mut Self {
-        self.bindings.remove(idx);
-        self.omitted_fields = true;
-        self
-    }
-
-    /// Updates the `BindStyle` for each of the passed-in fields by calling the
-    /// passed-in function for each `BindingInfo`.
-    ///
-    /// # Example
-    /// ```
-    /// # #[macro_use] extern crate quote;
-    /// # extern crate synstructure;
-    /// # #[macro_use] extern crate syn;
-    /// # use synstructure::*;
-    /// # fn main() {
-    /// let di: syn::DeriveInput = parse_quote! {
-    ///     enum A {
-    ///         B(i32, i32),
-    ///         C(u32),
-    ///     }
-    /// };
-    /// let mut s = Structure::new(&di);
-    ///
-    /// s.variants_mut()[0].bind_with(|bi| BindStyle::RefMut);
-    ///
-    /// assert_eq!(
-    ///     s.each(|bi| quote!(println!("{:?}", #bi))).to_string(),
-    ///
-    ///     quote!{
-    ///         A::B(ref mut __binding_0, ref mut __binding_1,) => {
-    ///             { println!("{:?}", __binding_0) }
-    ///             { println!("{:?}", __binding_1) }
-    ///         }
-    ///         A::C(ref __binding_0,) => {
-    ///             { println!("{:?}", __binding_0) }
-    ///         }
-    ///     }.to_string()
-    /// );
-    /// # }
-    /// ```
-    pub fn bind_with<F>(&mut self, mut f: F) -> &mut Self
-    where
-        F: FnMut(&BindingInfo) -> BindStyle,
-    {
-        for binding in &mut self.bindings {
-            binding.style = f(&binding);
-        }
-        self
-    }
-
-    /// Updates the binding name for each fo the passed-in fields by calling the
-    /// passed-in function for each `BindingInfo`.
-    ///
-    /// The function will be called with the `BindingInfo` and its index in the
-    /// enclosing variant.
-    ///
-    /// The default name is `__binding_{}` where `{}` is replaced with an
-    /// increasing number.
-    ///
-    /// # Example
-    /// ```
-    /// # #[macro_use] extern crate quote;
-    /// # extern crate synstructure;
-    /// # #[macro_use] extern crate syn;
-    /// # use synstructure::*;
-    /// # fn main() {
-    /// let di: syn::DeriveInput = parse_quote! {
-    ///     enum A {
-    ///         B{ a: i32, b: i32 },
-    ///         C{ a: u32 },
-    ///     }
-    /// };
-    /// let mut s = Structure::new(&di);
-    ///
-    /// s.variants_mut()[0].binding_name(|bi, i| bi.ident.clone().unwrap());
-    ///
-    /// assert_eq!(
-    ///     s.each(|bi| quote!(println!("{:?}", #bi))).to_string(),
-    ///
-    ///     quote!{
-    ///         A::B{ a: ref a, b: ref b, } => {
-    ///             { println!("{:?}", a) }
-    ///             { println!("{:?}", b) }
-    ///         }
-    ///         A::C{ a: ref __binding_0, } => {
-    ///             { println!("{:?}", __binding_0) }
-    ///         }
-    ///     }.to_string()
-    /// );
-    /// # }
-    /// ```
-    pub fn binding_name<F>(&mut self, mut f: F) -> &mut Self
-    where
-        F: FnMut(&Field, usize) -> Ident,
-    {
-        for (it, binding) in self.bindings.iter_mut().enumerate() {
-            binding.binding = f(binding.field, it);
-        }
-        self
-    }
-
-    /// Returns a list of the type parameters which are referenced in this
-    /// field's type.
-    ///
-    /// # Caveat
-    ///
-    /// If the field contains any macros in type position, all parameters will
-    /// be considered bound. This is because we cannot determine which type
-    /// parameters are bound by type macros.
-    ///
-    /// # Example
-    /// ```
-    /// # #[macro_use] extern crate quote;
-    /// # extern crate synstructure;
-    /// # #[macro_use] extern crate syn;
-    /// # extern crate proc_macro2;
-    /// # use synstructure::*;
-    /// # fn main() {
-    /// let di: syn::DeriveInput = parse_quote! {
-    ///     struct A<T, U> {
-    ///         a: Option<T>,
-    ///         b: U,
-    ///     }
-    /// };
-    /// let mut s = Structure::new(&di);
-    ///
-    /// assert_eq!(
-    ///     s.variants()[0].bindings()[0].referenced_ty_params(),
-    ///     &[&(syn::Ident::new("T", proc_macro2::Span::call_site()))]
-    /// );
-    /// # }
-    /// ```
-    pub fn referenced_ty_params(&self) -> Vec<&'a Ident> {
-        let mut flags = Vec::new();
-        for binding in &self.bindings {
-            generics_fuse(&mut flags, &binding.seen_generics);
-        }
-        fetch_generics(&flags, self.generics)
-    }
-}
-
-/// A wrapper around a `syn::DeriveInput` which provides utilities for creating
-/// custom derive trait implementations.
-#[derive(Debug, Clone, PartialEq, Eq, Hash)]
-pub struct Structure<'a> {
-    variants: Vec<VariantInfo<'a>>,
-    omitted_variants: bool,
-    ast: &'a DeriveInput,
-    extra_impl: Vec<GenericParam>,
-    add_bounds: AddBounds,
-}
-
-impl<'a> Structure<'a> {
-    /// Create a new `Structure` with the variants and fields from the passed-in
-    /// `DeriveInput`.
-    pub fn new(ast: &'a DeriveInput) -> Self {
-        let variants = match ast.data {
-            Data::Enum(ref data) => {
-                (&data.variants).into_iter()
-                    .map(|v| {
-                        VariantInfo::new(
-                            VariantAst {
-                                attrs: &v.attrs,
-                                ident: &v.ident,
-                                fields: &v.fields,
-                                discriminant: &v.discriminant
-                            },
-                            Some(&ast.ident),
-                            &ast.generics,
-                        )
-                    })
-                    .collect::<Vec<_>>()
-            }
-            Data::Struct(ref data) => {
-                // SAFETY NOTE: Normally putting an `Expr` in static storage
-                // wouldn't be safe, because it could contain `Term` objects
-                // which use thread-local interning. However, this static always
-                // contains the value `None`. Thus, it will never contain any
-                // unsafe values.
-                struct UnsafeMakeSync(Option<(token::Eq, Expr)>);
-                unsafe impl Sync for UnsafeMakeSync {}
-                static NONE_DISCRIMINANT: UnsafeMakeSync = UnsafeMakeSync(None);
-
-                vec![
-                    VariantInfo::new(
-                        VariantAst {
-                            attrs: &ast.attrs,
-                            ident: &ast.ident,
-                            fields: &data.fields,
-                            discriminant: &NONE_DISCRIMINANT.0,
-                        },
-                        None,
-                        &ast.generics,
-                    ),
-                ]
-            }
-            Data::Union(_) => {
-                panic!("synstructure does not handle untagged unions \
-                    (https://github.com/mystor/synstructure/issues/6)");
-            }
-        };
-
-        Structure {
-            variants: variants,
-            omitted_variants: false,
-            ast: ast,
-            extra_impl: vec![],
-            add_bounds: AddBounds::Both,
-        }
-    }
-
-    /// Returns a slice of the variants in this Structure.
-    pub fn variants(&self) -> &[VariantInfo<'a>] {
-        &self.variants
-    }
-
-    /// Returns a mut slice of the variants in this Structure.
-    pub fn variants_mut(&mut self) -> &mut [VariantInfo<'a>] {
-        &mut self.variants
-    }
-
-    /// Returns a reference to the underlying `syn` AST node which this
-    /// `Structure` was created from.
-    pub fn ast(&self) -> &'a DeriveInput {
-        self.ast
-    }
-
-    /// True if any variants were omitted due to a `filter_variants` call.
-    pub fn omitted_variants(&self) -> bool {
-        self.omitted_variants
-    }
-
-    /// Runs the passed-in function once for each bound field, passing in a `BindingInfo`.
-    /// and generating `match` arms which evaluate the returned tokens.
-    ///
-    /// This method will ignore variants or fields which are ignored through the
-    /// `filter` and `filter_variant` methods.
-    ///
-    /// # Example
-    /// ```
-    /// # #[macro_use] extern crate quote;
-    /// # extern crate synstructure;
-    /// # #[macro_use] extern crate syn;
-    /// # use synstructure::*;
-    /// # fn main() {
-    /// let di: syn::DeriveInput = parse_quote! {
-    ///     enum A {
-    ///         B(i32, i32),
-    ///         C(u32),
-    ///     }
-    /// };
-    /// let s = Structure::new(&di);
-    ///
-    /// assert_eq!(
-    ///     s.each(|bi| quote!(println!("{:?}", #bi))).to_string(),
-    ///
-    ///     quote!{
-    ///         A::B(ref __binding_0, ref __binding_1,) => {
-    ///             { println!("{:?}", __binding_0) }
-    ///             { println!("{:?}", __binding_1) }
-    ///         }
-    ///         A::C(ref __binding_0,) => {
-    ///             { println!("{:?}", __binding_0) }
-    ///         }
-    ///     }.to_string()
-    /// );
-    /// # }
-    /// ```
-    pub fn each<F, R>(&self, mut f: F) -> TokenStream
-    where
-        F: FnMut(&BindingInfo) -> R,
-        R: ToTokens,
-    {
-        let mut t = TokenStream::new();
-        for variant in &self.variants {
-            variant.each(&mut f).to_tokens(&mut t);
-        }
-        if self.omitted_variants {
-            quote!(_ => {}).to_tokens(&mut t);
-        }
-        t
-    }
-
-    /// Runs the passed-in function once for each bound field, passing in the
-    /// result of the previous call, and a `BindingInfo`. generating `match`
-    /// arms which evaluate to the resulting tokens.
-    ///
-    /// This method will ignore variants or fields which are ignored through the
-    /// `filter` and `filter_variant` methods.
-    ///
-    /// If a variant has been ignored, it will return the `init` value.
-    ///
-    /// # Example
-    /// ```
-    /// # #[macro_use] extern crate quote;
-    /// # extern crate synstructure;
-    /// # #[macro_use] extern crate syn;
-    /// # use synstructure::*;
-    /// # fn main() {
-    /// let di: syn::DeriveInput = parse_quote! {
-    ///     enum A {
-    ///         B(i32, i32),
-    ///         C(u32),
-    ///     }
-    /// };
-    /// let s = Structure::new(&di);
-    ///
-    /// assert_eq!(
-    ///     s.fold(quote!(0), |acc, bi| quote!(#acc + #bi)).to_string(),
-    ///
-    ///     quote!{
-    ///         A::B(ref __binding_0, ref __binding_1,) => {
-    ///             0 + __binding_0 + __binding_1
-    ///         }
-    ///         A::C(ref __binding_0,) => {
-    ///             0 + __binding_0
-    ///         }
-    ///     }.to_string()
-    /// );
-    /// # }
-    /// ```
-    pub fn fold<F, I, R>(&self, init: I, mut f: F) -> TokenStream
-    where
-        F: FnMut(TokenStream, &BindingInfo) -> R,
-        I: ToTokens,
-        R: ToTokens,
-    {
-        let mut t = TokenStream::new();
-        for variant in &self.variants {
-            variant.fold(&init, &mut f).to_tokens(&mut t);
-        }
-        if self.omitted_variants {
-            quote!(_ => { #init }).to_tokens(&mut t);
-        }
-        t
-    }
-
-    /// Runs the passed-in function once for each variant, passing in a
-    /// `VariantInfo`. and generating `match` arms which evaluate the returned
-    /// tokens.
-    ///
-    /// This method will ignore variants and not bind fields which are ignored
-    /// through the `filter` and `filter_variant` methods.
-    ///
-    /// # Example
-    /// ```
-    /// # #[macro_use] extern crate quote;
-    /// # extern crate synstructure;
-    /// # #[macro_use] extern crate syn;
-    /// # use synstructure::*;
-    /// # fn main() {
-    /// let di: syn::DeriveInput = parse_quote! {
-    ///     enum A {
-    ///         B(i32, i32),
-    ///         C(u32),
-    ///     }
-    /// };
-    /// let s = Structure::new(&di);
-    ///
-    /// assert_eq!(
-    ///     s.each_variant(|v| {
-    ///         let name = &v.ast().ident;
-    ///         quote!(println!(stringify!(#name)))
-    ///     }).to_string(),
-    ///
-    ///     quote!{
-    ///         A::B(ref __binding_0, ref __binding_1,) => {
-    ///             println!(stringify!(B))
-    ///         }
-    ///         A::C(ref __binding_0,) => {
-    ///             println!(stringify!(C))
-    ///         }
-    ///     }.to_string()
-    /// );
-    /// # }
-    /// ```
-    pub fn each_variant<F, R>(&self, mut f: F) -> TokenStream
-    where
-        F: FnMut(&VariantInfo) -> R,
-        R: ToTokens,
-    {
-        let mut t = TokenStream::new();
-        for variant in &self.variants {
-            let pat = variant.pat();
-            let body = f(variant);
-            quote!(#pat => { #body }).to_tokens(&mut t);
-        }
-        if self.omitted_variants {
-            quote!(_ => {}).to_tokens(&mut t);
-        }
-        t
-    }
-
-    /// Filter the bindings created by this `Structure` object. This has 2 effects:
-    ///
-    /// * The bindings will no longer appear in match arms generated by methods
-    ///   on this `Structure` or its subobjects.
-    ///
-    /// * Impl blocks created with the `bound_impl` or `unsafe_bound_impl`
-    ///   method only consider type parameters referenced in the types of
-    ///   non-filtered fields.
-    ///
-    /// # Example
-    /// ```
-    /// # #[macro_use] extern crate quote;
-    /// # extern crate synstructure;
-    /// # #[macro_use] extern crate syn;
-    /// # extern crate proc_macro2;
-    /// # use synstructure::*;
-    /// # fn main() {
-    /// let di: syn::DeriveInput = parse_quote! {
-    ///     enum A {
-    ///         B{ a: i32, b: i32 },
-    ///         C{ a: u32 },
-    ///     }
-    /// };
-    /// let mut s = Structure::new(&di);
-    ///
-    /// s.filter(|bi| {
-    ///     bi.ast().ident == Some(syn::Ident::new("a", proc_macro2::Span::call_site()))
-    /// });
-    ///
-    /// assert_eq!(
-    ///     s.each(|bi| quote!(println!("{:?}", #bi))).to_string(),
-    ///
-    ///     quote!{
-    ///         A::B{ a: ref __binding_0, .. } => {
-    ///             { println!("{:?}", __binding_0) }
-    ///         }
-    ///         A::C{ a: ref __binding_0, } => {
-    ///             { println!("{:?}", __binding_0) }
-    ///         }
-    ///     }.to_string()
-    /// );
-    /// # }
-    /// ```
-    pub fn filter<F>(&mut self, mut f: F) -> &mut Self
-    where
-        F: FnMut(&BindingInfo) -> bool,
-    {
-        for variant in &mut self.variants {
-            variant.filter(&mut f);
-        }
-        self
-    }
-
-    /// Specify which bounds should be generated by impl-generating functions
-    /// such as `gen_impl`, `bound_impl`, and `unsafe_bound_impl`.
-    ///
-    /// The default behaviour is to generate both field and generic bounds from
-    /// type parameters.
-    ///
-    /// # Example
-    /// ```
-    /// # #[macro_use] extern crate quote;
-    /// # extern crate synstructure;
-    /// # #[macro_use] extern crate syn;
-    /// # use synstructure::*;
-    /// # fn main() {
-    /// let di: syn::DeriveInput = parse_quote! {
-    ///     enum A<T, U> {
-    ///         B(T),
-    ///         C(Option<U>),
-    ///     }
-    /// };
-    /// let mut s = Structure::new(&di);
-    ///
-    /// // Limit bounds to only generics.
-    /// s.add_bounds(AddBounds::Generics);
-    ///
-    /// assert_eq!(
-    ///     s.bound_impl(quote!(krate::Trait), quote!{
-    ///         fn a() {}
-    ///     }).to_string(),
-    ///     quote!{
-    ///         #[allow(non_upper_case_globals)]
-    ///         const _DERIVE_krate_Trait_FOR_A: () = {
-    ///             extern crate krate;
-    ///             impl<T, U> krate::Trait for A<T, U>
-    ///                 where T: krate::Trait,
-    ///                       U: krate::Trait
-    ///             {
-    ///                 fn a() {}
-    ///             }
-    ///         };
-    ///     }.to_string()
-    /// );
-    /// # }
-    /// ```
-    pub fn add_bounds(&mut self, mode: AddBounds) -> &mut Self {
-        self.add_bounds = mode;
-        self
-    }
-
-    /// Filter the variants matched by this `Structure` object. This has 2 effects:
-    ///
-    /// * Match arms destructuring these variants will no longer be generated by
-    ///   methods on this `Structure`
-    ///
-    /// * Impl blocks created with the `bound_impl` or `unsafe_bound_impl`
-    ///   method only consider type parameters referenced in the types of
-    ///   fields in non-fitered variants.
-    ///
-    /// # Example
-    /// ```
-    /// # #[macro_use] extern crate quote;
-    /// # extern crate synstructure;
-    /// # #[macro_use] extern crate syn;
-    /// # use synstructure::*;
-    /// # fn main() {
-    /// let di: syn::DeriveInput = parse_quote! {
-    ///     enum A {
-    ///         B(i32, i32),
-    ///         C(u32),
-    ///     }
-    /// };
-    ///
-    /// let mut s = Structure::new(&di);
-    ///
-    /// s.filter_variants(|v| v.ast().ident != "B");
-    ///
-    /// assert_eq!(
-    ///     s.each(|bi| quote!(println!("{:?}", #bi))).to_string(),
-    ///
-    ///     quote!{
-    ///         A::C(ref __binding_0,) => {
-    ///             { println!("{:?}", __binding_0) }
-    ///         }
-    ///         _ => {}
-    ///     }.to_string()
-    /// );
-    /// # }
-    /// ```
-    pub fn filter_variants<F>(&mut self, f: F) -> &mut Self
-    where
-        F: FnMut(&VariantInfo) -> bool,
-    {
-        let before_len = self.variants.len();
-        self.variants.retain(f);
-        if self.variants.len() != before_len {
-            self.omitted_variants = true;
-        }
-        self
-    }
-
-    /// Remove the variant at the given index.
-    ///
-    /// # Panics
-    ///
-    /// Panics if the index is out of range.
-    pub fn remove_variant(&mut self, idx: usize) -> &mut Self {
-        self.variants.remove(idx);
-        self.omitted_variants = true;
-        self
-    }
-
-    /// Updates the `BindStyle` for each of the passed-in fields by calling the
-    /// passed-in function for each `BindingInfo`.
-    ///
-    /// # Example
-    /// ```
-    /// # #[macro_use] extern crate quote;
-    /// # extern crate synstructure;
-    /// # #[macro_use] extern crate syn;
-    /// # use synstructure::*;
-    /// # fn main() {
-    /// let di: syn::DeriveInput = parse_quote! {
-    ///     enum A {
-    ///         B(i32, i32),
-    ///         C(u32),
-    ///     }
-    /// };
-    /// let mut s = Structure::new(&di);
-    ///
-    /// s.bind_with(|bi| BindStyle::RefMut);
-    ///
-    /// assert_eq!(
-    ///     s.each(|bi| quote!(println!("{:?}", #bi))).to_string(),
-    ///
-    ///     quote!{
-    ///         A::B(ref mut __binding_0, ref mut __binding_1,) => {
-    ///             { println!("{:?}", __binding_0) }
-    ///             { println!("{:?}", __binding_1) }
-    ///         }
-    ///         A::C(ref mut __binding_0,) => {
-    ///             { println!("{:?}", __binding_0) }
-    ///         }
-    ///     }.to_string()
-    /// );
-    /// # }
-    /// ```
-    pub fn bind_with<F>(&mut self, mut f: F) -> &mut Self
-    where
-        F: FnMut(&BindingInfo) -> BindStyle,
-    {
-        for variant in &mut self.variants {
-            variant.bind_with(&mut f);
-        }
-        self
-    }
-
-    /// Updates the binding name for each fo the passed-in fields by calling the
-    /// passed-in function for each `BindingInfo`.
-    ///
-    /// The function will be called with the `BindingInfo` and its index in the
-    /// enclosing variant.
-    ///
-    /// The default name is `__binding_{}` where `{}` is replaced with an
-    /// increasing number.
-    ///
-    /// # Example
-    /// ```
-    /// # #[macro_use] extern crate quote;
-    /// # extern crate synstructure;
-    /// # #[macro_use] extern crate syn;
-    /// # use synstructure::*;
-    /// # fn main() {
-    /// let di: syn::DeriveInput = parse_quote! {
-    ///     enum A {
-    ///         B{ a: i32, b: i32 },
-    ///         C{ a: u32 },
-    ///     }
-    /// };
-    /// let mut s = Structure::new(&di);
-    ///
-    /// s.binding_name(|bi, i| bi.ident.clone().unwrap());
-    ///
-    /// assert_eq!(
-    ///     s.each(|bi| quote!(println!("{:?}", #bi))).to_string(),
-    ///
-    ///     quote!{
-    ///         A::B{ a: ref a, b: ref b, } => {
-    ///             { println!("{:?}", a) }
-    ///             { println!("{:?}", b) }
-    ///         }
-    ///         A::C{ a: ref a, } => {
-    ///             { println!("{:?}", a) }
-    ///         }
-    ///     }.to_string()
-    /// );
-    /// # }
-    /// ```
-    pub fn binding_name<F>(&mut self, mut f: F) -> &mut Self
-    where
-        F: FnMut(&Field, usize) -> Ident,
-    {
-        for variant in &mut self.variants {
-            variant.binding_name(&mut f);
-        }
-        self
-    }
-
-    /// Returns a list of the type parameters which are refrenced in the types
-    /// of non-filtered fields / variants.
-    ///
-    /// # Caveat
-    ///
-    /// If the struct contains any macros in type position, all parameters will
-    /// be considered bound. This is because we cannot determine which type
-    /// parameters are bound by type macros.
-    ///
-    /// # Example
-    /// ```
-    /// # #[macro_use] extern crate quote;
-    /// # extern crate synstructure;
-    /// # #[macro_use] extern crate syn;
-    /// # extern crate proc_macro2;
-    /// # use synstructure::*;
-    /// # fn main() {
-    /// let di: syn::DeriveInput = parse_quote! {
-    ///     enum A<T, U> {
-    ///         B(T, i32),
-    ///         C(Option<U>),
-    ///     }
-    /// };
-    /// let mut s = Structure::new(&di);
-    ///
-    /// s.filter_variants(|v| v.ast().ident != "C");
-    ///
-    /// assert_eq!(
-    ///     s.referenced_ty_params(),
-    ///     &[&(syn::Ident::new("T", proc_macro2::Span::call_site()))]
-    /// );
-    /// # }
-    /// ```
-    pub fn referenced_ty_params(&self) -> Vec<&'a Ident> {
-        let mut flags = Vec::new();
-        for variant in &self.variants {
-            for binding in &variant.bindings {
-                generics_fuse(&mut flags, &binding.seen_generics);
-            }
-        }
-        fetch_generics(&flags, &self.ast.generics)
-    }
-
-    /// Adds an `impl<>` generic parameter.
-    /// This can be used when the trait to be derived needs some extra generic parameters.
-    ///
-    /// # Example
-    /// ```
-    /// # #![recursion_limit="128"]
-    /// # #[macro_use] extern crate quote;
-    /// # extern crate synstructure;
-    /// # #[macro_use] extern crate syn;
-    /// # use synstructure::*;
-    /// # fn main() {
-    /// let di: syn::DeriveInput = parse_quote! {
-    ///     enum A<T, U> {
-    ///         B(T),
-    ///         C(Option<U>),
-    ///     }
-    /// };
-    /// let mut s = Structure::new(&di);
-    /// let generic: syn::GenericParam = parse_quote!(X: krate::AnotherTrait);
-    ///
-    /// assert_eq!(
-    ///     s.add_impl_generic(generic)
-    ///         .bound_impl(quote!(krate::Trait<X>),
-    ///         quote!{
-    ///                 fn a() {}
-    ///         }
-    ///     ).to_string(),
-    ///     quote!{
-    ///         #[allow(non_upper_case_globals)]
-    ///         const _DERIVE_krate_Trait_X_FOR_A: () = {
-    ///             extern crate krate;
-    ///             impl<T, U, X: krate::AnotherTrait> krate::Trait<X> for A<T, U>
-    ///                 where T : krate :: Trait < X >,
-    ///                       Option<U>: krate::Trait<X>,
-    ///                       U: krate::Trait<X>
-    ///             {
-    ///                 fn a() {}
-    ///             }
-    ///         };
-    ///     }.to_string()
-    /// );
-    /// # }
-    /// ```
-    pub fn add_impl_generic(&mut self, param: GenericParam) -> &mut Self {
-        self.extra_impl.push(param);
-        self
-    }
-
-    /// Add trait bounds for a trait with the given path for each type parmaeter
-    /// referenced in the types of non-filtered fields.
-    ///
-    /// # Caveat
-    ///
-    /// If the method contains any macros in type position, all parameters will
-    /// be considered bound. This is because we cannot determine which type
-    /// parameters are bound by type macros.
-    pub fn add_trait_bounds(
-        &self,
-        bound: &TraitBound,
-        where_clause: &mut Option<WhereClause>,
-        mode: AddBounds,
-    ) {
-        let mut seen = HashSet::new();
-        let mut pred = |ty: Type| if !seen.contains(&ty) {
-            seen.insert(ty.clone());
-
-            // Ensure we have a where clause, because we need to use it. We
-            // can't use `get_or_insert_with`, because it isn't supported on all
-            // rustc versions we support (this is a Rust 1.20+ feature).
-            if where_clause.is_none() {
-                *where_clause = Some(WhereClause {
-                    where_token: Default::default(),
-                    predicates: punctuated::Punctuated::new(),
-                });
-            }
-            let clause = where_clause.as_mut().unwrap();
-
-            // Add a predicate.
-            clause.predicates.push(WherePredicate::Type(PredicateType {
-                lifetimes: None,
-                bounded_ty: ty,
-                colon_token: Default::default(),
-                bounds: Some(punctuated::Pair::End(TypeParamBound::Trait(bound.clone())))
-                    .into_iter()
-                    .collect(),
-            }));
-        };
-
-        for variant in &self.variants {
-            for binding in &variant.bindings {
-                match mode {
-                    AddBounds::Both | AddBounds::Fields => {
-                        for &seen in &binding.seen_generics {
-                            if seen {
-                                pred(binding.ast().ty.clone());
-                                break;
-                            }
-                        }
-                    }
-                    _ => {}
-                }
-
-                match mode {
-                    AddBounds::Both | AddBounds::Generics => {
-                        for param in binding.referenced_ty_params() {
-                            pred(Type::Path(TypePath {
-                                qself: None,
-                                path: (*param).clone().into(),
-                            }));
-                        }
-                    }
-                    _ => {}
-                }
-            }
-        }
-    }
-
-    /// > NOTE: This methods' features are superceded by `Structure::gen_impl`.
-    ///
-    /// Creates an `impl` block with the required generic type fields filled in
-    /// to implement the trait `path`.
-    ///
-    /// This method also adds where clauses to the impl requiring that all
-    /// referenced type parmaeters implement the trait `path`.
-    ///
-    /// # Hygiene and Paths
-    ///
-    /// This method wraps the impl block inside of a `const` (see the example
-    /// below). In this scope, the first segment of the passed-in path is
-    /// `extern crate`-ed in. If you don't want to generate that `extern crate`
-    /// item, use a global path.
-    ///
-    /// This means that if you are implementing `my_crate::Trait`, you simply
-    /// write `s.bound_impl(quote!(my_crate::Trait), quote!(...))`, and for the
-    /// entirety of the definition, you can refer to your crate as `my_crate`.
-    ///
-    /// # Caveat
-    ///
-    /// If the method contains any macros in type position, all parameters will
-    /// be considered bound. This is because we cannot determine which type
-    /// parameters are bound by type macros.
-    ///
-    /// # Panics
-    ///
-    /// Panics if the path string parameter is not a valid `TraitBound`.
-    ///
-    /// # Example
-    /// ```
-    /// # #[macro_use] extern crate quote;
-    /// # extern crate synstructure;
-    /// # #[macro_use] extern crate syn;
-    /// # use synstructure::*;
-    /// # fn main() {
-    /// let di: syn::DeriveInput = parse_quote! {
-    ///     enum A<T, U> {
-    ///         B(T),
-    ///         C(Option<U>),
-    ///     }
-    /// };
-    /// let mut s = Structure::new(&di);
-    ///
-    /// s.filter_variants(|v| v.ast().ident != "B");
-    ///
-    /// assert_eq!(
-    ///     s.bound_impl(quote!(krate::Trait), quote!{
-    ///         fn a() {}
-    ///     }).to_string(),
-    ///     quote!{
-    ///         #[allow(non_upper_case_globals)]
-    ///         const _DERIVE_krate_Trait_FOR_A: () = {
-    ///             extern crate krate;
-    ///             impl<T, U> krate::Trait for A<T, U>
-    ///                 where Option<U>: krate::Trait,
-    ///                       U: krate::Trait
-    ///             {
-    ///                 fn a() {}
-    ///             }
-    ///         };
-    ///     }.to_string()
-    /// );
-    /// # }
-    /// ```
-    pub fn bound_impl<P: ToTokens,B: ToTokens>(&self, path: P, body: B) -> TokenStream {
-        self.impl_internal(
-            path.into_token_stream(),
-            body.into_token_stream(),
-            quote!(),
-            None,
-        )
-    }
-
-    /// > NOTE: This methods' features are superceded by `Structure::gen_impl`.
-    ///
-    /// Creates an `impl` block with the required generic type fields filled in
-    /// to implement the unsafe trait `path`.
-    ///
-    /// This method also adds where clauses to the impl requiring that all
-    /// referenced type parmaeters implement the trait `path`.
-    ///
-    /// # Hygiene and Paths
-    ///
-    /// This method wraps the impl block inside of a `const` (see the example
-    /// below). In this scope, the first segment of the passed-in path is
-    /// `extern crate`-ed in. If you don't want to generate that `extern crate`
-    /// item, use a global path.
-    ///
-    /// This means that if you are implementing `my_crate::Trait`, you simply
-    /// write `s.bound_impl(quote!(my_crate::Trait), quote!(...))`, and for the
-    /// entirety of the definition, you can refer to your crate as `my_crate`.
-    ///
-    /// # Caveat
-    ///
-    /// If the method contains any macros in type position, all parameters will
-    /// be considered bound. This is because we cannot determine which type
-    /// parameters are bound by type macros.
-    ///
-    /// # Panics
-    ///
-    /// Panics if the path string parameter is not a valid `TraitBound`.
-    ///
-    /// # Example
-    /// ```
-    /// # #[macro_use] extern crate quote;
-    /// # extern crate synstructure;
-    /// # #[macro_use] extern crate syn;
-    /// # use synstructure::*;
-    /// # fn main() {
-    /// let di: syn::DeriveInput = parse_quote! {
-    ///     enum A<T, U> {
-    ///         B(T),
-    ///         C(Option<U>),
-    ///     }
-    /// };
-    /// let mut s = Structure::new(&di);
-    ///
-    /// s.filter_variants(|v| v.ast().ident != "B");
-    ///
-    /// assert_eq!(
-    ///     s.unsafe_bound_impl(quote!(krate::Trait), quote!{
-    ///         fn a() {}
-    ///     }).to_string(),
-    ///     quote!{
-    ///         #[allow(non_upper_case_globals)]
-    ///         const _DERIVE_krate_Trait_FOR_A: () = {
-    ///             extern crate krate;
-    ///             unsafe impl<T, U> krate::Trait for A<T, U>
-    ///                 where Option<U>: krate::Trait,
-    ///                       U: krate::Trait
-    ///             {
-    ///                 fn a() {}
-    ///             }
-    ///         };
-    ///     }.to_string()
-    /// );
-    /// # }
-    /// ```
-    pub fn unsafe_bound_impl<P: ToTokens, B: ToTokens>(&self, path: P, body: B) -> TokenStream {
-        self.impl_internal(
-            path.into_token_stream(),
-            body.into_token_stream(),
-            quote!(unsafe),
-            None,
-        )
-    }
-
-    /// > NOTE: This methods' features are superceded by `Structure::gen_impl`.
-    ///
-    /// Creates an `impl` block with the required generic type fields filled in
-    /// to implement the trait `path`.
-    ///
-    /// This method will not add any where clauses to the impl.
-    ///
-    /// # Hygiene and Paths
-    ///
-    /// This method wraps the impl block inside of a `const` (see the example
-    /// below). In this scope, the first segment of the passed-in path is
-    /// `extern crate`-ed in. If you don't want to generate that `extern crate`
-    /// item, use a global path.
-    ///
-    /// This means that if you are implementing `my_crate::Trait`, you simply
-    /// write `s.bound_impl(quote!(my_crate::Trait), quote!(...))`, and for the
-    /// entirety of the definition, you can refer to your crate as `my_crate`.
-    ///
-    /// # Panics
-    ///
-    /// Panics if the path string parameter is not a valid `TraitBound`.
-    ///
-    /// # Example
-    /// ```
-    /// # #[macro_use] extern crate quote;
-    /// # extern crate synstructure;
-    /// # #[macro_use] extern crate syn;
-    /// # use synstructure::*;
-    /// # fn main() {
-    /// let di: syn::DeriveInput = parse_quote! {
-    ///     enum A<T, U> {
-    ///         B(T),
-    ///         C(Option<U>),
-    ///     }
-    /// };
-    /// let mut s = Structure::new(&di);
-    ///
-    /// s.filter_variants(|v| v.ast().ident != "B");
-    ///
-    /// assert_eq!(
-    ///     s.unbound_impl(quote!(krate::Trait), quote!{
-    ///         fn a() {}
-    ///     }).to_string(),
-    ///     quote!{
-    ///         #[allow(non_upper_case_globals)]
-    ///         const _DERIVE_krate_Trait_FOR_A: () = {
-    ///             extern crate krate;
-    ///             impl<T, U> krate::Trait for A<T, U> {
-    ///                 fn a() {}
-    ///             }
-    ///         };
-    ///     }.to_string()
-    /// );
-    /// # }
-    /// ```
-    pub fn unbound_impl<P: ToTokens, B: ToTokens>(&self, path: P, body: B) -> TokenStream {
-        self.impl_internal(
-            path.into_token_stream(),
-            body.into_token_stream(),
-            quote!(),
-            Some(AddBounds::None),
-        )
-    }
-
-    /// > NOTE: This methods' features are superceded by `Structure::gen_impl`.
-    ///
-    /// Creates an `impl` block with the required generic type fields filled in
-    /// to implement the unsafe trait `path`.
-    ///
-    /// This method will not add any where clauses to the impl.
-    ///
-    /// # Hygiene and Paths
-    ///
-    /// This method wraps the impl block inside of a `const` (see the example
-    /// below). In this scope, the first segment of the passed-in path is
-    /// `extern crate`-ed in. If you don't want to generate that `extern crate`
-    /// item, use a global path.
-    ///
-    /// This means that if you are implementing `my_crate::Trait`, you simply
-    /// write `s.bound_impl(quote!(my_crate::Trait), quote!(...))`, and for the
-    /// entirety of the definition, you can refer to your crate as `my_crate`.
-    ///
-    /// # Panics
-    ///
-    /// Panics if the path string parameter is not a valid `TraitBound`.
-    ///
-    /// # Example
-    /// ```
-    /// # #[macro_use] extern crate quote;
-    /// # extern crate synstructure;
-    /// # #[macro_use] extern crate syn;
-    /// # use synstructure::*;
-    /// # fn main() {
-    /// let di: syn::DeriveInput = parse_quote! {
-    ///     enum A<T, U> {
-    ///         B(T),
-    ///         C(Option<U>),
-    ///     }
-    /// };
-    /// let mut s = Structure::new(&di);
-    ///
-    /// s.filter_variants(|v| v.ast().ident != "B");
-    ///
-    /// assert_eq!(
-    ///     s.unsafe_unbound_impl(quote!(krate::Trait), quote!{
-    ///         fn a() {}
-    ///     }).to_string(),
-    ///     quote!{
-    ///         #[allow(non_upper_case_globals)]
-    ///         const _DERIVE_krate_Trait_FOR_A: () = {
-    ///             extern crate krate;
-    ///             unsafe impl<T, U> krate::Trait for A<T, U> {
-    ///                 fn a() {}
-    ///             }
-    ///         };
-    ///     }.to_string()
-    /// );
-    /// # }
-    /// ```
-    #[deprecated]
-    pub fn unsafe_unbound_impl<P: ToTokens, B: ToTokens>(&self, path: P, body: B) -> TokenStream {
-        self.impl_internal(
-            path.into_token_stream(),
-            body.into_token_stream(),
-            quote!(unsafe),
-            Some(AddBounds::None),
-        )
-    }
-
-    fn impl_internal(
-        &self,
-        path: TokenStream,
-        body: TokenStream,
-        safety: TokenStream,
-        mode: Option<AddBounds>,
-    ) -> TokenStream {
-        let mode = mode.unwrap_or(self.add_bounds);
-        let name = &self.ast.ident;
-        let mut gen_clone = self.ast.generics.clone();
-        gen_clone.params.extend(self.extra_impl.clone().into_iter());
-        let (impl_generics, _, _) = gen_clone.split_for_impl();
-        let (_, ty_generics, where_clause) = self.ast.generics.split_for_impl();
-
-        let bound = syn::parse2::<TraitBound>(path.into())
-            .expect("`path` argument must be a valid rust trait bound");
-
-        let mut where_clause = where_clause.cloned();
-        self.add_trait_bounds(&bound, &mut where_clause, mode);
-
-        let dummy_const: Ident = sanitize_ident(&format!(
-            "_DERIVE_{}_FOR_{}",
-            (&bound).into_token_stream(),
-            name.into_token_stream(),
-        ));
-
-        // This function is smart. If a global path is passed, no extern crate
-        // statement will be generated, however, a relative path will cause the
-        // crate which it is relative to to be imported within the current
-        // scope.
-        let mut extern_crate = quote!();
-        if bound.path.leading_colon.is_none() {
-            if let Some(ref seg) = bound.path.segments.first() {
-                let seg = seg.value();
-                extern_crate = quote! { extern crate #seg; };
-            }
-        }
-
-        quote! {
-            #[allow(non_upper_case_globals)]
-            const #dummy_const: () = {
-                #extern_crate
-                #safety impl #impl_generics #bound for #name #ty_generics #where_clause {
-                    #body
-                }
-            };
-        }
-    }
-
-    /// Generate an impl block for the given struct. This impl block will
-    /// automatically use hygiene tricks to avoid polluting the caller's
-    /// namespace, and will automatically add trait bounds for generic type
-    /// parameters.
-    ///
-    /// # Syntax
-    ///
-    /// This function accepts its arguments as a `TokenStream`. The recommended way
-    /// to call this function is passing the result of invoking the `quote!`
-    /// macro to it.
-    ///
-    /// ```ignore
-    /// s.gen_impl(quote! {
-    ///     // You can write any items which you want to import into scope here.
-    ///     // For example, you may want to include an `extern crate` for the
-    ///     // crate which implements your trait. These items will only be
-    ///     // visible to the code you generate, and won't be exposed to the
-    ///     // consuming crate
-    ///     extern crate krate;
-    ///
-    ///     // You can also add `use` statements here to bring types or traits
-    ///     // into scope.
-    ///     //
-    ///     // WARNING: Try not to use common names here, because the stable
-    ///     // version of syn does not support hygiene and you could accidentally
-    ///     // shadow types from the caller crate.
-    ///     use krate::Trait as MyTrait;
-    ///
-    ///     // The actual impl block is a `gen impl` or `gen unsafe impl` block.
-    ///     // You can use `@Self` to refer to the structure's type.
-    ///     gen impl MyTrait for @Self {
-    ///         fn f(&self) { ... }
-    ///     }
-    /// })
-    /// ```
-    ///
-    /// The most common usage of this trait involves loading the crate the
-    /// target trait comes from with `extern crate`, and then invoking a `gen
-    /// impl` block.
-    ///
-    /// # Hygiene
-    ///
-    /// This method tries to handle hygiene intelligenly for both stable and
-    /// unstable proc-macro implementations, however there are visible
-    /// differences.
-    ///
-    /// The output of every `gen_impl` function is wrapped in a dummy `const`
-    /// value, to ensure that it is given its own scope, and any values brought
-    /// into scope are not leaked to the calling crate. For example, the above
-    /// invocation may generate an output like the following:
-    ///
-    /// ```ignore
-    /// const _DERIVE_krate_Trait_FOR_Struct: () = {
-    ///     extern crate krate;
-    ///     use krate::Trait as MyTrait;
-    ///     impl<T> MyTrait for Struct<T> where T: MyTrait {
-    ///         fn f(&self) { ... }
-    ///     }
-    /// };
-    /// ```
-    ///
-    /// ### Using the `std` crate
-    ///
-    /// If you are using `quote!()` to implement your trait, with the
-    /// `proc-macro2/nightly` feature, `std` isn't considered to be in scope for
-    /// your macro. This means that if you use types from `std` in your
-    /// procedural macro, you'll want to explicitly load it with an `extern
-    /// crate std;`.
-    ///
-    /// ### Absolute paths
-    ///
-    /// You should generally avoid using absolute paths in your generated code,
-    /// as they will resolve very differently when using the stable and nightly
-    /// versions of `proc-macro2`. Instead, load the crates you need to use
-    /// explictly with `extern crate` and
-    ///
-    /// # Trait Bounds
-    ///
-    /// This method will automatically add trait bounds for any type parameters
-    /// which are referenced within the types of non-ignored fields.
-    ///
-    /// Additional type parameters may be added with the generics syntax after
-    /// the `impl` keyword.
-    ///
-    /// ### Type Macro Caveat
-    ///
-    /// If the method contains any macros in type position, all parameters will
-    /// be considered bound. This is because we cannot determine which type
-    /// parameters are bound by type macros.
-    ///
-    /// # Panics
-    ///
-    /// This function will panic if the input `TokenStream` is not well-formed, or
-    /// if additional type parameters added by `impl<..>` conflict with generic
-    /// type parameters on the original struct.
-    ///
-    /// # Example Usage
-    ///
-    /// ```
-    /// # #![recursion_limit="128"]
-    /// # #[macro_use] extern crate quote;
-    /// # extern crate synstructure;
-    /// # #[macro_use] extern crate syn;
-    /// # use synstructure::*;
-    /// # fn main() {
-    /// let di: syn::DeriveInput = parse_quote! {
-    ///     enum A<T, U> {
-    ///         B(T),
-    ///         C(Option<U>),
-    ///     }
-    /// };
-    /// let mut s = Structure::new(&di);
-    ///
-    /// s.filter_variants(|v| v.ast().ident != "B");
-    ///
-    /// assert_eq!(
-    ///     s.gen_impl(quote! {
-    ///         extern crate krate;
-    ///         gen impl krate::Trait for @Self {
-    ///             fn a() {}
-    ///         }
-    ///     }).to_string(),
-    ///     quote!{
-    ///         #[allow(non_upper_case_globals)]
-    ///         const _DERIVE_krate_Trait_FOR_A: () = {
-    ///             extern crate krate;
-    ///             impl<T, U> krate::Trait for A<T, U>
-    ///             where
-    ///                 Option<U>: krate::Trait,
-    ///                 U: krate::Trait
-    ///             {
-    ///                 fn a() {}
-    ///             }
-    ///         };
-    ///     }.to_string()
-    /// );
-    ///
-    /// // NOTE: You can also add extra generics after the impl
-    /// assert_eq!(
-    ///     s.gen_impl(quote! {
-    ///         extern crate krate;
-    ///         gen impl<X: krate::OtherTrait> krate::Trait<X> for @Self
-    ///         where
-    ///             X: Send + Sync,
-    ///         {
-    ///             fn a() {}
-    ///         }
-    ///     }).to_string(),
-    ///     quote!{
-    ///         #[allow(non_upper_case_globals)]
-    ///         const _DERIVE_krate_Trait_X_FOR_A: () = {
-    ///             extern crate krate;
-    ///             impl<X: krate::OtherTrait, T, U> krate::Trait<X> for A<T, U>
-    ///             where
-    ///                 X: Send + Sync,
-    ///                 Option<U>: krate::Trait<X>,
-    ///                 U: krate::Trait<X>
-    ///             {
-    ///                 fn a() {}
-    ///             }
-    ///         };
-    ///     }.to_string()
-    /// );
-    /// # }
-    /// ```
-    ///
-    /// Use `add_bounds` to change which bounds are generated.
-    pub fn gen_impl(&self, cfg: TokenStream) -> TokenStream {
-        use syn::parse::{Parser, ParseStream, Result};
-
-        // Syn requires parsers to be methods conforming to a strict signature
-        let do_parse = |input: ParseStream| -> Result<TokenStream> {
-            // Helper lambda to parse the prefix of a gen block.
-            let parse_prefix = |input: ParseStream| -> Result<_> {
-                if input.parse::<Ident>()? != "gen" {
-                    return Err(input.error(""));
-                }
-                let safety = input.parse::<Option<Token![unsafe]>>()?;
-                let _ = input.parse::<Token![impl]>()?;
-                Ok(safety)
-            };
-
-            let mut before = vec![];
-            loop {
-                if let Ok(_) = parse_prefix(&input.fork()) {
-                    break;
-                }
-                before.push(input.parse::<TokenTree>()?);
-            }
-
-            // Parse the prefix "for real"
-            let safety = parse_prefix(input)?;
-
-            // optional `<>`
-            let mut generics = input.parse::<Generics>()?;
-
-            // @bound
-            let bound = input.parse::<TraitBound>()?;
-
-            // `for @Self`
-            let _ = input.parse::<Token![for]>()?;
-            let _ = input.parse::<Token![@]>()?;
-            let _ = input.parse::<Token![Self]>()?;
-
-            // optional `where ...`
-            generics.where_clause = input.parse()?;
-
-            // Body of the impl
-            let body;
-            braced!(body in input);
-            let body = body.parse::<TokenStream>()?;
-
-            // Tokens following impl
-            let after = input.parse::<TokenStream>()?;
-
-            /* Codegen Logic */
-            let name = &self.ast.ident;
-
-            // Add the generics from the original struct in, and then add any
-            // additional trait bounds which we need on the type.
-            merge_generics(&mut generics, &self.ast.generics);
-            self.add_trait_bounds(&bound, &mut generics.where_clause, self.add_bounds);
-            let (impl_generics, _, where_clause) = generics.split_for_impl();
-            let (_, ty_generics, _) = self.ast.generics.split_for_impl();
-
-            let dummy_const: Ident = sanitize_ident(&format!(
-                "_DERIVE_{}_FOR_{}",
-                (&bound).into_token_stream(),
-                name.into_token_stream(),
-            ));
-
-            Ok(quote! {
-                #[allow(non_upper_case_globals)]
-                const #dummy_const: () = {
-                    #(#before)*
-                    #safety impl #impl_generics #bound for #name #ty_generics #where_clause {
-                        #body
-                    }
-                    #after
-                };
-            })
-        };
-        Parser::parse2(do_parse, cfg).expect("Failed to parse gen_impl")
-    }
-}
-
-/// Dumps an unpretty version of a tokenstream. Takes any type which implements
-/// `Display`.
-///
-/// This is mostly useful for visualizing the output of a procedural macro, as
-/// it makes it marginally more readable. It is used in the implementation of
-/// `test_derive!` to unprettily print the output.
-///
-/// # Stability
-///
-/// The stability of the output of this function is not guaranteed. Do not
-/// assert that the output of this function does not change between minor
-/// versions.
-///
-/// # Example
-///
-/// ```
-/// # extern crate synstructure;
-/// # #[macro_use] extern crate quote;
-/// # fn main() {
-/// assert_eq!(
-///     synstructure::unpretty_print(quote! {
-///         #[allow(non_upper_case_globals)]
-///         const _DERIVE_krate_Trait_FOR_A: () = {
-///             extern crate krate;
-///             impl<T, U> krate::Trait for A<T, U>
-///             where
-///                 Option<U>: krate::Trait,
-///                 U: krate::Trait
-///             {
-///                 fn a() {}
-///             }
-///         };
-///     }),
-///     "# [
-///     allow (
-///         non_upper_case_globals )
-///     ]
-/// const _DERIVE_krate_Trait_FOR_A : (
-///     )
-/// = {
-///     extern crate krate ;
-///     impl < T , U > krate :: Trait for A < T , U > where Option < U > : krate :: Trait , U : krate :: Trait {
-///         fn a (
-///             )
-///         {
-///             }
-///         }
-///     }
-/// ;
-/// "
-/// )
-/// # }
-/// ```
-pub fn unpretty_print<T: std::fmt::Display>(ts: T) -> String {
-    let mut res = String::new();
-
-    let raw_s = ts.to_string();
-    let mut s = &raw_s[..];
-    let mut indent = 0;
-    while let Some(i) = s.find(&['(', '{', '[', ')', '}', ']', ';'][..]) {
-        match &s[i..i + 1] {
-            "(" | "{" | "[" => indent += 1,
-            ")" | "}" | "]" => indent -= 1,
-            _ => {}
-        }
-        res.push_str(&s[..i + 1]);
-        res.push('\n');
-        for _ in 0..indent {
-            res.push_str("    ");
-        }
-        s = s[i + 1..].trim_left_matches(' ');
-    }
-    res.push_str(s);
-    res
-}
deleted file mode 100644
--- a/third_party/rust/synstructure-0.10.1/src/macros.rs
+++ /dev/null
@@ -1,415 +0,0 @@
-//! This module provides two utility macros for testing custom derives. They can
-//! be used together to eliminate some of the boilerplate required in order to
-//! declare and test custom derive implementations.
-
-// Re-exports used by the decl_derive! and test_derive!
-pub use syn::{parse_str, parse, DeriveInput};
-pub use proc_macro::TokenStream as TokenStream;
-pub use proc_macro2::TokenStream as TokenStream2;
-
-/// The `decl_derive!` macro declares a custom derive wrapper. It will parse the
-/// incoming `TokenStream` into a `synstructure::Structure` object, and pass it
-/// into the inner function.
-///
-/// Your inner function should have the following type:
-///
-/// ```
-/// # extern crate quote;
-/// # extern crate proc_macro2;
-/// # extern crate synstructure;
-/// fn derive(input: synstructure::Structure) -> proc_macro2::TokenStream {
-///     unimplemented!()
-/// }
-/// ```
-///
-/// # Usage
-///
-/// ### Without Attributes
-/// ```
-/// # #[macro_use] extern crate quote;
-/// # extern crate proc_macro2;
-/// # extern crate synstructure;
-/// # fn main() {}
-/// fn derive_interesting(_input: synstructure::Structure) -> proc_macro2::TokenStream {
-///     quote! { ... }
-/// }
-///
-/// # const _IGNORE: &'static str = stringify! {
-/// decl_derive!([Interesting] => derive_interesting);
-/// # };
-/// ```
-///
-/// ### With Attributes
-/// ```
-/// # #[macro_use] extern crate quote;
-/// # extern crate proc_macro2;
-/// # extern crate synstructure;
-/// # fn main() {}
-/// fn derive_interesting(_input: synstructure::Structure) -> proc_macro2::TokenStream {
-///     quote! { ... }
-/// }
-///
-/// # const _IGNORE: &'static str = stringify! {
-/// decl_derive!([Interesting, attributes(interesting_ignore)] => derive_interesting);
-/// # };
-/// ```
-#[macro_export]
-macro_rules! decl_derive {
-    // XXX: Switch to using this variant everywhere?
-    ([$derives:ident $($derive_t:tt)*] => $inner:path) => {
-        #[proc_macro_derive($derives $($derive_t)*)]
-        #[allow(non_snake_case)]
-        pub fn $derives(
-            i: $crate::macros::TokenStream
-        ) -> $crate::macros::TokenStream
-        {
-            let parsed = $crate::macros::parse::<$crate::macros::DeriveInput>(i)
-                .expect(concat!("Failed to parse input to `#[derive(",
-                                stringify!($derives),
-                                ")]`"));
-            $inner($crate::Structure::new(&parsed)).into()
-        }
-    };
-}
-
-/// Run a test on a custom derive. This macro expands both the original struct
-/// and the expansion to ensure that they compile correctly, and confirms that
-/// feeding the original struct into the named derive will produce the written
-/// output.
-///
-/// You can add `no_build` to the end of the macro invocation to disable
-/// checking that the written code compiles. This is useful in contexts where
-/// the procedural macro cannot depend on the crate where it is used during
-/// tests.
-///
-/// # Usage
-///
-/// ```
-/// # #[macro_use] extern crate quote;
-/// # extern crate proc_macro2;
-/// # #[macro_use] extern crate synstructure;
-/// fn test_derive_example(_s: synstructure::Structure) -> proc_macro2::TokenStream {
-///     quote! { const YOUR_OUTPUT: &'static str = "here"; }
-/// }
-///
-/// fn main() {
-///     test_derive!{
-///         test_derive_example {
-///             struct A;
-///         }
-///         expands to {
-///             const YOUR_OUTPUT: &'static str = "here";
-///         }
-///     }
-/// }
-/// ```
-#[macro_export]
-macro_rules! test_derive {
-    ($name:path { $($i:tt)* } expands to { $($o:tt)* }) => {
-        {
-            #[allow(dead_code)]
-            fn ensure_compiles() {
-                $($i)*
-                $($o)*
-            }
-
-            test_derive!($name { $($i)* } expands to { $($o)* } no_build);
-        }
-    };
-
-    ($name:path { $($i:tt)* } expands to { $($o:tt)* } no_build) => {
-        {
-            let i = stringify!( $($i)* );
-            let parsed = $crate::macros::parse_str::<$crate::macros::DeriveInput>(i)
-                .expect(concat!("Failed to parse input to `#[derive(",
-                                stringify!($name),
-                                ")]`"));
-
-            let res = $name($crate::Structure::new(&parsed));
-            let expected = stringify!( $($o)* )
-                .parse::<$crate::macros::TokenStream2>()
-                .expect("output should be a valid TokenStream");
-            let mut expected_toks = $crate::macros::TokenStream2::from(expected);
-            if res.to_string() != expected_toks.to_string() {
-                panic!("\
-test_derive failed:
-expected:
-```
-{}
-```
-
-got:
-```
-{}
-```\n",
-                    $crate::unpretty_print(&expected_toks),
-                    $crate::unpretty_print(&res),
-                );
-            }
-            // assert_eq!(res, expected_toks)
-        }
-    };
-}
-
-/// A helper macro for declaring relatively straightforward derive
-/// implementations. It provides mechanisms for operating over structures
-/// performing modifications on each field etc.
-///
-/// This macro doesn't define the actual derive, but rather the implementation
-/// method. Use `decl_derive!` to generate the implementation wrapper.
-///
-/// # Stability Warning
-///
-/// This is an unstable experimental macro API, which may be changed or removed
-/// in a future version. I'm not yet confident enough that this API is useful
-/// enough to warrant its complexity and inclusion in `synstructure`.
-///
-/// # Caveat
-///
-/// The `quote!` macro from `quote` must be imported in the calling crate, as
-/// this macro depends on it.
-///
-/// # Note
-///
-/// This feature is implemented behind the `simple-derive` feature, and is only
-/// available when that feature is enabled.
-///
-/// # Example
-///
-/// ```
-/// extern crate syn;
-/// #[macro_use]
-/// extern crate quote;
-/// #[macro_use]
-/// extern crate synstructure;
-/// extern crate proc_macro2;
-/// # const _IGNORE: &'static str = stringify! {
-/// decl_derive!([Interest] => derive_interest);
-/// # };
-///
-/// simple_derive! {
-///     // This macro implements the `Interesting` method exported by the `aa`
-///     // crate. It will explicitly add an `extern crate` invocation to import the
-///     // crate into the expanded context.
-///     derive_interest impl synstructure_test_traits::Interest {
-///         // A "filter" block can be added. It evaluates its body with the (s)
-///         // variable bound to a mutable reference to the input `Structure`
-///         // object.
-///         //
-///         // This block can be used to perform general transformations, such as
-///         // filtering out fields which should be ignored by all methods and for
-///         // the purposes of binding type parameters.
-///         filter(s) {
-///             s.filter(|bi| bi.ast().ident != Some(syn::Ident::new("a",
-///                 proc_macro2::Span::call_site())));
-///         }
-///
-///         // This is an implementation of a method in the implemented crate. The
-///         // return value should be the series of match patterns to destructure
-///         // the `self` argument with.
-///         fn interesting(&self as s) -> bool {
-///             s.fold(false, |acc, bi| {
-///                 quote!(#acc || synstructure_test_traits::Interest::interesting(#bi))
-///             })
-///         }
-///     }
-/// }
-///
-/// fn main() {
-///     test_derive!{
-///         derive_interest {
-///             struct A<T> {
-///                 x: i32,
-///                 a: bool, // Will be ignored by filter
-///                 c: T,
-///             }
-///         }
-///         expands to {
-///             #[allow(non_upper_case_globals)]
-///             const _DERIVE_synstructure_test_traits_Interest_FOR_A: () = {
-///                 extern crate synstructure_test_traits;
-///                 impl<T> synstructure_test_traits::Interest for A<T>
-///                     where T: synstructure_test_traits::Interest
-///                 {
-///                     fn interesting(&self) -> bool {
-///                         match *self {
-///                             A {
-///                                 x: ref __binding_0,
-///                                 c: ref __binding_2,
-///                                 ..
-///                             } => {
-///                                 false ||
-///                                     synstructure_test_traits::Interest::interesting(__binding_0) ||
-///                                     synstructure_test_traits::Interest::interesting(__binding_2)
-///                             }
-///                         }
-///                     }
-///                 }
-///             };
-///         }
-///     }
-/// }
-/// ```
-#[cfg(feature = "simple-derive")]
-#[macro_export]
-macro_rules! simple_derive {
-    // entry point
-    (
-        $iname:ident impl $path:path { $($rest:tt)* }
-    ) => {
-        simple_derive!(__I [$iname, $path] { $($rest)* } [] []);
-    };
-
-    // Adding a filter block
-    (
-        __I $opt:tt {
-            filter($s:ident) {
-                $($body:tt)*
-            }
-            $($rest:tt)*
-        } [$($done:tt)*] [$($filter:tt)*]
-    ) => {
-        simple_derive!(
-            __I $opt { $($rest)* } [$($done)*] [
-                $($filter)*
-                [
-                    st_name = $s,
-                    body = {
-                        $($body)*
-                    },
-                ]
-            ]
-        );
-    };
-
-    // &self bound method
-    (
-        __I $opt:tt {
-            fn $fn_name:ident (&self as $s:ident $($params:tt)*) $(-> $t:ty)* {
-                $($body:tt)*
-            }
-            $($rest:tt)*
-        } [$($done:tt)*] [$($filter:tt)*]
-    ) => {
-        simple_derive!(
-            __I $opt { $($rest)* } [
-                $($done)*
-                [
-                    st_name = $s,
-                    bind_style = Ref,
-                    body = { $($body)* },
-                    result = result,
-                    expanded = {
-                        fn $fn_name(&self $($params)*) $(-> $t)* {
-                            match *self { #result }
-                        }
-                    },
-                ]
-            ] [$($filter)*]
-        );
-    };
-
-    // &mut self bound method
-    (
-        __I $opt:tt {
-            fn $fn_name:ident (&mut self as $s:ident $($params:tt)*) $(-> $t:ty)* {
-                $($body:tt)*
-            }
-            $($rest:tt)*
-        } [$($done:tt)*] [$($filter:tt)*]
-    ) => {
-        simple_derive!(
-            __I $opt { $($rest)* } [
-                $($done)*
-                [
-                    st_name = $s,
-                    bind_style = RefMut,
-                    body = { $($body)* },
-                    result = result,
-                    expanded = {
-                        fn $fn_name(&mut self $($params)*) $(-> $t)* {
-                            match *self { #result }
-                        }
-                    },
-                ]
-            ] [$($filter)*]
-        );
-    };
-
-    // self bound method
-    (
-        __I $opt:tt {
-            fn $fn_name:ident (self as $s:ident $($params:tt)*) $(-> $t:ty)* {
-                $($body:tt)*
-            }
-            $($rest:tt)*
-        } [$($done:tt)*] [$($filter:tt)*]
-    ) => {
-        simple_derive!(
-            __I $opt { $($rest)* } [
-                $($done)*
-                [
-                    st_name = $s,
-                    bind_style = Move,
-                    body = { $($body)* },
-                    result = result,
-                    expanded = {
-                        fn $fn_name(self $($params)*) $(-> $t)* {
-                            match self { #result }
-                        }
-                    },
-                ]
-            ] [$($filter)*]
-        );
-    };
-
-    // XXX: Static methods?
-
-    // codegen after data collection
-    (
-        __I [$iname:ident, $path:path] {} [$(
-            [
-                st_name = $st_name:ident,
-                bind_style = $bind_style:ident,
-                body = $body:tt,
-                result = $result:ident,
-                expanded = { $($expanded:tt)* },
-            ]
-        )*] [$(
-            [
-                st_name = $filter_st_name:ident,
-                body = $filter_body:tt,
-            ]
-        )*]
-    ) => {
-        fn $iname(mut st: $crate::Structure) -> $crate::macros::TokenStream2 {
-            let _ = &mut st; // Silence the unused mut warning
-
-            // Filter/transform the `Structure` object before cloning it for
-            // individual methods.
-            $(
-                {
-                    let $filter_st_name = &mut st;
-                    $filter_body
-                }
-            )*
-
-            // Clone the `Structure` object and set the correct binding style,
-            // then perform method specific expansion.
-            $(
-                let $result = {
-                    let mut $st_name = st.clone();
-                    $st_name.bind_with(|_| ::synstructure::BindStyle::$bind_style);
-                    let $result = {
-                        $body
-                    };
-                    quote!{ $($expanded)* }
-                };
-            )*
-
-            st.bound_impl(quote!($path), quote!{
-                $(#$result)*
-            })
-        }
-    }
-}
--- a/toolkit/components/cleardata/ClearDataService.jsm
+++ b/toolkit/components/cleardata/ClearDataService.jsm
@@ -68,48 +68,48 @@ const CookieCleaner = {
         aHost,
         JSON.stringify(aOriginAttributes)
       );
       aResolve();
     });
   },
 
   deleteByRange(aFrom, aTo) {
-    let enumerator = Services.cookies.enumerator;
+    let cookies = Services.cookies.cookies;
     return this._deleteInternal(
-      enumerator,
+      cookies,
       aCookie => aCookie.creationTime > aFrom
     );
   },
 
   deleteAll() {
     return new Promise(aResolve => {
       Services.cookies.removeAll();
       aResolve();
     });
   },
 
-  _deleteInternal(aEnumerator, aCb) {
+  _deleteInternal(aCookies, aCb) {
     // A number of iterations after which to yield time back to the system.
     const YIELD_PERIOD = 10;
 
     return new Promise((aResolve, aReject) => {
       let count = 0;
-      for (let cookie of aEnumerator) {
+      for (let cookie of aCookies) {
         if (aCb(cookie)) {
           Services.cookies.remove(
             cookie.host,
             cookie.name,
             cookie.path,
             cookie.originAttributes
           );
           // We don't want to block the main-thread.
           if (++count % YIELD_PERIOD == 0) {
             setTimeout(() => {
-              this._deleteInternal(aEnumerator, aCb).then(aResolve, aReject);
+              this._deleteInternal(aCookies, aCb).then(aResolve, aReject);
             }, 0);
             return;
           }
         }
       }
 
       aResolve();
     });
--- a/toolkit/components/cleardata/SiteDataTestUtils.jsm
+++ b/toolkit/components/cleardata/SiteDataTestUtils.jsm
@@ -137,17 +137,17 @@ var SiteDataTestUtils = {
       });
     });
   },
 
   hasCookies(origin) {
     let principal = Services.scriptSecurityManager.createContentPrincipalFromOrigin(
       origin
     );
-    for (let cookie of Services.cookies.enumerator) {
+    for (let cookie of Services.cookies.cookies) {
       if (
         ChromeUtils.isOriginAttributesEqual(
           principal.originAttributes,
           cookie.originAttributes
         ) &&
         cookie.host.includes(principal.URI.host)
       ) {
         return true;
--- a/toolkit/components/contextualidentity/ContextualIdentityService.jsm
+++ b/toolkit/components/contextualidentity/ContextualIdentityService.jsm
@@ -601,17 +601,17 @@ function _ContextualIdentityService(path
 
     // Collect the userContextId related to the identities that should not be cleared
     // (the ones marked as `public = false`).
     const keepDataContextIds = this.getPrivateUserContextIds();
 
     // Collect the userContextIds currently used by any stored cookie.
     let cookiesUserContextIds = new Set();
 
-    for (let cookie of Services.cookies.enumerator) {
+    for (let cookie of Services.cookies.cookies) {
       // Skip any userContextIds that should not be cleared.
       if (
         cookie.originAttributes.userContextId >= minUserContextId &&
         !keepDataContextIds.includes(cookie.originAttributes.userContextId)
       ) {
         cookiesUserContextIds.add(cookie.originAttributes.userContextId);
       }
     }
--- a/toolkit/components/extensions/test/xpcshell/test_ext_cookieBehaviors.js
+++ b/toolkit/components/extensions/test/xpcshell/test_ext_cookieBehaviors.js
@@ -49,17 +49,17 @@ server.registerPathHandler("/page-with-t
 });
 server.registerPathHandler("/sw.js", (request, response) => {
   response.setHeader("Content-Type", "text/javascript", false);
   response.write("");
 });
 
 function assertCookiesForHost(url, cookiesCount, message) {
   const { host } = new URL(url);
-  const cookies = Array.from(Services.cookies.enumerator).filter(
+  const cookies = Services.cookies.cookies.filter(
     cookie => cookie.host === host
   );
   equal(cookies.length, cookiesCount, message);
   return cookies;
 }
 
 // Test that the indexedDB and localStorage are allowed in an extension page
 // and that the indexedDB is allowed in a extension worker.
@@ -274,17 +274,17 @@ add_task(async function test_ext_page_3r
     { behavior: "BEHAVIOR_REJECT_FOREIGN", cookiesCount: 0 },
     { behavior: "BEHAVIOR_REJECT", cookiesCount: 0 },
     { behavior: "BEHAVIOR_LIMIT_FOREIGN", cookiesCount: 0 },
     { behavior: "BEHAVIOR_REJECT_TRACKER", cookiesCount: 1 },
   ];
 
   function clearAllCookies() {
     Services.cookies.removeAll();
-    let cookies = Array.from(Services.cookies.enumerator);
+    let cookies = Services.cookies.cookies;
     equal(cookies.length, 0, "There shouldn't be any cookies after clearing");
   }
 
   async function runTestRequests(extension, cookiesCount, msg) {
     for (const testRequest of testRequests) {
       clearAllCookies();
       extension.sendMessage(testRequest, testUrl);
       await extension.awaitMessage(`${testRequest}:done`);
--- a/toolkit/components/search/tests/xpcshell/test_searchSuggest_cookies.js
+++ b/toolkit/components/search/tests/xpcshell/test_searchSuggest_cookies.js
@@ -41,19 +41,19 @@ function countCacheEntries() {
       },
       true /* Do walk entries */
     );
   });
 }
 
 function countCookieEntries() {
   info("Enumerating cookies");
-  let enumerator = Services.cookies.enumerator;
+  let cookies = Services.cookies.cookies;
   let cookieCount = 0;
-  for (let cookie of enumerator) {
+  for (let cookie of cookies) {
     info(
       "Cookie:" + cookie.rawHost + " " + JSON.stringify(cookie.originAttributes)
     );
     cookieCount++;
     break;
   }
   return cookieCount;
 }
--- a/toolkit/components/telemetry/Histograms.json
+++ b/toolkit/components/telemetry/Histograms.json
@@ -12683,33 +12683,16 @@
   },
   "SHOULD_AUTO_DETECT_LANGUAGE": {
     "record_in_processes": ["main", "content"],
     "products": ["firefox", "fennec", "geckoview"],
     "expires_in_version": "default",
     "kind": "flag",
     "description": "Tracks situations when the user opts for auto-detecting the language of a page"
   },
-  "PERMISSIONS_REMIGRATION_COMPARISON": {
-    "record_in_processes": ["main", "content"],
-    "products": ["firefox", "fennec", "geckoview"],
-    "alert_emails": ["nika@thelayzells.com"],
-    "expires_in_version": "44",
-    "kind": "enumerated",
-    "n_values": 10,
-    "description": "Reports a comparison between row count of original and re-migration of the v7 permissions DB. 0=New == 0, 1=New < Old, 2=New == Old, 3=New > Old"
-  },
-  "PERMISSIONS_MIGRATION_7_ERROR": {
-    "record_in_processes": ["main", "content"],
-    "products": ["firefox", "fennec", "geckoview"],
-    "alert_emails": ["nika@thelayzells.com"],
-    "expires_in_version": "44",
-    "kind": "boolean",
-    "description": "Was there an error while performing the v7 permissions DB migration?"
-  },
   "VIDEO_EME_REQUEST_SUCCESS_LATENCY_MS": {
     "record_in_processes": ["main", "content"],
     "products": ["firefox", "fennec", "geckoview"],
     "alert_emails": ["jya@mozilla.com", "drno@ohlmeier.org"],
     "expires_in_version": "63",
     "kind": "exponential",
     "high": 60000,
     "n_buckets": 60,
--- a/toolkit/components/telemetry/histogram-allowlists.json
+++ b/toolkit/components/telemetry/histogram-allowlists.json
@@ -745,18 +745,16 @@
     "ONBEFOREUNLOAD_PROMPT_ACTION",
     "ONBEFOREUNLOAD_PROMPT_COUNT",
     "OSFILE_WORKER_LAUNCH_MS",
     "OSFILE_WORKER_READY_MS",
     "OSFILE_WRITEATOMIC_JANK_MS",
     "PAGE_FAULTS_HARD",
     "PAINT_BUILD_DISPLAYLIST_TIME",
     "PAINT_RASTERIZE_TIME",
-    "PERMISSIONS_MIGRATION_7_ERROR",
-    "PERMISSIONS_REMIGRATION_COMPARISON",
     "PERMISSIONS_SQL_CORRUPTED",
     "PLACES_ANNOS_BOOKMARKS_COUNT",
     "PLACES_ANNOS_PAGES_COUNT",
     "PLACES_AUTOCOMPLETE_1ST_RESULT_TIME_MS",
     "PLACES_AUTOCOMPLETE_URLINLINE_DOMAIN_QUERY_TIME_MS",
     "PLACES_BACKUPS_BOOKMARKSTREE_MS",
     "PLACES_BACKUPS_DAYSFROMLAST",
     "PLACES_BACKUPS_TOJSON_MS",
--- a/toolkit/content/minimal-xul.css
+++ b/toolkit/content/minimal-xul.css
@@ -68,16 +68,21 @@ scrollcorner, resizer, scrollbar, scroll
 
   /* The initial value of justify-items is `legacy`, which makes it depend on
    * the parent style.
    *
    * Reset it to something else.
    */
   justify-items: start;
 
+  /* Avoid `object > *` rule in html.css from setting a useless, non-initial
+   * value of vertical-align.
+   */
+  vertical-align: initial !important;
+
   /* Duplicate the rules from the '*' rule above, which were clobbered by the
    * 'all: initial' declaration.
    *
    * The other zero specificity rules above are on :root, and scrollbar parts
    * cannot match :root, so no need to duplicate them.
    */
   -moz-user-focus: ignore;
   -moz-user-select: none;
--- a/toolkit/forgetaboutsite/ForgetAboutSite.jsm
+++ b/toolkit/forgetaboutsite/ForgetAboutSite.jsm
@@ -19,19 +19,19 @@ var ForgetAboutSite = {
           errorCode => resolve(bitCounting(errorCode))
         )
       ),
     ];
 
     try {
       let baseDomain = Services.eTLD.getBaseDomainFromHost(aDomain);
 
-      let enumerator = Services.cookies.enumerator;
+      let cookies = Services.cookies.cookies;
       let hosts = new Set();
-      for (let cookie of enumerator) {
+      for (let cookie of cookies) {
         if (Services.eTLD.hasRootDomain(cookie.rawHost, baseDomain)) {
           hosts.add(cookie.rawHost);
         }
       }
 
       for (let host of hosts) {
         promises.push(
           new Promise(resolve =>
--- a/toolkit/forgetaboutsite/test/browser/browser_cookieDomain.js
+++ b/toolkit/forgetaboutsite/test/browser/browser_cookieDomain.js
@@ -1,17 +1,17 @@
 const { ForgetAboutSite } = ChromeUtils.import(
   "resource://gre/modules/ForgetAboutSite.jsm"
 );
 const { SiteDataTestUtils } = ChromeUtils.import(
   "resource://testing-common/SiteDataTestUtils.jsm"
 );
 
 function checkCookie(host, originAttributes) {
-  for (let cookie of Services.cookies.enumerator) {
+  for (let cookie of Services.cookies.cookies) {
     if (
       ChromeUtils.isOriginAttributesEqual(
         originAttributes,
         cookie.originAttributes
       ) &&
       cookie.host.includes(host)
     ) {
       return true;