7cc1fe
diff -up firefox-78.1.0/Cargo.lock.D87019-thin-vec-big-endian.diff firefox-78.1.0/Cargo.lock
7cc1fe
--- firefox-78.1.0/Cargo.lock.D87019-thin-vec-big-endian.diff	2020-07-22 19:56:54.000000000 +0200
7cc1fe
+++ firefox-78.1.0/Cargo.lock	2020-08-17 17:04:24.133598583 +0200
7cc1fe
@@ -4792,12 +4792,9 @@ checksum = "8eaa81235c7058867fa8c0e7314f
7cc1fe
 
7cc1fe
 [[package]]
7cc1fe
 name = "thin-vec"
7cc1fe
-version = "0.1.0"
7cc1fe
+version = "0.2.1"
7cc1fe
 source = "registry+https://github.com/rust-lang/crates.io-index"
7cc1fe
-checksum = "73fdf4b84c65a85168477b7fb6c498e0716bc9487fba24623389ea7f51708044"
7cc1fe
-dependencies = [
7cc1fe
- "libc",
7cc1fe
-]
7cc1fe
+checksum = "dcc760ada4a9f56fc6d0e81bd143984ebc7bb1b875a6891aa2fa613ca7394fc0"
7cc1fe
 
7cc1fe
 [[package]]
7cc1fe
 name = "thiserror"
7cc1fe
diff -up firefox-78.1.0/gfx/webrender_bindings/Cargo.toml.D87019-thin-vec-big-endian.diff firefox-78.1.0/gfx/webrender_bindings/Cargo.toml
7cc1fe
--- firefox-78.1.0/gfx/webrender_bindings/Cargo.toml.D87019-thin-vec-big-endian.diff	2020-08-17 17:04:24.133598583 +0200
7cc1fe
+++ firefox-78.1.0/gfx/webrender_bindings/Cargo.toml	2020-08-17 17:05:26.984805590 +0200
7cc1fe
@@ -20,7 +20,7 @@ nsstring = { path = "../../xpcom/rust/ns
7cc1fe
 bincode = "1.0"
7cc1fe
 uuid = { version = "0.8", features = ["v4"] }
7cc1fe
 fxhash = "0.2.1"
7cc1fe
-thin-vec = { version = "0.1.0", features = ["gecko-ffi"] }
7cc1fe
+thin-vec = { version = "0.2.1", features = ["gecko-ffi"] }
7cc1fe
 swgl = { path = "../wr/swgl" }
7cc1fe
 
7cc1fe
 [dependencies.webrender]
7cc1fe
diff -up firefox-78.1.0/intl/l10n/rust/fluent-ffi/Cargo.toml.D87019-thin-vec-big-endian.diff firefox-78.1.0/intl/l10n/rust/fluent-ffi/Cargo.toml
7cc1fe
--- firefox-78.1.0/intl/l10n/rust/fluent-ffi/Cargo.toml.D87019-thin-vec-big-endian.diff	2020-07-22 17:56:20.000000000 +0200
7cc1fe
+++ firefox-78.1.0/intl/l10n/rust/fluent-ffi/Cargo.toml	2020-08-17 17:04:24.134598587 +0200
7cc1fe
@@ -10,4 +10,4 @@ fluent-pseudo = "0.2"
7cc1fe
 intl-memoizer = "0.4"
7cc1fe
 unic-langid = "0.8"
7cc1fe
 nsstring = { path = "../../../../xpcom/rust/nsstring" }
7cc1fe
-thin-vec = { version = "0.1.0", features = ["gecko-ffi"] }
7cc1fe
+thin-vec = { version = "0.2.1", features = ["gecko-ffi"] }
7cc1fe
diff -up firefox-78.1.0/intl/locale/rust/fluent-langneg-ffi/Cargo.toml.D87019-thin-vec-big-endian.diff firefox-78.1.0/intl/locale/rust/fluent-langneg-ffi/Cargo.toml
7cc1fe
--- firefox-78.1.0/intl/locale/rust/fluent-langneg-ffi/Cargo.toml.D87019-thin-vec-big-endian.diff	2020-07-22 17:56:20.000000000 +0200
7cc1fe
+++ firefox-78.1.0/intl/locale/rust/fluent-langneg-ffi/Cargo.toml	2020-08-17 17:04:24.134598587 +0200
7cc1fe
@@ -9,7 +9,7 @@ edition = "2018"
7cc1fe
 nserror = { path = "../../../../xpcom/rust/nserror" }
7cc1fe
 nsstring = { path = "../../../../xpcom/rust/nsstring" }
7cc1fe
 xpcom = { path = "../../../../xpcom/rust/xpcom" }
7cc1fe
-thin-vec = { version = "0.1.0", features = ["gecko-ffi"] }
7cc1fe
+thin-vec = { version = "0.2.1", features = ["gecko-ffi"] }
7cc1fe
 fluent-langneg = { version = "0.12.1", features = ["cldr"] }
7cc1fe
 unic-langid = "0.8"
7cc1fe
 unic-langid-ffi = { path = "../unic-langid-ffi" }
7cc1fe
diff -up firefox-78.1.0/intl/locale/rust/unic-langid-ffi/Cargo.toml.D87019-thin-vec-big-endian.diff firefox-78.1.0/intl/locale/rust/unic-langid-ffi/Cargo.toml
7cc1fe
--- firefox-78.1.0/intl/locale/rust/unic-langid-ffi/Cargo.toml.D87019-thin-vec-big-endian.diff	2020-07-22 17:56:20.000000000 +0200
7cc1fe
+++ firefox-78.1.0/intl/locale/rust/unic-langid-ffi/Cargo.toml	2020-08-17 17:04:24.134598587 +0200
7cc1fe
@@ -9,5 +9,5 @@ edition = "2018"
7cc1fe
 nserror = { path = "../../../../xpcom/rust/nserror" }
7cc1fe
 nsstring = { path = "../../../../xpcom/rust/nsstring" }
7cc1fe
 xpcom = { path = "../../../../xpcom/rust/xpcom" }
7cc1fe
-thin-vec = { version = "0.1.0", features = ["gecko-ffi"] }
7cc1fe
+thin-vec = { version = "0.2.1", features = ["gecko-ffi"] }
7cc1fe
 unic-langid = { version = "0.8", features = ["likelysubtags"] }
7cc1fe
diff -up firefox-78.1.0/netwerk/socket/neqo_glue/Cargo.toml.D87019-thin-vec-big-endian.diff firefox-78.1.0/netwerk/socket/neqo_glue/Cargo.toml
7cc1fe
--- firefox-78.1.0/netwerk/socket/neqo_glue/Cargo.toml.D87019-thin-vec-big-endian.diff	2020-08-17 17:04:24.134598587 +0200
7cc1fe
+++ firefox-78.1.0/netwerk/socket/neqo_glue/Cargo.toml	2020-08-17 17:05:10.352750807 +0200
7cc1fe
@@ -14,7 +14,7 @@ neqo-common = { tag = "v0.2.4", git = "h
7cc1fe
 nserror = { path = "../../../xpcom/rust/nserror" }
7cc1fe
 nsstring = { path = "../../../xpcom/rust/nsstring" }
7cc1fe
 xpcom = { path = "../../../xpcom/rust/xpcom" }
7cc1fe
-thin-vec = { version = "0.1.0", features = ["gecko-ffi"] }
7cc1fe
+thin-vec = { version = "0.2.1", features = ["gecko-ffi"] }
7cc1fe
 
7cc1fe
 [dependencies.neqo-crypto]
7cc1fe
 tag = "v0.2.4"
7cc1fe
diff -up firefox-78.1.0/security/manager/ssl/cert_storage/Cargo.toml.D87019-thin-vec-big-endian.diff firefox-78.1.0/security/manager/ssl/cert_storage/Cargo.toml
7cc1fe
--- firefox-78.1.0/security/manager/ssl/cert_storage/Cargo.toml.D87019-thin-vec-big-endian.diff	2020-07-22 19:56:55.000000000 +0200
7cc1fe
+++ firefox-78.1.0/security/manager/ssl/cert_storage/Cargo.toml	2020-08-17 17:04:24.134598587 +0200
7cc1fe
@@ -18,6 +18,6 @@ rust_cascade = "0.6.0"
7cc1fe
 sha2 = "^0.8"
7cc1fe
 storage_variant = { path = "../../../../storage/variant" }
7cc1fe
 tempfile = "3"
7cc1fe
-thin-vec = { version = "0.1.0", features = ["gecko-ffi"] }
7cc1fe
+thin-vec = { version = "0.2.1", features = ["gecko-ffi"] }
7cc1fe
 time = "0.1"
7cc1fe
 xpcom = { path = "../../../../xpcom/rust/xpcom" }
7cc1fe
diff -up firefox-78.1.0/services/fxaccounts/rust-bridge/firefox-accounts-bridge/Cargo.toml.D87019-thin-vec-big-endian.diff firefox-78.1.0/services/fxaccounts/rust-bridge/firefox-accounts-bridge/Cargo.toml
7cc1fe
--- firefox-78.1.0/services/fxaccounts/rust-bridge/firefox-accounts-bridge/Cargo.toml.D87019-thin-vec-big-endian.diff	2020-08-17 17:04:24.134598587 +0200
7cc1fe
+++ firefox-78.1.0/services/fxaccounts/rust-bridge/firefox-accounts-bridge/Cargo.toml	2020-08-17 17:04:52.432691786 +0200
7cc1fe
@@ -20,5 +20,5 @@ nserror = { path = "../../../../xpcom/ru
7cc1fe
 nsstring = { path = "../../../../xpcom/rust/nsstring" }
7cc1fe
 xpcom = { path = "../../../../xpcom/rust/xpcom" }
7cc1fe
 storage_variant = { path = "../../../../storage/variant" }
7cc1fe
-thin-vec = { version = "0.1", features = ["gecko-ffi"] }
7cc1fe
+thin-vec = { version = "0.2.1", features = ["gecko-ffi"] }
7cc1fe
 fxa-client = { git = "https://github.com/mozilla/application-services", rev = "61dcc364ac0d6d0816ab88a494bbf20d824b009b", features = ["gecko"] }
7cc1fe
diff -up firefox-78.1.0/services/sync/golden_gate/Cargo.toml.D87019-thin-vec-big-endian.diff firefox-78.1.0/services/sync/golden_gate/Cargo.toml
7cc1fe
--- firefox-78.1.0/services/sync/golden_gate/Cargo.toml.D87019-thin-vec-big-endian.diff	2020-07-22 17:56:24.000000000 +0200
7cc1fe
+++ firefox-78.1.0/services/sync/golden_gate/Cargo.toml	2020-08-17 17:04:24.134598587 +0200
7cc1fe
@@ -19,5 +19,5 @@ sync15-traits = { git = "https://github.
7cc1fe
 xpcom = { path = "../../../xpcom/rust/xpcom" }
7cc1fe
 
7cc1fe
 [dependencies.thin-vec]
7cc1fe
-version = "0.1.0"
7cc1fe
+version = "0.2.1"
7cc1fe
 features = ["gecko-ffi"]
7cc1fe
diff -up firefox-78.1.0/third_party/rust/thin-vec/.cargo-checksum.json.D87019-thin-vec-big-endian.diff firefox-78.1.0/third_party/rust/thin-vec/.cargo-checksum.json
7cc1fe
--- firefox-78.1.0/third_party/rust/thin-vec/.cargo-checksum.json.D87019-thin-vec-big-endian.diff	2020-07-22 17:56:29.000000000 +0200
7cc1fe
+++ firefox-78.1.0/third_party/rust/thin-vec/.cargo-checksum.json	2020-08-17 17:04:24.134598587 +0200
7cc1fe
@@ -1 +1 @@
7cc1fe
-{"files":{"Cargo.toml":"fb96cad605ae48215811808c1cc1b9a50248f2b14542058094b23983e2f8d8a0","README.md":"c26d7101e3031e7dd8890ce938e50cad7a1e6adf7fc2f2b0d3c36b03afe68c0b","src/heap.rs":"fe84a4ff433568d5713685456d87597ac5dcdb9d5190061a3da8074240ba1bc3","src/lib.rs":"ce36db8e3464dddade7c1ddbe3ee1f5e525af5be492ea51a0d8a0776c1adfc28","src/range.rs":"bac59bcb6230367a39c7e28ac15263e4526f966cd8c72015873017f17c115aaa"},"package":"73fdf4b84c65a85168477b7fb6c498e0716bc9487fba24623389ea7f51708044"}
7cc1fe
\ No newline at end of file
7cc1fe
+{"files":{"Cargo.toml":"754c05523d17eb7591c3ea2c9294e47c05fbb257fed04b78546fb2ec7cafa8b4","README.md":"c26d7101e3031e7dd8890ce938e50cad7a1e6adf7fc2f2b0d3c36b03afe68c0b","src/lib.rs":"627c6094c3f0286dba25bc73f5672c06c5061c25b01c513d213cbdda100673a2"},"package":"dcc760ada4a9f56fc6d0e81bd143984ebc7bb1b875a6891aa2fa613ca7394fc0"}
7cc1fe
\ No newline at end of file
7cc1fe
diff -up firefox-78.1.0/third_party/rust/thin-vec/Cargo.toml.D87019-thin-vec-big-endian.diff firefox-78.1.0/third_party/rust/thin-vec/Cargo.toml
7cc1fe
--- firefox-78.1.0/third_party/rust/thin-vec/Cargo.toml.D87019-thin-vec-big-endian.diff	2020-07-22 17:56:29.000000000 +0200
7cc1fe
+++ firefox-78.1.0/third_party/rust/thin-vec/Cargo.toml	2020-08-17 17:04:24.135598590 +0200
7cc1fe
@@ -3,7 +3,7 @@
7cc1fe
 # When uploading crates to the registry Cargo will automatically
7cc1fe
 # "normalize" Cargo.toml files for maximal compatibility
7cc1fe
 # with all versions of Cargo and also rewrite `path` dependencies
7cc1fe
-# to registry (e.g. crates.io) dependencies
7cc1fe
+# to registry (e.g., crates.io) dependencies
7cc1fe
 #
7cc1fe
 # If you believe there's an error in this file please file an
7cc1fe
 # issue against the rust-lang/cargo repository. If you're
7cc1fe
@@ -11,16 +11,17 @@
7cc1fe
 # will likely look very different (and much more reasonable)
7cc1fe
 
7cc1fe
 [package]
7cc1fe
+edition = "2018"
7cc1fe
 name = "thin-vec"
7cc1fe
-version = "0.1.0"
7cc1fe
+version = "0.2.1"
7cc1fe
 authors = ["Alexis Beingessner <a.beingessner@gmail.com>"]
7cc1fe
 description = "a vec that takes up less space on the stack"
7cc1fe
 homepage = "https://github.com/gankro/thin-vec"
7cc1fe
 readme = "README.md"
7cc1fe
 license = "MIT/Apache-2.0"
7cc1fe
 repository = "https://github.com/gankro/thin-vec"
7cc1fe
-[dependencies.libc]
7cc1fe
-version = "0.2"
7cc1fe
+
7cc1fe
+[dependencies]
7cc1fe
 
7cc1fe
 [features]
7cc1fe
 default = []
7cc1fe
diff -up firefox-78.1.0/third_party/rust/thin-vec/src/heap.rs.D87019-thin-vec-big-endian.diff firefox-78.1.0/third_party/rust/thin-vec/src/heap.rs
7cc1fe
diff -up firefox-78.1.0/third_party/rust/thin-vec/src/lib.rs.D87019-thin-vec-big-endian.diff firefox-78.1.0/third_party/rust/thin-vec/src/lib.rs
7cc1fe
--- firefox-78.1.0/third_party/rust/thin-vec/src/lib.rs.D87019-thin-vec-big-endian.diff	2020-07-22 17:56:28.000000000 +0200
7cc1fe
+++ firefox-78.1.0/third_party/rust/thin-vec/src/lib.rs	2020-08-17 17:04:24.135598590 +0200
7cc1fe
@@ -1,50 +1,252 @@
7cc1fe
-mod range;
7cc1fe
+//! ThinVec is exactly the same as Vec, except that it stores its `len` and `capacity` in the buffer
7cc1fe
+//! it allocates.
7cc1fe
+//!
7cc1fe
+//! This makes the memory footprint of ThinVecs lower; notably in cases where space is reserved for
7cc1fe
+//! a non-existence ThinVec<T>. So `Vec<ThinVec<T>>` and `Option<ThinVec<T>>::None` will waste less
7cc1fe
+//! space. Being pointer-sized also means it can be passed/stored in registers.
7cc1fe
+//!
7cc1fe
+//! Of course, any actually constructed ThinVec will theoretically have a bigger allocation, but
7cc1fe
+//! the fuzzy nature of allocators means that might not actually be the case.
7cc1fe
+//!
7cc1fe
+//! Properties of Vec that are preserved:
7cc1fe
+//! * `ThinVec::new()` doesn't allocate (it points to a statically allocated singleton)
7cc1fe
+//! * reallocation can be done in place
7cc1fe
+//! * `size_of::<ThinVec<T>>()` == `size_of::<Option<ThinVec<T>>>()`
7cc1fe
+//!
7cc1fe
+//! Properties of Vec that aren't preserved:
7cc1fe
+//! * `ThinVec<T>` can't ever be zero-cost roundtripped to a `Box<[T]>`, `String`, or `*mut T`
7cc1fe
+//! * `from_raw_parts` doesn't exist
7cc1fe
+//! * ThinVec currently doesn't bother to not-allocate for Zero Sized Types (e.g. `ThinVec<()>`),
7cc1fe
+//!   but it could be done if someone cared enough to implement it.
7cc1fe
+//!
7cc1fe
+//!
7cc1fe
+//!
7cc1fe
+//! # Gecko FFI
7cc1fe
+//!
7cc1fe
+//! If you enable the gecko-ffi feature, ThinVec will verbatim bridge with the nsTArray type in
7cc1fe
+//! Gecko (Firefox). That is, ThinVec and nsTArray have identical layouts *but not ABIs*, 
7cc1fe
+//! so nsTArrays/ThinVecs an be natively manipulated by C++ and Rust, and ownership can be 
7cc1fe
+//! transferred across the FFI boundary (**IF YOU ARE CAREFUL, SEE BELOW!!**).
7cc1fe
+//!
7cc1fe
+//! While this feature is handy, it is also inherently dangerous to use because Rust and C++ do not
7cc1fe
+//! know about eachother. Specifically, this can be an issue with non-POD types (types which
7cc1fe
+//! have destructors, move constructors, or are `!Copy`).
7cc1fe
+//!
7cc1fe
+//! ## Do Not Pass By Value
7cc1fe
+//!
7cc1fe
+//! The biggest thing to keep in mind is that **FFI functions cannot pass ThinVec/nsTArray 
7cc1fe
+//! by-value**. That is, these are busted APIs:
7cc1fe
+//!
7cc1fe
+//! ```rust,ignore
7cc1fe
+//! // BAD WRONG
7cc1fe
+//! extern fn process_data(data: ThinVec<u32>) { ... }
7cc1fe
+//! // BAD WRONG
7cc1fe
+//! extern fn get_data() -> ThinVec<u32> { ... }
7cc1fe
+//! ```
7cc1fe
+//!
7cc1fe
+//! You must instead pass by-reference:
7cc1fe
+//!
7cc1fe
+//! ```rust
7cc1fe
+//! # use thin_vec::*;
7cc1fe
+//! # use std::mem;
7cc1fe
+//!
7cc1fe
+//! // Read-only access, ok!
7cc1fe
+//! extern fn process_data(data: &ThinVec<u32>) {
7cc1fe
+//!     for val in data {
7cc1fe
+//!         println!("{}", val);
7cc1fe
+//!     }
7cc1fe
+//! }
7cc1fe
+//! 
7cc1fe
+//! // Replace with empty instance to take ownership, ok!
7cc1fe
+//! extern fn consume_data(data: &mut ThinVec<u32>) {
7cc1fe
+//!     let owned = mem::replace(data, ThinVec::new());
7cc1fe
+//!     mem::drop(owned);
7cc1fe
+//! }
7cc1fe
+//! 
7cc1fe
+//! // Mutate input, ok!
7cc1fe
+//! extern fn add_data(dataset: &mut ThinVec<u32>) {
7cc1fe
+//!     dataset.push(37);
7cc1fe
+//!     dataset.push(12);
7cc1fe
+//! }
7cc1fe
+//! 
7cc1fe
+//! // Return via out-param, usually ok!
7cc1fe
+//! //
7cc1fe
+//! // WARNING: output must be initialized! (Empty nsTArrays are free, so just do it!)
7cc1fe
+//! extern fn get_data(output: &mut ThinVec<u32>) {
7cc1fe
+//!     *output = thin_vec![1, 2, 3, 4, 5];
7cc1fe
+//! }
7cc1fe
+//! ```
7cc1fe
+//!
7cc1fe
+//! Ignorable Explanation For Those Who Really Want To Know Why:
7cc1fe
+//!
7cc1fe
+//! > The fundamental issue is that Rust and C++ can't currently communicate about destructors, and
7cc1fe
+//! > the semantics of C++ require destructors of function arguments to be run when the function
7cc1fe
+//! > returns. Whether the callee or caller is responsible for this is also platform-specific, so
7cc1fe
+//! > trying to hack around it manually would be messy. 
7cc1fe
+//! >
7cc1fe
+//! > Also a type having a destructor changes its C++ ABI, because that type must actually exist 
7cc1fe
+//! > in memory (unlike a trivial struct, which is often passed in registers). We don't currently
7cc1fe
+//! > have a way to communicate to Rust that this is happening, so even if we worked out the
7cc1fe
+//! > destructor issue with say, MaybeUninit, it would still be a non-starter without some RFCs
7cc1fe
+//! > to add explicit rustc support.
7cc1fe
+//! >
7cc1fe
+//! > Realistically, the best answer here is to have a "heavier" bindgen that can secretly
7cc1fe
+//! > generate FFI glue so we can pass things "by value" and have it generate by-reference code
7cc1fe
+//! > behind our back (like the cxx crate does). This would muddy up debugging/searchfox though.
7cc1fe
+//!
7cc1fe
+//! ## Types Should Be Trivially Relocatable
7cc1fe
+//!
7cc1fe
+//! Types in Rust are always trivially relocatable (unless suitably borrowed/[pinned][]/hidden).
7cc1fe
+//! This means all Rust types are legal to relocate with a bitwise copy, you cannot provide
7cc1fe
+//! copy or move constructors to execute when this happens, and the old location won't have its
7cc1fe
+//! destructor run. This will cause problems for types which have a significant location
7cc1fe
+//! (types that intrusively point into themselves or have their location registered with a service).
7cc1fe
+//!
7cc1fe
+//! While relocations are generally predictable if you're very careful, **you should avoid using
7cc1fe
+//! types with significant locations with Rust FFI**.
7cc1fe
+//!
7cc1fe
+//! Specifically, ThinVec will trivially relocate its contents whenever it needs to reallocate its
7cc1fe
+//! buffer to change its capacity. This is the default reallocation strategy for nsTArray, and is
7cc1fe
+//! suitable for the vast majority of types. Just be aware of this limitation!
7cc1fe
+//!
7cc1fe
+//! ## Auto Arrays Are Dangerous
7cc1fe
+//!
7cc1fe
+//! ThinVec has *some* support for handling auto arrays which store their buffer on the stack, 
7cc1fe
+//! but this isn't well tested.
7cc1fe
+//!
7cc1fe
+//! Regardless of how much support we provide, Rust won't be aware of the buffer's limited lifetime,
7cc1fe
+//! so standard auto array safety caveats apply about returning/storing them! ThinVec won't ever
7cc1fe
+//! produce an auto array on its own, so this is only an issue for transferring an nsTArray into
7cc1fe
+//! Rust.
7cc1fe
+//!
7cc1fe
+//! ## Other Issues
7cc1fe
+//!
7cc1fe
+//! Standard FFI caveats also apply: 
7cc1fe
+//!
7cc1fe
+//!  * Rust is more strict about POD types being initialized (use MaybeUninit if you must)
7cc1fe
+//!  * `ThinVec<T>` has no idea if the C++ version of `T` has move/copy/assign/delete overloads
7cc1fe
+//!  * `nsTArray<T>` has no idea if the Rust version of `T` has a Drop/Clone impl
7cc1fe
+//!  * C++ can do all sorts of unsound things that Rust can't catch
7cc1fe
+//!  * C++ and Rust don't agree on how zero-sized/empty types should be handled
7cc1fe
+//!
7cc1fe
+//! The gecko-ffi feature will not work if you aren't linking with code that has nsTArray
7cc1fe
+//! defined. Specifically, we must share the symbol for nsTArray's empty singleton. You will get
7cc1fe
+//! linking errors if that isn't defined.
7cc1fe
+//!
7cc1fe
+//! The gecko-ffi feature also limits ThinVec to the legacy behaviors of nsTArray. Most notably,
7cc1fe
+//! nsTArray has a maximum capacity of i32::MAX (~2.1 billion items). Probably not an issue.
7cc1fe
+//! Probably.
7cc1fe
+//!
7cc1fe
+//! [pinned]: https://doc.rust-lang.org/std/pin/index.html
7cc1fe
 
7cc1fe
 use std::{fmt, io, ptr, mem, slice};
7cc1fe
 use std::collections::Bound;
7cc1fe
 use std::iter::FromIterator;
7cc1fe
 use std::slice::IterMut;
7cc1fe
-use std::ops::{Deref, DerefMut};
7cc1fe
+use std::ops::{Deref, DerefMut, RangeBounds};
7cc1fe
 use std::marker::PhantomData;
7cc1fe
+use std::alloc::*;
7cc1fe
 use std::cmp::*;
7cc1fe
 use std::hash::*;
7cc1fe
 use std::borrow::*;
7cc1fe
-use range::RangeArgument;
7cc1fe
 use std::ptr::NonNull;
7cc1fe
 
7cc1fe
-// Heap shimming because reasons. This doesn't unfortunately match the heap api
7cc1fe
-// right now because reasons.
7cc1fe
-mod heap;
7cc1fe
+use impl_details::*;
7cc1fe
 
7cc1fe
-#[cfg(not(feature = "gecko-ffi"))]
7cc1fe
-type SizeType = usize;
7cc1fe
-#[cfg(feature = "gecko-ffi")]
7cc1fe
-type SizeType = u32;
7cc1fe
-
7cc1fe
-#[cfg(feature = "gecko-ffi")]
7cc1fe
-const AUTO_MASK: u32 = 1 << 31;
7cc1fe
-#[cfg(feature = "gecko-ffi")]
7cc1fe
-const CAP_MASK: u32 = !AUTO_MASK;
7cc1fe
+// modules: a simple way to cfg a whole bunch of impl details at once
7cc1fe
 
7cc1fe
 #[cfg(not(feature = "gecko-ffi"))]
7cc1fe
-const MAX_CAP: usize = !0;
7cc1fe
-#[cfg(feature = "gecko-ffi")]
7cc1fe
-const MAX_CAP: usize = i32::max_value() as usize;
7cc1fe
+mod impl_details {
7cc1fe
+    pub type SizeType = usize;
7cc1fe
+    pub const MAX_CAP: usize = !0;
7cc1fe
 
7cc1fe
-#[cfg(not(feature = "gecko-ffi"))]
7cc1fe
-#[inline(always)]
7cc1fe
-fn assert_size(x: usize) -> SizeType { x }
7cc1fe
+    #[inline(always)]
7cc1fe
+    pub fn assert_size(x: usize) -> SizeType { x }
7cc1fe
+}
7cc1fe
 
7cc1fe
 #[cfg(feature = "gecko-ffi")]
7cc1fe
-#[inline]
7cc1fe
-fn assert_size(x: usize) -> SizeType {
7cc1fe
-    if x > MAX_CAP as usize {
7cc1fe
-        panic!("nsTArray size may not exceed the capacity of a 32-bit sized int");
7cc1fe
+mod impl_details {
7cc1fe
+    // Support for briding a gecko nsTArray verbatim into a ThinVec.
7cc1fe
+    //
7cc1fe
+    // ThinVec can't see copy/move/delete implementations
7cc1fe
+    // from C++
7cc1fe
+    //
7cc1fe
+    // The actual layout of an nsTArray is:
7cc1fe
+    //
7cc1fe
+    // ```cpp
7cc1fe
+    // struct {
7cc1fe
+    //   uint32_t mLength;
7cc1fe
+    //   uint32_t mCapacity: 31;
7cc1fe
+    //   uint32_t mIsAutoArray: 1;
7cc1fe
+    // }
7cc1fe
+    // ```
7cc1fe
+    //
7cc1fe
+    // Rust doesn't natively support bit-fields, so we manually mask
7cc1fe
+    // and shift the bit. When the "auto" bit is set, the header and buffer
7cc1fe
+    // are actually on the stack, meaning the ThinVec pointer-to-header
7cc1fe
+    // is essentially an "owned borrow", and therefore dangerous to handle.
7cc1fe
+    // There are no safety guards for this situation.
7cc1fe
+    //
7cc1fe
+    // On little-endian platforms, the auto bit will be the high-bit of
7cc1fe
+    // our capacity u32. On big-endian platforms, it will be the low bit.
7cc1fe
+    // Hence we need some platform-specific CFGs for the necessary masking/shifting.
7cc1fe
+    // 
7cc1fe
+    // ThinVec won't ever construct an auto array. They only happen when
7cc1fe
+    // bridging from C++. This means we don't need to ever set/preserve the bit.
7cc1fe
+    // We just need to be able to read and handle it if it happens to be there.
7cc1fe
+    //
7cc1fe
+    // Handling the auto bit mostly just means not freeing/reallocating the buffer.
7cc1fe
+
7cc1fe
+    pub type SizeType = u32;
7cc1fe
+
7cc1fe
+    pub const MAX_CAP: usize = i32::max_value() as usize;
7cc1fe
+
7cc1fe
+    // Little endian: the auto bit is the high bit, and the capacity is
7cc1fe
+    // verbatim. So we just need to mask off the high bit. Note that
7cc1fe
+    // this masking is unnecessary when packing, because assert_size
7cc1fe
+    // guards against the high bit being set.
7cc1fe
+    #[cfg(target_endian = "little")]
7cc1fe
+    pub fn pack_capacity(cap: SizeType) -> SizeType {
7cc1fe
+        cap as SizeType
7cc1fe
+    }
7cc1fe
+    #[cfg(target_endian = "little")]
7cc1fe
+    pub fn unpack_capacity(cap: SizeType) -> usize {
7cc1fe
+        (cap as usize) & !(1 << 31)
7cc1fe
+    }
7cc1fe
+    #[cfg(target_endian = "little")]
7cc1fe
+    pub fn is_auto(cap: SizeType) -> bool {
7cc1fe
+        (cap & (1 << 31)) != 0
7cc1fe
+    }
7cc1fe
+
7cc1fe
+    // Big endian: the auto bit is the low bit, and the capacity is
7cc1fe
+    // shifted up one bit. Masking out the auto bit is unnecessary,
7cc1fe
+    // as rust shifts always shift in 0's for unsigned integers.
7cc1fe
+    #[cfg(target_endian = "big")]
7cc1fe
+    pub fn pack_capacity(cap: SizeType) -> SizeType {
7cc1fe
+        (cap as SizeType) << 1
7cc1fe
+    }
7cc1fe
+    #[cfg(target_endian = "big")]
7cc1fe
+    pub fn unpack_capacity(cap: SizeType) -> usize {
7cc1fe
+        (cap >> 1) as usize
7cc1fe
+    }
7cc1fe
+    #[cfg(target_endian = "big")]
7cc1fe
+    pub fn is_auto(cap: SizeType) -> bool {
7cc1fe
+        (cap & 1) != 0
7cc1fe
+    }
7cc1fe
+
7cc1fe
+    #[inline]
7cc1fe
+    pub fn assert_size(x: usize) -> SizeType {
7cc1fe
+        if x > MAX_CAP as usize {
7cc1fe
+            panic!("nsTArray size may not exceed the capacity of a 32-bit sized int");
7cc1fe
+        }
7cc1fe
+        x as SizeType
7cc1fe
     }
7cc1fe
-    x as SizeType
7cc1fe
+
7cc1fe
 }
7cc1fe
 
7cc1fe
-/// The header of a ThinVec
7cc1fe
+/// The header of a ThinVec.
7cc1fe
+///
7cc1fe
+/// The _cap can be a bitfield, so use accessors to avoid trouble.
7cc1fe
 #[repr(C)]
7cc1fe
 struct Header {
7cc1fe
     _len: SizeType,
7cc1fe
@@ -56,38 +258,10 @@ impl Header {
7cc1fe
         self._len as usize
7cc1fe
     }
7cc1fe
 
7cc1fe
-    #[cfg(feature = "gecko-ffi")]
7cc1fe
-    fn cap(&self) -> usize {
7cc1fe
-        (self._cap & CAP_MASK) as usize
7cc1fe
-    }
7cc1fe
-
7cc1fe
-    #[cfg(not(feature = "gecko-ffi"))]
7cc1fe
-    fn cap(&self) -> usize {
7cc1fe
-        self._cap as usize
7cc1fe
-    }
7cc1fe
-
7cc1fe
     fn set_len(&mut self, len: usize) {
7cc1fe
         self._len = assert_size(len);
7cc1fe
     }
7cc1fe
 
7cc1fe
-    #[cfg(feature = "gecko-ffi")]
7cc1fe
-    fn set_cap(&mut self, cap: usize) {
7cc1fe
-        debug_assert!(cap & (CAP_MASK as usize) == cap);
7cc1fe
-        // FIXME: this is busted because it reads uninit memory
7cc1fe
-        // debug_assert!(!self.uses_stack_allocated_buffer());
7cc1fe
-        self._cap = assert_size(cap) & CAP_MASK;
7cc1fe
-    }
7cc1fe
-
7cc1fe
-    #[cfg(feature = "gecko-ffi")]
7cc1fe
-    fn uses_stack_allocated_buffer(&self) -> bool {
7cc1fe
-        self._cap & AUTO_MASK != 0
7cc1fe
-    }
7cc1fe
-
7cc1fe
-    #[cfg(not(feature = "gecko-ffi"))]
7cc1fe
-    fn set_cap(&mut self, cap: usize) {
7cc1fe
-        self._cap = assert_size(cap);
7cc1fe
-    }
7cc1fe
-
7cc1fe
     fn data<T>(&self) -> *mut T {
7cc1fe
         let header_size = mem::size_of::<Header>();
7cc1fe
         let padding = padding::<T>();
7cc1fe
@@ -105,6 +279,41 @@ impl Header {
7cc1fe
     }
7cc1fe
 }
7cc1fe
 
7cc1fe
+
7cc1fe
+#[cfg(feature = "gecko-ffi")]
7cc1fe
+impl Header {
7cc1fe
+    fn cap(&self) -> usize {
7cc1fe
+        unpack_capacity(self._cap)
7cc1fe
+    }
7cc1fe
+
7cc1fe
+    fn set_cap(&mut self, cap: usize) {
7cc1fe
+        // debug check that our packing is working
7cc1fe
+        debug_assert_eq!(unpack_capacity(pack_capacity(cap as SizeType)), cap);
7cc1fe
+        // FIXME: this assert is busted because it reads uninit memory
7cc1fe
+        // debug_assert!(!self.uses_stack_allocated_buffer());
7cc1fe
+
7cc1fe
+        // NOTE: this always stores a cleared auto bit, because set_cap
7cc1fe
+        // is only invoked by Rust, and Rust doesn't create auto arrays.
7cc1fe
+        self._cap = pack_capacity(assert_size(cap));
7cc1fe
+    }
7cc1fe
+
7cc1fe
+    fn uses_stack_allocated_buffer(&self) -> bool {
7cc1fe
+        is_auto(self._cap)
7cc1fe
+    }
7cc1fe
+}
7cc1fe
+
7cc1fe
+#[cfg(not(feature = "gecko-ffi"))]
7cc1fe
+impl Header {
7cc1fe
+    fn cap(&self) -> usize {
7cc1fe
+        self._cap as usize
7cc1fe
+    }
7cc1fe
+
7cc1fe
+    fn set_cap(&mut self, cap: usize) {
7cc1fe
+        self._cap = assert_size(cap);
7cc1fe
+    }
7cc1fe
+}
7cc1fe
+
7cc1fe
+
7cc1fe
 /// Singleton that all empty collections share.
7cc1fe
 /// Note: can't store non-zero ZSTs, we allocate in that case. We could
7cc1fe
 /// optimize everything to not do that (basically, make ptr == len and branch
7cc1fe
@@ -121,9 +330,7 @@ extern {
7cc1fe
 
7cc1fe
 // TODO: overflow checks everywhere
7cc1fe
 
7cc1fe
-// Utils
7cc1fe
-
7cc1fe
-fn oom() -> ! { std::process::abort() }
7cc1fe
+// Utils for computing layouts of allocations
7cc1fe
 
7cc1fe
 fn alloc_size<T>(cap: usize) -> usize {
7cc1fe
     // Compute "real" header size with pointer math
7cc1fe
@@ -156,15 +363,22 @@ fn alloc_align<T>() -> usize {
7cc1fe
     max(mem::align_of::<T>(), mem::align_of::<Header>())
7cc1fe
 }
7cc1fe
 
7cc1fe
-fn header_with_capacity<T>(cap: usize) -> NonNull<Header> {
7cc1fe
-    debug_assert!(cap > 0);
7cc1fe
+fn layout<T>(cap: usize) -> Layout {
7cc1fe
     unsafe {
7cc1fe
-        let header = heap::allocate(
7cc1fe
+        Layout::from_size_align_unchecked(
7cc1fe
             alloc_size::<T>(cap),
7cc1fe
             alloc_align::<T>(),
7cc1fe
-        ) as *mut Header;
7cc1fe
+        )
7cc1fe
+    }
7cc1fe
+}
7cc1fe
 
7cc1fe
-        if header.is_null() { oom() }
7cc1fe
+fn header_with_capacity<T>(cap: usize) -> NonNull<Header> {
7cc1fe
+    debug_assert!(cap > 0);
7cc1fe
+    unsafe {
7cc1fe
+        let layout = layout::<T>(cap);
7cc1fe
+        let header = alloc(layout) as *mut Header;
7cc1fe
+
7cc1fe
+        if header.is_null() { handle_alloc_error(layout) }
7cc1fe
 
7cc1fe
         // "Infinite" capacity for zero-sized types:
7cc1fe
         (*header).set_cap(if mem::size_of::<T>() == 0 { MAX_CAP } else { cap });
7cc1fe
@@ -176,28 +390,8 @@ fn header_with_capacity<T>(cap: usize) -
7cc1fe
 
7cc1fe
 
7cc1fe
 
7cc1fe
-/// ThinVec is exactly the same as Vec, except that it stores its `len` and `capacity` in the buffer
7cc1fe
-/// it allocates.
7cc1fe
-///
7cc1fe
-/// This makes the memory footprint of ThinVecs lower; notably in cases where space is reserved for
7cc1fe
-/// a non-existence ThinVec<T>. So `Vec<ThinVec<T>>` and `Option<ThinVec<T>>::None` will waste less
7cc1fe
-/// space. Being pointer-sized also means it can be passed/stored in registers.
7cc1fe
-///
7cc1fe
-/// Of course, any actually constructed ThinVec will theoretically have a bigger allocation, but
7cc1fe
-/// the fuzzy nature of allocators means that might not actually be the case.
7cc1fe
-///
7cc1fe
-/// Properties of Vec that are preserved:
7cc1fe
-/// * `ThinVec::new()` doesn't allocate (it points to a statically allocated singleton)
7cc1fe
-/// * reallocation can be done in place
7cc1fe
-/// * `size_of::<ThinVec<T>>()` == `size_of::<Option<ThinVec<T>>>()`
7cc1fe
-///   * NOTE: This is only possible when the `unstable` feature is used.
7cc1fe
-///
7cc1fe
-/// Properties of Vec that aren't preserved:
7cc1fe
-/// * `ThinVec<T>` can't ever be zero-cost roundtripped to a `Box<[T]>`, `String`, or `*mut T`
7cc1fe
-/// * `from_raw_parts` doesn't exist
7cc1fe
-/// * ThinVec currently doesn't bother to not-allocate for Zero Sized Types (e.g. `ThinVec<()>`),
7cc1fe
-///   but it could be done if someone cared enough to implement it.
7cc1fe
-#[cfg_attr(feature = "gecko-ffi", repr(C))]
7cc1fe
+/// See the crate's top level documentation for a description of this type.
7cc1fe
+#[repr(C)]
7cc1fe
 pub struct ThinVec<T> {
7cc1fe
     ptr: NonNull<Header>,
7cc1fe
     boo: PhantomData<T>,
7cc1fe
@@ -627,15 +821,15 @@ impl<T> ThinVec<T> {
7cc1fe
     }
7cc1fe
 
7cc1fe
     pub fn drain<R>(&mut self, range: R) -> Drain<T>
7cc1fe
-        where R: RangeArgument<usize>
7cc1fe
+        where R: RangeBounds<usize>
7cc1fe
     {
7cc1fe
         let len = self.len();
7cc1fe
-        let start = match range.start() {
7cc1fe
+        let start = match range.start_bound() {
7cc1fe
             Bound::Included(&n) => n,
7cc1fe
             Bound::Excluded(&n) => n + 1,
7cc1fe
             Bound::Unbounded => 0,
7cc1fe
         };
7cc1fe
-        let end = match range.end() {
7cc1fe
+        let end = match range.end_bound() {
7cc1fe
             Bound::Included(&n) => n + 1,
7cc1fe
             Bound::Excluded(&n) => n,
7cc1fe
             Bound::Unbounded => len,
7cc1fe
@@ -666,9 +860,10 @@ impl<T> ThinVec<T> {
7cc1fe
 
7cc1fe
     unsafe fn deallocate(&mut self) {
7cc1fe
         if self.has_allocation() {
7cc1fe
-            heap::deallocate(self.ptr() as *mut u8,
7cc1fe
-                alloc_size::<T>(self.capacity()),
7cc1fe
-                alloc_align::<T>());
7cc1fe
+            dealloc(
7cc1fe
+                self.ptr() as *mut u8,
7cc1fe
+                layout::<T>(self.capacity()),
7cc1fe
+            )
7cc1fe
         }
7cc1fe
     }
7cc1fe
 
7cc1fe
@@ -678,15 +873,36 @@ impl<T> ThinVec<T> {
7cc1fe
         debug_assert!(new_cap > 0);
7cc1fe
         if self.has_allocation() {
7cc1fe
             let old_cap = self.capacity();
7cc1fe
-            let ptr = heap::reallocate(self.ptr() as *mut u8,
7cc1fe
-                                       alloc_size::<T>(old_cap),
7cc1fe
-                                       alloc_size::<T>(new_cap),
7cc1fe
-                                       alloc_align::<T>()) as *mut Header;
7cc1fe
-            if ptr.is_null() { oom() }
7cc1fe
+            let ptr = realloc(
7cc1fe
+                self.ptr() as *mut u8,
7cc1fe
+                layout::<T>(old_cap),
7cc1fe
+                alloc_size::<T>(new_cap),
7cc1fe
+            ) as *mut Header;
7cc1fe
+
7cc1fe
+            if ptr.is_null() { handle_alloc_error(layout::<T>(new_cap)) }
7cc1fe
             (*ptr).set_cap(new_cap);
7cc1fe
             self.ptr = NonNull::new_unchecked(ptr);
7cc1fe
         } else {
7cc1fe
-            self.ptr = header_with_capacity::<T>(new_cap);
7cc1fe
+            let mut new_header = header_with_capacity::<T>(new_cap);
7cc1fe
+
7cc1fe
+            // If we get here and have a non-zero len, then we must be handling
7cc1fe
+            // a gecko auto array, and we have items in a stack buffer. We shouldn't
7cc1fe
+            // free it, but we should memcopy the contents out of it and mark it as empty.
7cc1fe
+            //
7cc1fe
+            // T is assumed to be trivially relocatable, as this is ~required
7cc1fe
+            // for Rust compatibility anyway. Furthermore, we assume C++ won't try
7cc1fe
+            // to unconditionally destroy the contents of the stack allocated buffer
7cc1fe
+            // (i.e. it's obfuscated behind a union).
7cc1fe
+            //
7cc1fe
+            // In effect, we are partially reimplementing the auto array move constructor
7cc1fe
+            // by leaving behind a valid empty instance.
7cc1fe
+            let len = self.len();
7cc1fe
+            if cfg!(feature = "gecko-ffi") && len > 0 {
7cc1fe
+                new_header.as_mut().data::<T>().copy_from_nonoverlapping(self.data_raw(), len);
7cc1fe
+                self.set_len(0);
7cc1fe
+            }
7cc1fe
+            
7cc1fe
+            self.ptr = new_header;
7cc1fe
         }
7cc1fe
     }
7cc1fe
 
7cc1fe
@@ -1087,10 +1303,7 @@ mod tests {
7cc1fe
         use std::mem::size_of;
7cc1fe
         assert_eq!(size_of::<ThinVec<u8>>(), size_of::<&u8>());
7cc1fe
 
7cc1fe
-        // We don't perform the null-pointer optimization on stable rust.
7cc1fe
-        if cfg!(feature = "unstable") {
7cc1fe
-            assert_eq!(size_of::<Option<ThinVec<u8>>>(), size_of::<&u8>());
7cc1fe
-        }
7cc1fe
+        assert_eq!(size_of::<Option<ThinVec<u8>>>(), size_of::<&u8>());
7cc1fe
     }
7cc1fe
 
7cc1fe
     #[test]
7cc1fe
@@ -1725,7 +1938,6 @@ mod std_tests {
7cc1fe
         assert_eq!(v, &[(), ()]);
7cc1fe
     }
7cc1fe
 
7cc1fe
-/* TODO: support inclusive ranges
7cc1fe
     #[test]
7cc1fe
     fn test_drain_inclusive_range() {
7cc1fe
         let mut v = thin_vec!['a', 'b', 'c', 'd', 'e'];
7cc1fe
@@ -1755,6 +1967,7 @@ mod std_tests {
7cc1fe
     }
7cc1fe
 
7cc1fe
     #[test]
7cc1fe
+    #[cfg(not(feature = "gecko-ffi"))]
7cc1fe
     fn test_drain_max_vec_size() {
7cc1fe
         let mut v = ThinVec::<()>::with_capacity(usize::max_value());
7cc1fe
         unsafe { v.set_len(usize::max_value()); }
7cc1fe
@@ -1775,7 +1988,6 @@ mod std_tests {
7cc1fe
         let mut v = thin_vec![1, 2, 3, 4, 5];
7cc1fe
         v.drain(5..=5);
7cc1fe
     }
7cc1fe
-*/
7cc1fe
 
7cc1fe
 /* TODO: implement splice?
7cc1fe
     #[test]
7cc1fe
@@ -2181,7 +2393,7 @@ mod std_tests {
7cc1fe
         assert!(v.capacity() >= 33)
7cc1fe
     }
7cc1fe
 
7cc1fe
-/* TODO: implement try_reserve 
7cc1fe
+/* TODO: implement try_reserve
7cc1fe
     #[test]
7cc1fe
     fn test_try_reserve() {
7cc1fe
 
7cc1fe
diff -up firefox-78.1.0/third_party/rust/thin-vec/src/range.rs.D87019-thin-vec-big-endian.diff firefox-78.1.0/third_party/rust/thin-vec/src/range.rs
7cc1fe
diff -up firefox-78.1.0/toolkit/components/cascade_bloom_filter/Cargo.toml.D87019-thin-vec-big-endian.diff firefox-78.1.0/toolkit/components/cascade_bloom_filter/Cargo.toml
7cc1fe
--- firefox-78.1.0/toolkit/components/cascade_bloom_filter/Cargo.toml.D87019-thin-vec-big-endian.diff	2020-07-22 17:56:29.000000000 +0200
7cc1fe
+++ firefox-78.1.0/toolkit/components/cascade_bloom_filter/Cargo.toml	2020-08-17 17:04:24.135598590 +0200
7cc1fe
@@ -8,5 +8,5 @@ nserror = { path = "../../../xpcom/rust/
7cc1fe
 nsstring = { path = "../../../xpcom/rust/nsstring" }
7cc1fe
 rental = "0.5.5"
7cc1fe
 rust_cascade = "0.6.0"
7cc1fe
-thin-vec = { version = "0.1.0", features = ["gecko-ffi"] }
7cc1fe
+thin-vec = { version = "0.2.1", features = ["gecko-ffi"] }
7cc1fe
 xpcom = { path = "../../../xpcom/rust/xpcom" }
7cc1fe
diff -up firefox-78.1.0/toolkit/components/extensions/storage/webext_storage_bridge/Cargo.toml.D87019-thin-vec-big-endian.diff firefox-78.1.0/toolkit/components/extensions/storage/webext_storage_bridge/Cargo.toml
7cc1fe
--- firefox-78.1.0/toolkit/components/extensions/storage/webext_storage_bridge/Cargo.toml.D87019-thin-vec-big-endian.diff	2020-07-22 17:56:30.000000000 +0200
7cc1fe
+++ firefox-78.1.0/toolkit/components/extensions/storage/webext_storage_bridge/Cargo.toml	2020-08-17 17:04:24.135598590 +0200
7cc1fe
@@ -13,7 +13,7 @@ moz_task = { path = "../../../../../xpco
7cc1fe
 nserror = { path = "../../../../../xpcom/rust/nserror" }
7cc1fe
 nsstring = { path = "../../../../../xpcom/rust/nsstring" }
7cc1fe
 once_cell = "1"
7cc1fe
-thin-vec = { version = "0.1.0", features = ["gecko-ffi"] }
7cc1fe
+thin-vec = { version = "0.2.1", features = ["gecko-ffi"] }
7cc1fe
 xpcom = { path = "../../../../../xpcom/rust/xpcom" }
7cc1fe
 serde = "1"
7cc1fe
 serde_json = "1"
7cc1fe
diff -up firefox-78.1.0/toolkit/components/kvstore/Cargo.toml.D87019-thin-vec-big-endian.diff firefox-78.1.0/toolkit/components/kvstore/Cargo.toml
7cc1fe
--- firefox-78.1.0/toolkit/components/kvstore/Cargo.toml.D87019-thin-vec-big-endian.diff	2020-07-22 17:56:30.000000000 +0200
7cc1fe
+++ firefox-78.1.0/toolkit/components/kvstore/Cargo.toml	2020-08-17 17:04:24.135598590 +0200
7cc1fe
@@ -18,7 +18,7 @@ rkv = "0.10.2"
7cc1fe
 storage_variant = { path = "../../../storage/variant" }
7cc1fe
 xpcom = { path = "../../../xpcom/rust/xpcom" }
7cc1fe
 tempfile = "3"
7cc1fe
-thin-vec = { version = "0.1.0", features = ["gecko-ffi"] }
7cc1fe
+thin-vec = { version = "0.2.1", features = ["gecko-ffi"] }
7cc1fe
 
7cc1fe
 # Get rid of failure's dependency on backtrace. Eventually
7cc1fe
 # backtrace will move into Rust core, but we don't need it here.
7cc1fe
diff -up firefox-78.1.0/toolkit/components/places/bookmark_sync/Cargo.toml.D87019-thin-vec-big-endian.diff firefox-78.1.0/toolkit/components/places/bookmark_sync/Cargo.toml
7cc1fe
--- firefox-78.1.0/toolkit/components/places/bookmark_sync/Cargo.toml.D87019-thin-vec-big-endian.diff	2020-07-22 17:56:30.000000000 +0200
7cc1fe
+++ firefox-78.1.0/toolkit/components/places/bookmark_sync/Cargo.toml	2020-08-17 17:04:24.135598590 +0200
7cc1fe
@@ -19,5 +19,5 @@ url = "2.0"
7cc1fe
 xpcom = { path = "../../../../xpcom/rust/xpcom" }
7cc1fe
 
7cc1fe
 [dependencies.thin-vec]
7cc1fe
-version = "0.1.0"
7cc1fe
+version = "0.2.1"
7cc1fe
 features = ["gecko-ffi"]
7cc1fe
diff -up firefox-78.1.0/tools/profiler/rust-helper/Cargo.toml.D87019-thin-vec-big-endian.diff firefox-78.1.0/tools/profiler/rust-helper/Cargo.toml
7cc1fe
--- firefox-78.1.0/tools/profiler/rust-helper/Cargo.toml.D87019-thin-vec-big-endian.diff	2020-07-22 17:56:30.000000000 +0200
7cc1fe
+++ firefox-78.1.0/tools/profiler/rust-helper/Cargo.toml	2020-08-17 17:04:24.135598590 +0200
7cc1fe
@@ -23,7 +23,7 @@ features = ["endian_fd", "elf32", "elf64
7cc1fe
 default-features = false
7cc1fe
 
7cc1fe
 [dependencies.thin-vec]
7cc1fe
-version = "0.1.0"
7cc1fe
+version = "0.2.1"
7cc1fe
 features = ["gecko-ffi"]
7cc1fe
 
7cc1fe
 [features]
7cc1fe
diff -up firefox-78.1.0/xpcom/rust/xpcom/Cargo.toml.D87019-thin-vec-big-endian.diff firefox-78.1.0/xpcom/rust/xpcom/Cargo.toml
7cc1fe
--- firefox-78.1.0/xpcom/rust/xpcom/Cargo.toml.D87019-thin-vec-big-endian.diff	2020-07-22 17:56:30.000000000 +0200
7cc1fe
+++ firefox-78.1.0/xpcom/rust/xpcom/Cargo.toml	2020-08-17 17:04:24.136598593 +0200
7cc1fe
@@ -9,4 +9,4 @@ nsstring = { path = "../nsstring" }
7cc1fe
 nserror = { path = "../nserror" }
7cc1fe
 threadbound = "0.1"
7cc1fe
 xpcom_macros = { path = "xpcom_macros" }
7cc1fe
-thin-vec = { version = "0.1.0", features = ["gecko-ffi"] }
7cc1fe
+thin-vec = { version = "0.2.1", features = ["gecko-ffi"] }